merge fx-team to mozilla-central a=merge
authorCarsten "Tomcat" Book <cbook@mozilla.com>
Thu, 27 Nov 2014 12:59:50 +0100
changeset 242140 7dfad34d265b2cf21bd2c470ba6f6f526af3b663
parent 242136 8d185a31024ef4fe1dec9df564ef64ab7e49acf9 (current diff)
parent 242139 679466398b30c66fc38b12d031ea184ee42c3db6 (diff)
child 242158 9d533f7027b7024f7977b9acecd198b02368e6c4
child 242176 02c38fde676cdf87066d13165c64c9c2ab7f490e
child 242208 20484aaa49cf34256ee0a1d6029308507a74761c
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmerge
milestone36.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
merge fx-team to mozilla-central a=merge
--- a/browser/base/content/test/general/browser_alltabslistener.js
+++ b/browser/base/content/test/general/browser_alltabslistener.js
@@ -76,23 +76,24 @@ var gAllProgressListener = {
     is(state, gAllNotifications[gAllNotificationsPos], "Got a notification for the all notifications listener");
     gAllNotificationsPos++;
   }
 }
 
 var gFrontNotifications, gAllNotifications, gFrontNotificationsPos, gAllNotificationsPos;
 var gBackgroundTab, gForegroundTab, gBackgroundBrowser, gForegroundBrowser, gTestBrowser;
 var gTestPage = "/browser/browser/base/content/test/general/alltabslistener.html";
+const kBasePage = "http://example.org/browser/browser/base/content/test/general/dummy_page.html";
 var gNextTest;
 
 function test() {
   waitForExplicitFinish();
 
-  gBackgroundTab = gBrowser.addTab("about:blank");
-  gForegroundTab = gBrowser.addTab("about:blank");
+  gBackgroundTab = gBrowser.addTab(kBasePage);
+  gForegroundTab = gBrowser.addTab(kBasePage);
   gBackgroundBrowser = gBrowser.getBrowserForTab(gBackgroundTab);
   gForegroundBrowser = gBrowser.getBrowserForTab(gForegroundTab);
   gBrowser.selectedTab = gForegroundTab;
 
   // We must wait until the about:blank page has completed loading before
   // starting tests or we get notifications from that
   let promises = [
     waitForDocLoadComplete(gBackgroundBrowser),
--- a/testing/mochitest/mach_commands.py
+++ b/testing/mochitest/mach_commands.py
@@ -189,17 +189,17 @@ class MochitestRunner(MozbuildObject):
     def run_desktop_test(self, context, suite=None, test_paths=None, debugger=None,
         debugger_args=None, slowscript=False, screenshot_on_fail = False, shuffle=False, closure_behaviour='auto',
         rerun_failures=False, no_autorun=False, repeat=0, run_until_failure=False,
         slow=False, chunk_by_dir=0, total_chunks=None, this_chunk=None, extraPrefs=[],
         jsdebugger=False, debug_on_failure=False, start_at=None, end_at=None,
         e10s=False, content_sandbox='off', dmd=False, dump_output_directory=None,
         dump_about_memory_after_test=False, dump_dmd_after_test=False,
         install_extension=None, quiet=False, environment=[], app_override=None, bisectChunk=None, runByDir=False,
-        useTestMediaDevices=False, **kwargs):
+        useTestMediaDevices=False, timeout=None, **kwargs):
         """Runs a mochitest.
 
         test_paths are path to tests. They can be a relative path from the
         top source directory, an absolute filename, or a directory containing
         test files.
 
         suite is the type of mochitest to run. It can be one of ('plain',
         'chrome', 'browser', 'metro', 'a11y', 'jetpack-package', 'jetpack-addon').
@@ -320,16 +320,18 @@ class MochitestRunner(MozbuildObject):
         options.dumpDMDAfterTest = dump_dmd_after_test
         options.dumpOutputDirectory = dump_output_directory
         options.quiet = quiet
         options.environment = environment
         options.extraPrefs = extraPrefs
         options.bisectChunk = bisectChunk
         options.runByDir = runByDir
         options.useTestMediaDevices = useTestMediaDevices
+        if timeout:
+          options.timeout = int(timeout)
 
         options.failureFile = failure_file_path
         if install_extension != None:
             options.extensionsToInstall = [os.path.join(self.topsrcdir,install_extension)]
 
         for k, v in kwargs.iteritems():
             setattr(options, k, v)
 
@@ -564,16 +566,20 @@ def MochitestCommand(func):
 
     app_override = CommandArgument('--app-override', default=None, action='store',
         help="Override the default binary used to run tests with the path you provide, e.g. " \
             " --app-override /usr/bin/firefox . " \
             "If you have run ./mach package beforehand, you can specify 'dist' to " \
             "run tests against the distribution bundle's binary.");
     func = app_override(func)
 
+    timeout = CommandArgument('--timeout', default=None,
+        help='The per-test timeout time in seconds (default: 60 seconds)');
+    func = timeout(func)
+
     return func
 
 def B2GCommand(func):
     """Decorator that adds shared command arguments to b2g mochitest commands."""
 
     busybox = CommandArgument('--busybox', default=None,
         help='Path to busybox binary to install on device')
     func = busybox(func)