Bug 927432: fix 'finish() not called' in chrome js Marionette test cases. r=jgriffin
authorVicamo Yang <vyang@mozilla.com>
Thu, 17 Oct 2013 10:26:27 +0800
changeset 164853 ea748c15da80278bae49d10e56d5cee7d49c1f01
parent 164852 d203a15dddbc5952eeb4f67944da5e666de8544c
child 164854 738db6f78f8fe1b613efbc2d4083c79134613151
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgriffin
bugs927432
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 927432: fix 'finish() not called' in chrome js Marionette test cases. r=jgriffin
testing/marionette/client/marionette/tests/unit/test_chrome_async_finish.js
testing/marionette/client/marionette/tests/unit/unit-tests.ini
testing/marionette/marionette-server.js
new file mode 100644
--- /dev/null
+++ b/testing/marionette/client/marionette/tests/unit/test_chrome_async_finish.js
@@ -0,0 +1,6 @@
+MARIONETTE_TIMEOUT = 60000;
+MARIONETTE_CONTEXT = "chrome";
+ok(true);
+(function () {
+  finish();
+})();
--- a/testing/marionette/client/marionette/tests/unit/unit-tests.ini
+++ b/testing/marionette/client/marionette/tests/unit/unit-tests.ini
@@ -88,9 +88,10 @@ b2g = false
 [test_window_title.py]
 b2g = false
 [test_window_type.py]
 b2g = false
 
 [test_implicit_waits.py]
 [test_date_time_value.py]
 [test_getactiveframe_oop.py]
-[test_submit.py]
\ No newline at end of file
+[test_submit.py]
+[test_chrome_async_finish.js]
--- a/testing/marionette/marionette-server.js
+++ b/testing/marionette/marionette-server.js
@@ -839,17 +839,17 @@ MarionetteServerConnection.prototype = {
 
     //all pure JS scripts will need to call Marionette.finish() to complete the test.
     if (aRequest.newSandbox == undefined) {
       //if client does not send a value in newSandbox, 
       //then they expect the same behaviour as webdriver
       aRequest.newSandbox = true;
     }
     if (this.context == "chrome") {
-      if (aRequest.async) {
+      if (aRequest.parameters.async) {
         this.executeWithCallback(aRequest, aRequest.parameters.async);
       }
       else {
         this.execute(aRequest, true);
       }
     }
     else {
       this.sendAsync("executeJSScript",