зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset e4a14eaefe1d (bug 841413) for mochitest orange.
This commit is contained in:
Родитель
b19879ed6d
Коммит
a1342b5b35
|
@ -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
|
||||
|
|
|
@ -5,11 +5,9 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=248970
|
|||
-->
|
||||
<head>
|
||||
<title>Test for Bug 248970</title>
|
||||
<script type="application/javascript"
|
||||
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<script type="text/javascript" src="notification_common.js"></script>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css">
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=248970">Mozilla Bug 248970</a>
|
||||
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче