Skip to content
This repository has been archived by the owner on Aug 20, 2018. It is now read-only.

Commit

Permalink
Bug 966234 - A shutdown after a restart causes Mozmill to open a new …
Browse files Browse the repository at this point in the history
…Firefox process before the former one is gone. r=hskupin
  • Loading branch information
Andrei Eftimie authored and whimboo committed Feb 7, 2014
1 parent 5fca395 commit 4b595af
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mozmill/setup.py
Expand Up @@ -11,7 +11,7 @@
deps = ['jsbridge == 3.1-dev',
'ManifestDestiny == 0.5.7',
'mozinfo == 0.7',
'mozrunner == 5.33',
'mozrunner == 5.34',
]

# take description from README
Expand Down
Expand Up @@ -47,7 +47,7 @@ function testFailureWithRestart() {
// Bug 886360
// User shutdown tests are currently not supported
// persisted.state.next = "testFailureWithUserRestart";
persisted.state.next = "testPassWithShutdown";
persisted.state.next = "testFailureWithShutdown";
persisted.state.restart = true;

assert.fail("A failing assertion with restarting the application has to be counted.");
Expand Down
@@ -0,0 +1,2 @@
[test1.js]
[test2.js]
@@ -0,0 +1,17 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

"use strict";

function setupTest(aModule) {
aModule.controller = mozmill.getBrowserController();
}

function test1() {
controller.restartApplication("test2");
}

function test2() {
controller.stopApplication(true);
}
@@ -0,0 +1,9 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

"use strict";

function test1() {
expect.pass();
}
8 changes: 6 additions & 2 deletions mutt/mutt/tests/python/test_restart.py
Expand Up @@ -37,11 +37,15 @@ def do_test(self, test_path=None, manifest_path=None,

def test_failures_with_restart(self):
testpath = os.path.join("js-modules", "restartTests", "testCountTestFailures.js")
self.do_test(test_path=testpath, fails=4)
self.do_test(test_path=testpath, fails=3)

def test_passes_with_restart(self):
testpath = os.path.join("js-modules", "restartTests", "testCountTestPasses.js")
self.do_test(test_path=testpath, passes=4)
self.do_test(test_path=testpath, passes=3)

def test_restart_then_shutdown(self):
manifestpath = os.path.join("js-modules", "test_shutdownAfterRestart", "manifest.ini")
self.do_test(manifest_path=manifestpath, passes=3)

def test_skipped_with_restart(self):
testpath = os.path.join("js-modules", "restartTests", "testCountTestSkipped.js")
Expand Down

0 comments on commit 4b595af

Please sign in to comment.