Backout cfac7b6a1f9c (bug 728893) for mochitest-1 orange

This commit is contained in:
Ed Morley 2012-05-23 11:56:03 +01:00
parent 3246c1d437
commit 90d4c9a141
6 changed files with 3 additions and 60 deletions

View File

@ -82,7 +82,7 @@ function loadTests()
</div>
<div class="clear"></div>
<div class="frameholder">
<iframe type="content" scrolling="no" id="testframe" width="550" height="350" mozallowfullscreen="true"></iframe>
<iframe type="content" scrolling="no" id="testframe" width="550" height="350"></iframe>
</div>
<div class="clear"></div>
<div class="toggle">

View File

@ -43,7 +43,7 @@ function loadTests()
</div>
<div class="clear"></div>
<div class="frameholder">
<iframe type="content" scrolling="no" id="testframe" width="550" height="350" mozallowfullscreen="true"></iframe>
<iframe type="content" scrolling="no" id="testframe" width="550" height="350"></iframe>
</div>
<div class="clear"></div>
<div class="toggle">

View File

@ -620,7 +620,7 @@ function testListing(metadata, response)
),
DIV({class: "clear"}),
DIV({class: "frameholder"},
IFRAME({scrolling: "no", id: "testframe", width: "500", height: "300", mozallowfullscreen: "true"})
IFRAME({scrolling: "no", id: "testframe", width: "500", height: "300"})
),
DIV({class: "clear"}),
DIV({class: "toggle"},

View File

@ -27,7 +27,6 @@ _TEST_FILES = \
test_SpecialPowersExtension.html \
test_SpecialPowersExtension2.html \
file_SpecialPowersFrame1.html \
test_cancelFullScreen.html \
$(NULL)
ifneq ($(OS_TARGET),Android)

View File

@ -680,10 +680,6 @@ SimpleTest.executeSoon = function(aFunc) {
* SimpleTest.waitForExplicitFinish() has been invoked.
**/
SimpleTest.finish = function () {
// Cancel element fullscreen mode due to Bug 728893
if (document && document.mozFullScreenElement) {
document.mozCancelFullScreen();
}
if (SimpleTest._expectingUncaughtException) {
SimpleTest.ok(false, "expectUncaughtException was called but no uncaught exception was detected!");
}

View File

@ -1,52 +0,0 @@
<!DOCTYPE HTML>
<html>
<head>
<title>Test for Bug 728893</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body onload="start()">
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=728893">
Mozilla Bug
</a>
<div id="div">
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
/** Test for Bug 728893
Checks if SimpleTest.finish cancels fullscreen mode
The assertion happens after calling SimpleTest.finish
Running the test without the harness won't work
**/
SpecialPowers.setBoolPref("full-screen-api.enabled", true);
SpecialPowers.setBoolPref("full-screen-api.allow-trusted-requests-only",
false);
SimpleTest.waitForExplicitFinish();
var div = document.getElementById("div");
document.addEventListener("mozfullscreenchange", function (e) {
if (document.mozFullScreenElement === div) {
ok(true, "Calling SimpleTest.finish");
SimpleTest.finish();
}
else {
is(false, document.mozFullScreen,
"SimpleTest.finish should cancel fullscreen mode");
}
}, false);
function start() {
SimpleTest.waitForFocus(function() {
div.mozRequestFullScreen();
});
}
</script>
</pre>
</body>
</html>