forked from mirrors/gecko-dev
This is split from the previous changeset since if we include dom/ the file size is too large for phabricator to handle. This is an autogenerated commit to handle scripts loading mochitest harness files, in the simple case where the script src is on the same line as the tag. This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170 using the `--part 2` argument. Differential Revision: https://phabricator.services.mozilla.com/D27457 --HG-- extra : moz-landing-system : lando
96 lines
4.2 KiB
HTML
96 lines
4.2 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
<!--
|
|
https://bugzilla.mozilla.org/show_bug.cgi?id=1019417
|
|
-->
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Test for Bug 1019417</title>
|
|
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
|
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
|
<script type="application/javascript">
|
|
|
|
/** Test for Bug 1019417 **/
|
|
SimpleTest.waitForExplicitFinish();
|
|
addLoadEvent(function() {
|
|
var names1 = Object.getOwnPropertyNames(window);
|
|
var names2 = [];
|
|
var gsp = Object.getPrototypeOf(Window.prototype);
|
|
var names3 = Object.getOwnPropertyNames(gsp);
|
|
for (var i in window) {
|
|
names2.push(i);
|
|
}
|
|
|
|
is(names1.indexOf(""), -1,
|
|
"Frame with no name or empty name should not be in our own prop list");
|
|
is(names2.indexOf(""), -1,
|
|
"Frame with no name or empty name should not be in our enumeration list");
|
|
is(names3.indexOf(""), -1,
|
|
"Frame with no name or empty name should not be in GSP own prop list");
|
|
is(names1.indexOf("x"), -1,
|
|
"Frame with about:blank loaded should not be in our own prop list");
|
|
is(names2.indexOf("x"), -1,
|
|
"Frame with about:blank loaded should not be in our enumeration list");
|
|
isnot(names3.indexOf("x"), -1,
|
|
"Frame with about:blank loaded should be in GSP own prop list");
|
|
is(names1.indexOf("y"), -1,
|
|
"Frame with same-origin loaded should not be in our own prop list");
|
|
is(names2.indexOf("y"), -1,
|
|
"Frame with same-origin loaded should not be in our enumeration list");
|
|
isnot(names3.indexOf("y"), -1,
|
|
"Frame with same-origin loaded should be in GSP own prop list");
|
|
is(names1.indexOf("z"), -1,
|
|
"Frame with cross-origin loaded should not be in our own prop list");
|
|
is(names2.indexOf("z"), -1,
|
|
"Frame with cross-origin loaded should not be in our enumeration list");
|
|
isnot(names3.indexOf("z"), -1,
|
|
"Frame with cross-origin loaded should be in GSP own prop list");
|
|
is(names1.indexOf("sameorigin"), -1,
|
|
"Frame with same-origin changed name should not be in our own prop list");
|
|
is(names2.indexOf("sameorigin"), -1,
|
|
"Frame with same-origin changed name should not be in our enumeration list");
|
|
isnot(names3.indexOf("sameorigin"), -1,
|
|
"Frame with same-origin changed name should be in GSP own prop list");
|
|
is(names1.indexOf("crossorigin"), -1,
|
|
"Frame with cross-origin changed name should not be in our own prop list");
|
|
is(names2.indexOf("crossorigin"), -1,
|
|
"Frame with cross-origin changed name should not be in our enumeration list");
|
|
is(names3.indexOf("crossorigin"), -1,
|
|
"Frame with cross-origin changed name should not be in GSP own prop list");
|
|
|
|
is(Object.getOwnPropertyDescriptor(gsp, ""), undefined,
|
|
"Should not have empty string as a named frame");
|
|
isnot(Object.getOwnPropertyDescriptor(gsp, "x"), undefined,
|
|
"Should have about:blank subframe as a named frame");
|
|
isnot(Object.getOwnPropertyDescriptor(gsp, "y"), undefined,
|
|
"Should have same-origin subframe as a named frame");
|
|
isnot(Object.getOwnPropertyDescriptor(gsp, "z"), undefined,
|
|
"Should have cross-origin subframe as a named frame");
|
|
isnot(Object.getOwnPropertyDescriptor(gsp, "sameorigin"), undefined,
|
|
"Should have same-origin changed name as a named frame");
|
|
is(Object.getOwnPropertyDescriptor(gsp, "crossorigin"), undefined,
|
|
"Should not have cross-origin-origin changed name as a named frame");
|
|
SimpleTest.finish();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1019417">Mozilla Bug 1019417</a>
|
|
<p id="display"></p>
|
|
<div id="content" style="display: none">
|
|
<iframe></iframe>
|
|
<iframe name=""></iframe>
|
|
<iframe name="x"></iframe>
|
|
<iframe name="y"
|
|
src="http://mochi.test:8888/tests/dom/base/test/file_empty.html"></iframe>
|
|
<iframe name="z"
|
|
src="http://example.com/tests/dom/base/test/file_empty.html"></iframe>
|
|
<iframe name="v"
|
|
src="http://mochi.test:8888/tests/dom/base/test/file_setname.html?sameorigin"></iframe>
|
|
<iframe name="w"
|
|
src="http://example.com/tests/dom/base/test/file_setname.html?crossorigin"></iframe>
|
|
</div>
|
|
<pre id="test">
|
|
</pre>
|
|
</body>
|
|
</html>
|