Bug 762049 - Part 2: Make remaining tests both in-process and OOP. r=mounir

--HG--
rename : dom/browser-element/mochitest/test_browserFrameAlert.html => dom/browser-element/mochitest/browserElement_Alert.js
rename : dom/browser-element/mochitest/test_browserFrame5.html => dom/browser-element/mochitest/browserElement_DataURI.js
rename : dom/browser-element/mochitest/test_browserFrame9.html => dom/browser-element/mochitest/browserElement_GetScreenshot.js
rename : dom/browser-element/mochitest/test_browserFrame8.html => dom/browser-element/mochitest/browserElement_Iconchange.js
rename : dom/browser-element/mochitest/test_browserFrame_keyEvents.html => dom/browser-element/mochitest/browserElement_KeyEvents.js
rename : dom/browser-element/mochitest/test_browserFrame4.html => dom/browser-element/mochitest/browserElement_LoadEvents.js
rename : dom/browser-element/mochitest/test_browserFramePromptCheck.html => dom/browser-element/mochitest/browserElement_PromptCheck.js
rename : dom/browser-element/mochitest/test_browserFramePromptConfirm.html => dom/browser-element/mochitest/browserElement_PromptConfirm.js
rename : dom/browser-element/mochitest/test_browserFrame10.html => dom/browser-element/mochitest/browserElement_SetVisible.js
rename : dom/browser-element/mochitest/test_browserFrame6.html => dom/browser-element/mochitest/browserElement_Titlechange.js
rename : dom/browser-element/mochitest/test_browserFrame7.html => dom/browser-element/mochitest/browserElement_TopBarrier.js
This commit is contained in:
Justin Lebar 2012-06-09 12:05:31 -04:00
Родитель 76346bf211
Коммит 984477f5c3
39 изменённых файлов: 554 добавлений и 337 удалений

Просмотреть файл

@ -12,6 +12,10 @@ relativesrcdir = dom/browser-element/mochitest
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
# Note: browserFrameHelpers.js looks at the test's filename to determine
# whether the test should be OOP. "_oop_" signals OOP, "_inproc_" signals in
# process. Default is OOP.
_TEST_FILES = \
file_empty.html \
file_focus.html \
@ -19,18 +23,42 @@ _TEST_FILES = \
test_browserElement_NoAttr.html \
test_browserElement_NoPref.html \
test_browserElement_NoWhitelist.html \
test_browserFrame4.html \
test_browserFrame5.html \
test_browserFrame6.html \
test_browserFrame7.html \
test_browserFrame8.html \
test_browserFrame9.html \
test_browserFrame10.html \
test_browserFrame_keyEvents.html \
test_browserFrameAlert.html \
test_browserFramePromptCheck.html \
test_browserFramePromptConfirm.html \
test_browserFrameClose.html \
browserElement_LoadEvents.js \
test_browserElement_oop_LoadEvents.html \
test_browserElement_inproc_LoadEvents.html \
browserElement_DataURI.js \
test_browserElement_oop_DataURI.html \
test_browserElement_inproc_DataURI.html \
browserElement_Titlechange.js \
test_browserElement_oop_Titlechange.html \
test_browserElement_inproc_Titlechange.html \
browserElement_TopBarrier.js \
test_browserElement_oop_TopBarrier.html \
test_browserElement_inproc_TopBarrier.html \
browserElement_Iconchange.js \
test_browserElement_oop_Iconchange.html \
test_browserElement_inproc_Iconchange.html \
browserElement_GetScreenshot.js \
test_browserElement_oop_GetScreenshot.html \
test_browserElement_inproc_GetScreenshot.html \
browserElement_SetVisible.js \
test_browserElement_oop_SetVisible.html \
test_browserElement_inproc_SetVisible.html \
browserElement_KeyEvents.js \
test_browserElement_oop_KeyEvents.html \
test_browserElement_inproc_KeyEvents.html \
browserElement_Alert.js \
test_browserElement_oop_Alert.html \
test_browserElement_inproc_Alert.html \
browserElement_PromptCheck.js \
test_browserElement_oop_PromptCheck.html \
test_browserElement_inproc_PromptCheck.html \
browserElement_PromptConfirm.js \
test_browserElement_oop_PromptConfirm.html \
test_browserElement_inproc_PromptConfirm.html \
browserElement_Close.js \
test_browserElement_oop_Close.html \
test_browserElement_inproc_Close.html \
$(NULL)
libs:: $(_TEST_FILES)

