From 24df8222d0c76420bb090b89783d836a563f2aa5 Mon Sep 17 00:00:00 2001 From: "Carsten \"Tomcat\" Book" Date: Thu, 19 Feb 2015 15:02:05 +0100 Subject: [PATCH] Backed out changeset 6885e993936a (bug 1056851) for crashtest failures --- .../tests/mochitest/elm/test_canvas.html | 11 ++-- .../hittest/test_canvas_hitregion.html | 10 ++-- docshell/test/navigation/test_bug430723.html | 8 +-- dom/apps/tests/test_app_update.html | 14 ++++-- dom/base/test/test_EventSource_redirects.html | 7 +-- dom/base/test/test_bug666604.html | 20 ++++++-- dom/base/test/test_bug715041.xul | 5 +- dom/base/test/test_bug715041_removal.xul | 6 ++- .../test_child_process_shutdown_message.html | 18 +++++-- .../test_messagemanager_assertpermission.html | 7 ++- .../test_websocket_permessage_deflate.html | 10 ++-- .../mochitest/priority/test_Preallocated.html | 16 ++++-- ..._composite_canvaspattern_setTransform.html | 5 +- dom/canvas/test/test_canvas_path.html | 6 +-- dom/canvas/test/test_hitregion_canvas.html | 8 +-- dom/datastore/tests/test_app_install.html | 10 ++-- dom/datastore/tests/test_arrays.html | 3 +- dom/datastore/tests/test_basic.html | 3 +- dom/datastore/tests/test_basic_worker.html | 3 +- dom/datastore/tests/test_bug1008044.html | 3 +- dom/datastore/tests/test_bug1058108.html | 3 +- dom/datastore/tests/test_bug924104.html | 3 +- dom/datastore/tests/test_bug957086.html | 3 +- dom/datastore/tests/test_bug976311.html | 3 +- dom/datastore/tests/test_certifiedApp.html | 3 +- dom/datastore/tests/test_duplicate.html | 3 +- dom/datastore/tests/test_keys.html | 3 +- dom/datastore/tests/test_oop.html | 3 +- dom/datastore/tests/test_oop_events.html | 3 +- dom/datastore/tests/test_readonly.html | 19 +++---- dom/datastore/tests/test_sync.html | 3 +- dom/datastore/tests/test_sync_worker.html | 3 +- dom/datastore/tests/test_transactions.html | 3 +- dom/datastore/tests/test_worker_close.html | 3 +- dom/events/test/test_bug422132.html | 13 +++-- dom/events/test/test_bug563329.html | 22 ++++++-- dom/events/test/test_bug574663.html | 28 ++++++++--- dom/events/test/test_bug607464.html | 26 ++++++++-- dom/events/test/test_bug822898.html | 16 +++++- dom/html/test/file_fullscreen-api.html | 34 +++++++------ dom/html/test/file_fullscreen-denied.html | 38 +++++++------- .../file_fullscreen-esc-context-menu.html | 6 +-- .../forms/test_input_number_key_events.html | 10 ++-- .../forms/test_input_radio_radiogroup.html | 43 +++++++--------- .../forms/test_input_range_key_events.html | 8 +-- .../test/forms/test_input_range_rounding.html | 11 ++-- dom/html/test/forms/test_radio_in_label.html | 39 +++++++-------- .../test/forms/test_valueAsDate_pref.html | 7 ++- dom/html/test/test_bug369370.html | 15 +++--- dom/html/test/test_bug633058.html | 8 +-- dom/html/test/test_bug674558.html | 7 ++- dom/html/test/test_fullscreen-api.html | 21 +++++--- .../test_networkstats_enabled_no_perm.html | 42 ++++++++-------- .../tests/test_tcpsocket_enabled_no_perm.html | 22 ++++---- .../test_tcpsocket_enabled_with_perm.html | 15 +++--- dom/requestsync/tests/test_basic_app.html | 3 +- dom/tests/mochitest/bugs/test_bug265203.html | 10 ++-- .../test_MozEnteredDomFullscreen_event.xul | 14 +++--- .../chrome/test_clipboard_events_chrome.html | 8 +-- .../general/test_clipboard_events.html | 1 + .../mochitest/general/test_vibrator.html | 27 ++++++---- .../localstorage/test_appIsolation.html | 23 +++++++-- .../mochitest/test_tv_non_permitted_app.html | 3 +- dom/xul/test/test_bug757137.xul | 41 +++++++++------ editor/libeditor/tests/test_bug549262.html | 9 ++-- editor/libeditor/tests/test_bug578771.html | 24 ++++----- editor/libeditor/tests/test_bug640321.html | 20 ++++---- editor/libeditor/tests/test_bug645914.html | 12 +++-- editor/libeditor/tests/test_bug674770-1.html | 7 ++- editor/libeditor/tests/test_bug674770-2.html | 50 +++++++++++-------- editor/libeditor/tests/test_bug795785.html | 7 +-- .../test_permissionmanager_app_isolation.html | 28 ++++++++--- image/test/crashtests/ownerdiscard.html | 8 +-- .../test_SpecialPowersExtension.html | 1 + .../passwordmgr/test/test_basic_form_2.html | 12 +++-- ...est_basic_form_observer_autofillForms.html | 12 +++-- .../test_allowlisted_annotations.html | 9 ++-- .../chrome/test_preferences_beforeaccept.xul | 10 +++- widget/tests/test_assign_event_data.html | 42 +++++++++++----- widget/tests/test_imestate.html | 5 +- 80 files changed, 636 insertions(+), 412 deletions(-) diff --git a/accessible/tests/mochitest/elm/test_canvas.html b/accessible/tests/mochitest/elm/test_canvas.html index 1082b4ab74b..d1245ba1bbe 100644 --- a/accessible/tests/mochitest/elm/test_canvas.html +++ b/accessible/tests/mochitest/elm/test_canvas.html @@ -18,6 +18,8 @@ src="../layout.js"> + addA11yLoadEvent(doTest); + diff --git a/accessible/tests/mochitest/hittest/test_canvas_hitregion.html b/accessible/tests/mochitest/hittest/test_canvas_hitregion.html index fe1a5384613..5fc12c9a85d 100644 --- a/accessible/tests/mochitest/hittest/test_canvas_hitregion.html +++ b/accessible/tests/mochitest/hittest/test_canvas_hitregion.html @@ -13,6 +13,8 @@ src="../layout.js"> + addA11yLoadEvent(doTest); + diff --git a/docshell/test/navigation/test_bug430723.html b/docshell/test/navigation/test_bug430723.html index 55dd9f13c62..ee9da6d160f 100644 --- a/docshell/test/navigation/test_bug430723.html +++ b/docshell/test/navigation/test_bug430723.html @@ -37,6 +37,7 @@ var gTallBlueBoxURI = "data:text/html;charset=utf-8;base64,PGh0bWw%2BPGhlYWQ%2BP //

