Backout cfac7b6a1f9c (bug 728893) for mochitest-1 orange

This commit is contained in:
Ed Morley 2012-05-23 11:56:03 +01:00
Родитель 53e9dfd8fb
Коммит b5d78c0dae
6 изменённых файлов: 3 добавлений и 60 удалений

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

@ -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">

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

@ -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">

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

@ -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"},

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

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

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

@ -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!");
}

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

@ -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>