Просмотреть файл

@ -1,22 +1,4 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=741587
-->
<head>
<title>Test for Bug 741587</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=741587">Mozilla Bug 741587</a>
<!--
Test that alert works.
-->
<script type="application/javascript;version=1.7">
// Test that alert works.
"use strict";
SimpleTest.waitForExplicitFinish();
@ -175,6 +157,4 @@ function waitForPendingTests(next) {
}
runTest();
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,22 @@
// Test that window.close() works.
"use strict";
SimpleTest.waitForExplicitFinish();
function runTest() {
browserFrameHelpers.setEnabledPref(true);
browserFrameHelpers.addToWhitelist();
var iframe = document.createElement('iframe');
iframe.mozbrowser = true;
document.body.appendChild(iframe);
iframe.addEventListener("mozbrowserclose", function(e) {
ok(true, "got mozbrowserclose event.");
SimpleTest.finish();
});
iframe.src = "data:text/html,<html><body><script>window.close()</scr"+"ipt></body></html>";
}
runTest();

Просмотреть файл

@ -1,23 +1,6 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=720157
-->
<head>
<title>Test for Bug 720157</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=720157">Mozilla Bug 720157</a>
<!--
Test that data: URIs work with mozbrowserlocationchange events.
-->
<script type="application/javascript;version=1.7">
// Test that data: URIs work with mozbrowserlocationchange events.
"use strict";
SimpleTest.waitForExplicitFinish();
function runTest() {
@ -27,13 +10,17 @@ function runTest() {
var iframe1 = document.createElement('iframe');
iframe1.mozbrowser = true;
iframe1.id = 'iframe1';
iframe1.addEventListener('mozbrowserloadend', function() {
iframe1.removeEventListener('mozbrowserloadend', arguments.callee);
iframe1.addEventListener('mozbrowserloadend', function if1_loadend() {
iframe1.removeEventListener('mozbrowserloadend', if1_loadend);
ok(true, 'Got first loadend event.');
SimpleTest.executeSoon(runTest2);
});
iframe1.src = browserFrameHelpers.emptyPage1;
document.body.appendChild(iframe1);
var iframe2 = document.createElement('iframe');
iframe2.id = 'iframe2';
document.body.appendChild(iframe2);
}
function runTest2() {
@ -77,10 +64,3 @@ function runTest2() {
}
addEventListener('load', function() { SimpleTest.executeSoon(runTest); });
</script>
<iframe id='iframe2'></iframe>
</body>
</html>

Просмотреть файл

@ -1,23 +1,4 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=753595
-->
<head>
<title>Test for Bug 753595</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=753595">Mozilla Bug 753595</a>
<!--
Test the getScreenshot property for mozbrowser
-->
<script type="application/javascript;version=1.7">
// Test the getScreenshot property for mozbrowser
"use strict";
SimpleTest.waitForExplicitFinish();
@ -89,7 +70,4 @@ function runTest() {
addEventListener('load', function() { SimpleTest.executeSoon(runTest); });
</script>
</body>
</html>

Просмотреть файл

@ -1,23 +1,4 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=719461
-->
<head>
<title>Test for Bug 719461</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=719461">Mozilla Bug 719461</a>
<!--
Test that the onmozbrowsericonchange event works.
-->
<script type="application/javascript;version=1.7">
// Test that the onmozbrowsericonchange event works.
"use strict";
SimpleTest.waitForExplicitFinish();
@ -123,8 +104,3 @@ function runTest() {
}
addEventListener('load', function() { SimpleTest.executeSoon(runTest); });
</script>
</body>
</html>

Просмотреть файл

@ -1,24 +1,5 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=757486
-->
<head>
<title>Test for Bug 757486</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=757486">Mozilla Bug 757486</a>
<!--
Test that an iframe with the |mozbrowser| attribute does bubble some
whitelisted key events.
-->
<script type="application/javascript;version=1.7">
// Test that an iframe with the |mozbrowser| attribute does bubble some
// whitelisted key events.
"use strict";
let Ci = Components.interfaces;
@ -93,7 +74,3 @@ SimpleTest.waitForFocus(function() {
SimpleTest.executeSoon(runTest);
});
</script>
</body>
</html>

Просмотреть файл

@ -1,27 +1,7 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=710231
-->
<head>
<title>Test for Bug 710231</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=710231">Mozilla Bug 710231</a>
<!--
Test that an iframe with the |mozbrowser| attribute emits
mozbrowserX events when this page is in the whitelist.
-->
<script type="application/javascript;version=1.7">
// Bug 740626: This test fails on Windows XP
if (navigator.userAgent.indexOf("Windows NT 5.1") == -1) {
// Test that an iframe with the |mozbrowser| attribute emits mozbrowserloadX
// events when this page is in the whitelist.
"use strict";
SimpleTest.waitForExplicitFinish();
function runTest() {
@ -46,6 +26,7 @@ function runTest() {
ok(e.isTrusted, 'Event should be trusted.');
ok(!seenLoadEnd, 'loadstart before loadend.');
ok(!seenLoadStart, 'Just one loadstart event.');
ok(!seenLocationChange, 'loadstart before locationchange.');
seenLoadStart = true;
}
@ -132,13 +113,3 @@ function runTest2() {
}
addEventListener('load', function() { SimpleTest.executeSoon(runTest); });
}
else {
ok(true, "Somebody thought it was a great idea to make me type this.");
}
</script>
</body>
</html>

Просмотреть файл

@ -1,27 +1,9 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=741587
-->
<head>
<title>Test for Bug 741587</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=741587">Mozilla Bug 741587</a>
<!--
Test that alertCheck (i.e., alert with the opportunity to opt out of future
alerts), promptCheck, and confirmCheck work. We do this by spamming
alerts/prompts/confirms from inside an <iframe mozbrowser>.
At the moment, we treat alertCheck/promptCheck/confirmCheck just like a
normal alert. But it's different to nsIPrompt!
-->
<script type="application/javascript;version=1.7">
// Test that alertCheck (i.e., alert with the opportunity to opt out of future
// alerts), promptCheck, and confirmCheck work. We do this by spamming
// alerts/prompts/confirms from inside an <iframe mozbrowser>.
//
// At the moment, we treat alertCheck/promptCheck/confirmCheck just like a
// normal alert. But it's different to nsIPrompt!
"use strict";
SimpleTest.waitForExplicitFinish();
@ -77,7 +59,3 @@ iframe.src =
for (; i < 20; i++) { confirm(i); } \
for (; i < 30; i++) { prompt(i); } \
</scr' + 'ipt></body></html>';
</script>
</body>
</html>

Просмотреть файл

@ -1,26 +1,8 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=741587
-->
<head>
<title>Test for Bug 741587</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=741587">Mozilla Bug 741587</a>
<!--
Test that prompt and confirm work. In particular, we're concerned that we
get correct return values out of them.
We use alert() to communicate the return values of prompt/confirm back to
ourselves.
-->
<script type="application/javascript;version=1.7">
// Test that prompt and confirm work. In particular, we're concerned that we
// get correct return values out of them.
//
// We use alert() to communicate the return values of prompt/confirm back to
// ourselves.
"use strict";
SimpleTest.waitForExplicitFinish();
@ -101,6 +83,3 @@ function runTest() {
}
runTest();
</script>
</body>
</html>

Просмотреть файл

@ -1,22 +1,5 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=702880
-->
<head>
<title>Test for Bug 702880</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=753595">Mozilla Bug 702880</a>
<!--
Test the setVisible property for mozbrowser
-->
<script type="application/javascript;version=1.7">
// Test the setVisible property for mozbrowser
"use strict";
SimpleTest.waitForExplicitFinish();
@ -72,7 +55,4 @@ function runTest() {
addEventListener('load', function() { SimpleTest.executeSoon(runTest); });
</script>
</body>
</html>

Просмотреть файл

@ -1,22 +1,4 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=720157
-->
<head>
<title>Test for Bug 720157</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=720157">Mozilla Bug 720157</a>
<!--
Test that the onmozbrowsertitlechange event works.
-->
<script type="application/javascript;version=1.7">
// Test that the onmozbrowsertitlechange event works.
"use strict";
SimpleTest.waitForExplicitFinish();
@ -83,7 +65,4 @@ function runTest() {
addEventListener('load', function() { SimpleTest.executeSoon(runTest); });
</script>
</body>
</html>

Просмотреть файл

@ -1,22 +1,4 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=725796
-->
<head>
<title>Test for Bug 725796</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=725796">Mozilla Bug 725796</a>
<!--
Test that an <iframe mozbrowser> is a window.{top,parent,frameElement} barrier.
-->
<script type="application/javascript;version=1.7">
// Test that an <iframe mozbrowser> is a window.{top,parent,frameElement} barrier.
"use strict";
browserFrameHelpers.setEnabledPref(true);
@ -90,7 +72,3 @@ function waitForMessages(num) {
}
runTest();
</script>
</body>
</html>

Просмотреть файл

@ -120,15 +120,19 @@ browserFrameHelpers.origPageThumbsEnabledPref = browserFrameHelpers.getPageThumb
// Disable tab view; it seriously messes us up.
browserFrameHelpers.setPageThumbsEnabledPref(false);
// OOP by default, except on Windows, where OOP doesn't work.
browserFrameHelpers.setOOPByDefaultPref(true);
if (navigator.platform.indexOf('Win') != -1) {
browserFrameHelpers.setOOPDisabledPref(true);
// Enable or disable OOP depending on the test's filename.
var oop;
if (location.pathname.indexOf("_inproc_") != -1) {
oop = false;
}
else {
browserFrameHelpers.setOOPDisabledPref(false);
// oop by default
oop = true;
}
browserFrameHelpers.setOOPByDefaultPref(oop);
browserFrameHelpers.setOOPDisabledPref(false);
addEventListener('unload', function() {
browserFrameHelpers.restoreOriginalPrefs();
});

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=741587
-->
<head>
<title>Test for Bug 741587</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=741587">Mozilla Bug 741587</a>
<script type="application/javascript;version=1.7" src="browserElement_Alert.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=757182
-->
<head>
<title>Test for Bug 757182</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=757182">Mozilla Bug 757182</a>
<script type="application/javascript;version=1.7" src="browserElement_Close.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=720157
-->
<head>
<title>Test for Bug 720157</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=720157">Mozilla Bug 720157</a>
<script type='application/javascript;version=1.7' src='browserElement_DataURI.js'></script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=753595
-->
<head>
<title>Test for Bug 753595</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=753595">Mozilla Bug 753595</a>
<script type="application/javascript;version=1.7" src='browserElement_GetScreenshot.js'>
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=719461
-->
<head>
<title>Test for Bug 719461</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=719461">Mozilla Bug 719461</a>
<script type="application/javascript;version=1.7" src="browserElement_Iconchange.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=757486
-->
<head>
<title>Test for Bug 757486</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=757486">Mozilla Bug 757486</a>
<script type="application/javascript;version=1.7" src="browserElement_KeyEvents.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=710231
-->
<head>
<title>Test for Bug 710231</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=710231">Mozilla Bug 710231</a>
<script type="application/javascript;version1.7" src="browserElement_LoadEvents.js"></script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=741587
-->
<head>
<title>Test for Bug 741587</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=741587">Mozilla Bug 741587</a>
<script type="application/javascript;version=1.7" src="browserElement_PromptCheck.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=741587
-->
<head>
<title>Test for Bug 741587</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=741587">Mozilla Bug 741587</a>
<script type="application/javascript;version=1.7" src="browserElement_PromptConfirm.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=702880
-->
<head>
<title>Test for Bug 702880</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=753595">Mozilla Bug 702880</a>
<script type="application/javascript;version=1.7" src='browserElement_SetVisible.js'>
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=720157
-->
<head>
<title>Test for Bug 720157</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=720157">Mozilla Bug 720157</a>
<script type="application/javascript;version=1.7" src='browserElement_Titlechange.js'>
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,21 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=725796
-->
<head>
<title>Test for Bug 725796</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=725796">Mozilla Bug 725796</a>
<script type="application/javascript;version=1.7" src="browserElement_TopBarrier.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=741587
-->
<head>
<title>Test for Bug 741587</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=741587">Mozilla Bug 741587</a>
<script type="application/javascript;version=1.7" src="browserElement_Alert.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=757182
-->
<head>
<title>Test for Bug 757182</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=757182">Mozilla Bug 757182</a>
<script type="application/javascript;version=1.7" src="browserElement_Close.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=720157
-->
<head>
<title>Test for Bug 720157</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=720157">Mozilla Bug 720157</a>
<script type='application/javascript;version=1.7' src='browserElement_DataURI.js'></script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=753595
-->
<head>
<title>Test for Bug 753595</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=753595">Mozilla Bug 753595</a>
<script type="application/javascript;version=1.7" src='browserElement_GetScreenshot.js'>
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=719461
-->
<head>
<title>Test for Bug 719461</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=719461">Mozilla Bug 719461</a>
<script type="application/javascript;version=1.7" src="browserElement_Iconchange.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=757486
-->
<head>
<title>Test for Bug 757486</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=757486">Mozilla Bug 757486</a>
<script type="application/javascript;version=1.7" src="browserElement_KeyEvents.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=710231
-->
<head>
<title>Test for Bug 710231</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=710231">Mozilla Bug 710231</a>
<script type="application/javascript;version1.7" src="browserElement_LoadEvents.js"></script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=741587
-->
<head>
<title>Test for Bug 741587</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=741587">Mozilla Bug 741587</a>
<script type="application/javascript;version=1.7" src="browserElement_PromptCheck.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,18 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=741587
-->
<head>
<title>Test for Bug 741587</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=741587">Mozilla Bug 741587</a>
<script type="application/javascript;version=1.7" src="browserElement_PromptConfirm.js">
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=702880
-->
<head>
<title>Test for Bug 702880</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=753595">Mozilla Bug 702880</a>
<script type="application/javascript;version=1.7" src='browserElement_SetVisible.js'>
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,19 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=720157
-->
<head>
<title>Test for Bug 720157</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=720157">Mozilla Bug 720157</a>
<script type="application/javascript;version=1.7" src='browserElement_Titlechange.js'>
</script>
</body>
</html>

Просмотреть файл

@ -0,0 +1,20 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=725796
-->
<head>
<title>Test for Bug 725796</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=725796">Mozilla Bug 725796</a>
<script type="application/javascript;version=1.7" src="browserElement_TopBarrier.js">
</script>
</body>
</html>

Просмотреть файл

@ -1,43 +0,0 @@
<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=757182
-->
<head>
<title>Test for Bug 757182</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript" src="browserFrameHelpers.js"></script>
<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=757182">Mozilla Bug 757182</a>
<!--
Test that window.close() works.
-->
<script type="application/javascript;version=1.7">
"use strict";
SimpleTest.waitForExplicitFinish();
function runTest() {
browserFrameHelpers.setEnabledPref(true);
browserFrameHelpers.addToWhitelist();
var iframe = document.createElement('iframe');
iframe.mozbrowser = true;
document.body.appendChild(iframe);
iframe.addEventListener("mozbrowserclose", function(e) {
ok(true, "got mozbrowserclose event.");
SimpleTest.finish();
});
iframe.src = "data:text/html,<html><body><script>window.close()</scr"+"ipt></body></html>";
}
runTest();
</script>
</body>
</html>