From a1342b5b35c9f7ac6a3a9f9ed75ef4708f95d13e Mon Sep 17 00:00:00 2001 From: Ryan VanderMeulen Date: Tue, 5 Mar 2013 11:27:36 -0500 Subject: [PATCH] Backed out changeset e4a14eaefe1d (bug 841413) for mochitest orange. --- .../components/passwordmgr/test/Makefile.in | 18 ++++++------------ .../test/test_privbrowsing_perwindowpb.html | 19 +++++++------------ 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/toolkit/components/passwordmgr/test/Makefile.in b/toolkit/components/passwordmgr/test/Makefile.in index 46b735189be8..9385d5ddd047 100644 --- a/toolkit/components/passwordmgr/test/Makefile.in +++ b/toolkit/components/passwordmgr/test/Makefile.in @@ -48,6 +48,8 @@ MOCHITEST_FILES = \ test_maxforms_3.html \ test_notifications.html \ test_notifications_popup.html \ + privbrowsing_perwindowpb_iframe.html \ + test_privbrowsing_perwindowpb.html \ test_prompt_async.html \ test_xhr.html \ test_xml_load.html \ @@ -57,6 +59,10 @@ MOCHITEST_FILES = \ notification_common.js \ authenticate.sjs \ formsubmit.sjs \ + subtst_privbrowsing_1.html \ + subtst_privbrowsing_2.html \ + subtst_privbrowsing_3.html \ + subtst_privbrowsing_4.html \ subtst_master_pass.html \ subtst_notifications_1.html \ subtst_notifications_2.html \ @@ -79,18 +85,6 @@ MOCHITEST_FILES += \ $(NULL) endif -MOCHITEST_CHROME_FILES += \ - privbrowsing_perwindowpb_iframe.html \ - test_privbrowsing_perwindowpb.html \ - subtst_privbrowsing_1.html \ - subtst_privbrowsing_2.html \ - subtst_privbrowsing_3.html \ - subtst_privbrowsing_4.html \ - notification_common.js \ - pwmgr_common.js \ - formsubmit.sjs \ - $(NULL) - # This test doesn't pass because we can't ensure a cross-platform # event that occurs between DOMContentLoaded and Pageload # test_bug_221634.html diff --git a/toolkit/components/passwordmgr/test/test_privbrowsing_perwindowpb.html b/toolkit/components/passwordmgr/test/test_privbrowsing_perwindowpb.html index 24c894da57bf..c8bdef80b72a 100644 --- a/toolkit/components/passwordmgr/test/test_privbrowsing_perwindowpb.html +++ b/toolkit/components/passwordmgr/test/test_privbrowsing_perwindowpb.html @@ -5,11 +5,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=248970 --> Test for Bug 248970 - + - + Mozilla Bug 248970 @@ -20,11 +18,12 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=248970 /** Test for Bug 248970 **/ // based on test_notifications.html +netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect'); const Ci = Components.interfaces; const Cc = Components.classes; const Cr = Components.results; -var testpath = "/tests/toolkit/components/passwordmgr/test/"; +var testpath = document.location.pathname + "/../"; var prefix = "http://test2.example.com" + testpath; var subtests = [ "subtst_privbrowsing_1.html", // 1 @@ -196,17 +195,13 @@ function testOnWindow(aIsPrivate, aCallback) { win.addEventListener("load", function onLoad() { win.removeEventListener("load", onLoad, false); win.addEventListener("DOMContentLoaded", function onInnerLoad() { - if (win.content.location.href != contentPage) { + if (win.content.location.href == "about:privatebrowsing") { win.gBrowser.loadURI(contentPage); return; } win.removeEventListener("DOMContentLoaded", onInnerLoad, true); - - win.content.addEventListener('load', function innerLoad2() { - win.content.removeEventListener('load', innerLoad2, false); - testWindows.push(win); - SimpleTest.executeSoon(function() { aCallback(win); }); - }, false, true); + testWindows.push(win); + SimpleTest.executeSoon(function() { aCallback(win); }); }, true); SimpleTest.executeSoon(function() { win.gBrowser.loadURI(contentPage); }); }, true);