This is a very tall blue box.

// + window.onload = runTest; var testWindow; @@ -44,9 +45,8 @@ var testNum = 0; var smoothScrollPref = "general.smoothScroll"; function runTest() { - SpecialPowers.pushPrefEnv({"set":[[smoothScrollPref, false]]}, function(){ - testWindow = window.open(gTallRedBoxURI, "testWindow", "width=300,height=300,location=yes,scrollbars=yes"); - }); + SpecialPowers.setBoolPref(smoothScrollPref, false); + testWindow = window.open(gTallRedBoxURI, "testWindow", "width=300,height=300,location=yes,scrollbars=yes"); } var nextTest =function() { @@ -124,6 +124,7 @@ var step3 =function() { "Page2Again: Ensure we can still scroll."); testWindow.close(); + SpecialPowers.clearUserPref(smoothScrollPref); window.SimpleTest.finish(); }, true); sendKey('DOWN', testWindow); @@ -136,3 +137,4 @@ SimpleTest.waitForExplicitFinish(); + diff --git a/dom/apps/tests/test_app_update.html b/dom/apps/tests/test_app_update.html index c7e922edbca..8a2feb78dab 100644 --- a/dom/apps/tests/test_app_update.html +++ b/dom/apps/tests/test_app_update.html @@ -18,13 +18,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=826058 var gHostedManifestURL = gBaseURL + 'file_app.sjs?apptype=hosted&getmanifest=true'; var gCachedManifestURL = gBaseURL + 'file_app.sjs?apptype=cached&getmanifest=true'; var gTrustedManifestURL = gBaseURL + 'file_app.sjs?apptype=trusted&getmanifest=true'; - var gGenerator; + var gGenerator = runTest(); + // We need to set the trusted hosted app csp pref since it's only in // b2g.js for now. function setCSPPrefs() { - SpecialPowers.pushPrefEnv({'set':[["security.apps.trusted.CSP.default", -"default-src *; object-src 'none'"], ["dom.mozBrowserFramesEnabled",true]]}, - function() { gGenerator = runTest(); gGenerator.next(); }); + SpecialPowers.pushPrefEnv({'set': + [["security.apps.trusted.CSP.default", + "default-src *; object-src 'none'"]]}, + function() { gGenerator.next(); }); } function go() { @@ -62,7 +64,10 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=826058 function runTest() { // Set up. + SpecialPowers.setAllAppsLaunchable(true); + SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true); + // Test Bug 927699 - navigator.mozApps.install(url) lets NS_ERROR_FAILURE // onto the web var request = navigator.mozApps.install(""); @@ -319,6 +324,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=826058 } function finish() { + SpecialPowers.clearUserPref("dom.mozBrowserFramesEnabled"); SimpleTest.finish(); } diff --git a/dom/base/test/test_EventSource_redirects.html b/dom/base/test/test_EventSource_redirects.html index c57c501e1e0..0d18fa4706a 100644 --- a/dom/base/test/test_EventSource_redirects.html +++ b/dom/base/test/test_EventSource_redirects.html @@ -22,6 +22,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=716841 function doTest(test_id) { oldPrefVal = SpecialPowers.getBoolPref("dom.server-events.enabled"); + SpecialPowers.setBoolPref("dom.server-events.enabled", true); + ok(true, "here we go"); source = new EventSource("eventsource_redirect.resource"); @@ -47,9 +49,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=716841 } SimpleTest.waitForExplicitFinish(); - addLoadEvent(function() { - SpecialPowers.pushPrefEnv({"set": [['dom.server-events.enabled', true]]}, doTest); - }); + addLoadEvent(doTest); + diff --git a/dom/base/test/test_bug666604.html b/dom/base/test/test_bug666604.html index 4f73c4075cd..fc78ec4b477 100644 --- a/dom/base/test/test_bug666604.html +++ b/dom/base/test/test_bug666604.html @@ -108,32 +108,44 @@ function test6() { activationListener = function() { ok(true, "Untrusted DOMActivate should activate a link"); - SpecialPowers.pushPrefEnv({"set":[["dom.disable_open_during_load", false]]}, test7); + test7(); } dispatchDOMActivate(testlink); } +var oldPref; function test7() { + oldPref = SpecialPowers.getBoolPref("dom.disable_open_during_load"); + SpecialPowers.setBoolPref("dom.disable_open_during_load", false); testlink.href = "javascript:opener.activationListener(); window.close();"; testlink.target = "_blank"; activationListener = function() { ok(true, "Click() should activate a link"); - SpecialPowers.pushPrefEnv({"set":[["dom.disable_open_during_load", true]]}, test8); + setTimeout(test8, 0); } testlink.click(); } function test8() { + SpecialPowers.setBoolPref("dom.disable_open_during_load", true); testlink.href = "javascript:opener.activationListener(); window.close();"; testlink.target = "_blank"; activationListener = function() { ok(false, "Click() should not activate a link"); + setTimeout(test9, 0); } - testlink.click(); - SimpleTest.executeSoon(SimpleTest.finish); + testlink.click(); + hitEventLoop(10, test9); +} + + +function test9() { + SpecialPowers.setBoolPref("dom.disable_open_during_load", oldPref); + SimpleTest.finish(); } + addLoadEvent(test1); diff --git a/dom/base/test/test_bug715041.xul b/dom/base/test/test_bug715041.xul index c269b461b2d..89dddd11ba3 100644 --- a/dom/base/test/test_bug715041.xul +++ b/dom/base/test/test_bug715041.xul @@ -19,6 +19,8 @@ target="_blank">Mozilla Bug 715041 Mozilla Bug 715041 AddShiftLocalEnabled = true; AddIdleObserverWithInvalidTimeEnabled = false; - SpecialPowers.pushPrefEnv({"set":[['dom.idle-observers-api.fuzz_time.disabled', true]]}, caseZero); + caseZero(); + ]]> diff --git a/dom/base/test/test_bug715041_removal.xul b/dom/base/test/test_bug715041_removal.xul index 1a61ed83d6f..2b77dd5949d 100644 --- a/dom/base/test/test_bug715041_removal.xul +++ b/dom/base/test/test_bug715041_removal.xul @@ -19,6 +19,8 @@ target="_blank">Mozilla Bug 715041 Mozilla Bug 715041 var RemoveHeadAfterLastLocalFiredEnabled = true; var RemoveHeadIdleObserverWhileIdleCase1Enabled = true; var RemoveLastAddLastEnabled = true; - SpecialPowers.pushPrefEnv({"set":[['dom.idle-observers-api.fuzz_time.disabled', true]]}, RemoveHeadIdleObserverWhileActive); + + RemoveHeadIdleObserverWhileActive(); + ]]> diff --git a/dom/base/test/test_child_process_shutdown_message.html b/dom/base/test/test_child_process_shutdown_message.html index ab785c21f29..e58bcc057cb 100644 --- a/dom/base/test/test_child_process_shutdown_message.html +++ b/dom/base/test/test_child_process_shutdown_message.html @@ -117,13 +117,15 @@ function expectFrameProcessShutdown(iframe, frameMM, processMM, callback) { } function setUp() { + SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true); + SpecialPowers.setBoolPref("dom.ipc.browser_frames.oop_by_default", true); SpecialPowers.addPermission("browser", true, window.document); SpecialPowers.addPermission("embed-apps", true, window.document); - // TODO: remove network.disable.ipc.security in bug 820712 - SpecialPowers.pushPrefEnv({ - "set": [['dom.mozBrowserFramesEnabled', true], - ['dom.ipc.browser_frames.oop_by_default', true], - ['network.disable.ipc.security', true]]}, runNextTest); + + // TODO: remove in bug 820712 + SpecialPowers.setBoolPref("network.disable.ipc.security", true); + + runNextTest(); } function makeKillTest(isApp) function testKill() { @@ -145,6 +147,12 @@ function makeKillTest(isApp) function testKill() { } function tearDown() { + SpecialPowers.clearUserPref("dom.mozBrowserFramesEnabled"); + SpecialPowers.clearUserPref("dom.ipc.browser_frames.oop_by_default"); + + // TODO: remove in bug 820712 + SpecialPowers.clearUserPref("network.disable.ipc.security"); + SimpleTest.finish(); } diff --git a/dom/base/test/test_messagemanager_assertpermission.html b/dom/base/test/test_messagemanager_assertpermission.html index 2a5becb6801..df3f9af46aa 100644 --- a/dom/base/test/test_messagemanager_assertpermission.html +++ b/dom/base/test/test_messagemanager_assertpermission.html @@ -27,6 +27,8 @@ let gAppsService = SpecialPowers.Cc["@mozilla.org/AppsService;1"] .getService(SpecialPowers.Ci.nsIAppsService); function setUp() { + SpecialPowers.setBoolPref("dom.mozBrowserFramesEnabled", true); + SpecialPowers.setBoolPref("dom.ipc.browser_frames.oop_by_default", true); SpecialPowers.addPermission("browser", true, window.document); SpecialPowers.addPermission("embed-apps", true, window.document); @@ -34,8 +36,7 @@ function setUp() { SpecialPowers.addPermission("foobar", true, { url: APP_URL, appId: appId, isInBrowserElement: false }); - SpecialPowers.pushPrefEnv({"set":[['dom.mozBrowserFramesEnabled', true], - ['dom.ipc.browser_frames.oop_by_default', true]]}, runNextTest); + runNextTest(); } /** @@ -167,6 +168,8 @@ function testChildProcessMessageManager() { } function tearDown() { + SpecialPowers.clearUserPref("dom.mozBrowserFramesEnabled"); + SpecialPowers.clearUserPref("dom.ipc.browser_frames.oop_by_default"); SimpleTest.finish(); } diff --git a/dom/base/test/test_websocket_permessage_deflate.html b/dom/base/test/test_websocket_permessage_deflate.html index 83504b6c52f..e2d70aa6acf 100644 --- a/dom/base/test/test_websocket_permessage_deflate.html +++ b/dom/base/test/test_websocket_permessage_deflate.html @@ -5,7 +5,7 @@ - + Mozilla Bug