mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 809290 - Tests. r=bz
This commit is contained in:
parent
2c0fa15194
commit
2b8c345ee2
@ -130,6 +130,11 @@ MOCHITEST_FILES = \
|
|||||||
test_bug755320.html \
|
test_bug755320.html \
|
||||||
test_bug777628.html \
|
test_bug777628.html \
|
||||||
test_bug665548.html \
|
test_bug665548.html \
|
||||||
|
test_bug809290.html \
|
||||||
|
file_bug809290_b1.html \
|
||||||
|
file_bug809290_b2.html \
|
||||||
|
file_bug809290_c.html \
|
||||||
|
file_empty.html \
|
||||||
$(NULL)
|
$(NULL)
|
||||||
|
|
||||||
ifneq (Linux,$(OS_ARCH))
|
ifneq (Linux,$(OS_ARCH))
|
||||||
|
14
dom/tests/mochitest/bugs/file_bug809290_b1.html
Normal file
14
dom/tests/mochitest/bugs/file_bug809290_b1.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
function innerLoad() {
|
||||||
|
var win = document.getElementById('ifr').contentWindow;
|
||||||
|
win.location = "file_bug809290_c.html";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<iframe id="ifr" src="file_empty.html">
|
||||||
|
</body>
|
||||||
|
</html>
|
14
dom/tests/mochitest/bugs/file_bug809290_b2.html
Normal file
14
dom/tests/mochitest/bugs/file_bug809290_b2.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
function eventHandlerLoad() {
|
||||||
|
var win = document.getElementById('ifr').contentWindow;
|
||||||
|
win.location = "file_bug809290_c.html";
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body onload="eventHandlerLoad();">
|
||||||
|
<iframe id="ifr" src="file_empty.html">
|
||||||
|
</body>
|
||||||
|
</html>
|
10
dom/tests/mochitest/bugs/file_bug809290_c.html
Normal file
10
dom/tests/mochitest/bugs/file_bug809290_c.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<script>
|
||||||
|
window.parent.parent.notifyReferrer(document.referrer);
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
</body>
|
||||||
|
</html>
|
2
dom/tests/mochitest/bugs/file_empty.html
Normal file
2
dom/tests/mochitest/bugs/file_empty.html
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html><head></head><body></body></html>
|
48
dom/tests/mochitest/bugs/test_bug809290.html
Normal file
48
dom/tests/mochitest/bugs/test_bug809290.html
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html>
|
||||||
|
<!--
|
||||||
|
https://bugzilla.mozilla.org/show_bug.cgi?id=809290
|
||||||
|
-->
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<title>Test for Bug 809290</title>
|
||||||
|
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.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=809290">Mozilla Bug 809290</a>
|
||||||
|
<p id="display"></p>
|
||||||
|
<div id="content" style="display: none">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<pre id="test">
|
||||||
|
<script type="application/javascript">
|
||||||
|
|
||||||
|
/** Test for Bug 809290 **/
|
||||||
|
SimpleTest.waitForExplicitFinish();
|
||||||
|
|
||||||
|
var gNotifyCount = 0;
|
||||||
|
function notifyReferrer(referrer) {
|
||||||
|
++gNotifyCount;
|
||||||
|
if (gNotifyCount == 1) {
|
||||||
|
is(referrer, window.location.href, "Referrer should be the script entry point (this script)");
|
||||||
|
document.getElementById('ifr').setAttribute('src', 'file_bug809290_b2.html');
|
||||||
|
} else {
|
||||||
|
is(gNotifyCount, 2);
|
||||||
|
is(referrer, window.location.href.replace(/test_bug.*/, 'file_bug809290_b2.html'),
|
||||||
|
"Referrer should be the script entry point (iframe)");
|
||||||
|
SimpleTest.finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function go() {
|
||||||
|
var ifr = document.getElementById('ifr');
|
||||||
|
ifr.onload = null;
|
||||||
|
ifr.contentWindow.innerLoad();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</pre>
|
||||||
|
<iframe id="ifr" src="file_bug809290_b1.html" onload="go();"></iframe>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user