Bug 686003 - The test for bug 507902 navigates away from the page while it's in progress; r=dougt

--HG--
rename : dom/tests/mochitest/orientation/test_bug507902.html => dom/tests/mochitest/orientation/bug507902-frame.html
This commit is contained in:
Ehsan Akhgari 2011-12-28 17:52:35 -05:00
parent a6e2a78f79
commit 98c02f3fb5
3 changed files with 34 additions and 5 deletions

View File

@ -45,6 +45,7 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
_TEST_FILES = \
bug507902-frame.html \
test_bug507902.html \
$(NULL)

View File

@ -0,0 +1,30 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Frame for watchPosition </title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
</head>
<body>
<script type="text/javascript">
var ok = window.parent.ok;
var SimpleTest = window.parent.SimpleTest;
function boom()
{
window.addEventListener("unload", function(){}, false);
window.addEventListener("devicemotion", function(){}, false);
location = "data:text/html,2";
ok(1, "leak will be at the end of mochitests. so pass.");
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
window.addEventListener("load", function() { setTimeout(boom, 0); }, false);
</script>
</body>
</html>

View File

@ -4,15 +4,15 @@
https://bugzilla.mozilla.org/show_bug.cgi?id=507902
-->
<head>
<title>Test for watchPosition </title>
<title>Test for devicemotion</title>
<script type="text/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=507902">Mozilla Bug 507902</a>
<p id="display"></p>
<div id="content" style="display: none">
<div id="content">
<iframe id="frame" src="bug507902-frame.html"></iframe>
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
@ -29,8 +29,6 @@ function boom()
SimpleTest.waitForExplicitFinish();
window.addEventListener("load", function() { setTimeout(boom, 0); }, false);
</script>
</pre>
</body>