5 if (window
.testRunner
) {
6 window
.testRunner
.dumpAsText();
7 window
.testRunner
.waitUntilDone();
10 var navigatedFrames
= 0;
12 function checkResults()
14 var testStatus
= document
.getElementById('testStatus');
16 if (self
.navigated
.location
.href
.indexOf('parent.html') == -1)
17 testStatus
.innerHTML
= 'FAIL: disallowed frame navigated';
18 else if (navigatedFrames
== 10)
19 testStatus
.innerHTML
= 'PASS';
21 testStatus
.innerHTML
= 'FAIL: frames not navigated properly';
23 if (window
.testRunner
)
24 window
.testRunner
.notifyDone();
31 if (navigatedFrames
== 10)
40 <p>This test verifies that a sandboxed IFrame cannot navigate an ancestor
41 in the frame tree by assigning the location attribute.
</p>
43 <p>This is done by loading ten non-sandboxed IFrames, and a single
44 sandboxed one. Expect ten frames to be navigated, but the sandboxed
45 one to
<b>not
</b> be one of them.
</p>
47 <p>This test will print
"PASS
" on success.
</p>
49 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
50 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
51 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
52 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
53 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
55 <iframe name='navigated'
56 src=
"resources/sandboxed-iframe-navigation-parent.html">
59 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
60 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
61 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
62 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
63 <iframe src=
"resources/non-sandboxed-iframe-navigation.html"></iframe>
65 <p id='testStatus'
>FAIL: Script didn't run
</p>