Bug 1390777 - Use srcdoc to replace src=data:xxx whenever possible.
MozReview-Commit-ID: 1FeRTmZv46N
--- a/dom/html/test/file_fullscreen-api.html
+++ b/dom/html/test/file_fullscreen-api.html
@@ -32,17 +32,17 @@ function is(a, b, msg) {
/*
<html>
<body onload='document.body.requestFullscreen();'>
<iframe id='inner-frame'></iframe>
</body>
</html>
*/
-var iframeContents = "data:text/html;charset=utf-8,<html><body onload%3D'parent.SimpleTest.waitForFocus(function(){document.body.requestFullscreen();});'><iframe id%3D'inner-frame'><%2Fiframe><%2Fbody><%2Fhtml>";
+var iframeContents = "<html><body onload='parent.SimpleTest.waitForFocus(function(){document.body.requestFullscreen();});'><iframe id='inner-frame'></iframe></body></html>";
var iframe = null;
var outOfDocElement = null;
var inDocElement = null;
var container = null;
var button = null;
@@ -74,17 +74,17 @@ function enter1(event) {
function exit1(event) {
is(event.target, document, "Event target should be full-screen document #2");
ok(!document.fullscreen, "Document should not be in fullscreen");
is(document.fullscreenElement, null, "Full-screen element should be null.");
iframe = document.createElement("iframe");
iframe.allowFullscreen = true;
addFullscreenChangeContinuation("enter", enter2);
document.body.appendChild(iframe);
- iframe.src = iframeContents;
+ iframe.srcdoc = iframeContents;
}
function enter2(event) {
is(event.target, document, "Event target should be full-screen document #3");
is(document.fullscreenElement, iframe,
"Full-screen element should be iframe element.");
is(iframe.contentDocument.fullscreenElement, iframe.contentDocument.body,
"Full-screen element in subframe should be body");
--- a/dom/html/test/file_fullscreen-plugins.html
+++ b/dom/html/test/file_fullscreen-plugins.html
@@ -39,17 +39,17 @@ Test plugins with DOM full-screen API:
<!-- iframe contents:
<html><body><embed id='windowed-plugin' type='application/x-test' style='width:200px;height:100px;' wmode='window'></embed></body></html>
-->
-<iframe id="subdoc-plugin" src="data:text/html;charset=utf-8,<html><body><embed id%3D'windowed-plugin' type%3D'application%2Fx-test' style%3D'width%3A200px%3Bheight%3A100px%3B' wmode%3D'window'><%2Fembed><%2Fbody><%2Fhtml>%0D%0A"></iframe>
+<iframe id="subdoc-plugin" srcdoc="<html><body><embed id='windowed-plugin' type='application/x-test' style='width:200px;height:100px;' wmode='window'></embed></body></html>"></iframe>
<script type="application/javascript">
/** Test for Bug 545812 **/
function ok(condition, msg) {
opener.ok(condition, "[plugins] " + msg);
}