2 <p>Test how sandbox flags get inherited to initial document in subframe.
</p>
3 <div id=
"result">Running...
</div>
4 <iframe src=
"resources/iframe-no-src.html" sandbox=
"allow-same-origin"></iframe>
6 if (window
.testRunner
) {
7 testRunner
.waitUntilDone();
8 testRunner
.dumpAsText();
13 function scriptWorked()
15 document
.getElementById("result").innerHTML
= "FAIL";
16 if (window
.testRunner
)
17 testRunner
.notifyDone();
18 clearTimeout(timeoutId
);
23 document
.getElementById("result").innerHTML
= "PASS";
24 if (window
.testRunner
)
25 testRunner
.notifyDone();
31 var doc
= frames
[0].frames
[0].document
;
32 var scr
= doc
.createElement("script");
33 scr
.appendChild(doc
.createTextNode("top.scriptWorked()"));
34 timeoutId
= setTimeout(timedOut
, 10);
35 doc
.body
.appendChild(scr
);
37 document
.getElementById("result").innerHTML
= "FAIL: no inner frame";
38 testRunner
.notifyDone();