5 if (window
.testRunner
) {
6 window
.testRunner
.dumpAsText();
7 window
.testRunner
.waitUntilDone();
10 var submissionCount
= 0;
11 var disallowedSubmission
= false;
13 function allowedFormSubmitted()
17 if (submissionCount
== 10) {
18 document
.getElementById("test_status").innerHTML
= (disallowedSubmission
? "FAIL" : "PASS");
20 if (window
.testRunner
)
21 window
.testRunner
.notifyDone();
25 function disallowedFormSubmitted()
27 disallowedSubmission
= true;
35 <p>This test runs five IFrames with forms allowed, one IFrame with forms
36 disallowed, then five more IFrames with forms allowed. If ten form
37 submissions are made, and the disallowed submission is not one of them,
38 we consider the test to have passed. This test will print
39 "PASS
" on success.
</p>
41 <!-- five IFrames with forms allowed -->
43 <iframe style=
"width: 60px; height: 60px;"
44 sandbox=
"allow-scripts allow-forms allow-same-origin"
45 src=
"resources/sandboxed-iframe-form-allowed.html">
47 <iframe style=
"width: 60px; height: 60px;"
48 sandbox=
"allow-scripts allow-forms allow-same-origin"
49 src=
"resources/sandboxed-iframe-form-allowed.html">
51 <iframe style=
"width: 60px; height: 60px;"
52 sandbox=
"allow-scripts allow-forms allow-same-origin"
53 src=
"resources/sandboxed-iframe-form-allowed.html">
55 <iframe style=
"width: 60px; height: 60px;"
56 sandbox=
"allow-scripts allow-forms allow-same-origin"
57 src=
"resources/sandboxed-iframe-form-allowed.html">
59 <iframe style=
"width: 60px; height: 60px;"
60 sandbox=
"allow-scripts allow-forms allow-same-origin"
61 src=
"resources/sandboxed-iframe-form-allowed.html">
64 <!-- one IFrame with forms disallowed -->
66 <iframe style=
"width: 60px; height: 60px;"
67 sandbox=
"allow-scripts allow-same-origin"
68 src=
"resources/sandboxed-iframe-form-disallowed.html">
71 <!-- five more IFrames with forms allowed -->
73 <iframe style=
"width: 60px; height: 60px;"
74 sandbox=
"allow-scripts allow-forms allow-same-origin"
75 src=
"resources/sandboxed-iframe-form-allowed.html">
77 <iframe style=
"width: 60px; height: 60px;"
78 sandbox=
"allow-scripts allow-forms allow-same-origin"
79 src=
"resources/sandboxed-iframe-form-allowed.html">
81 <iframe style=
"width: 60px; height: 60px;"
82 sandbox=
"allow-scripts allow-forms allow-same-origin"
83 src=
"resources/sandboxed-iframe-form-allowed.html">
85 <iframe style=
"width: 60px; height: 60px;"
86 sandbox=
"allow-scripts allow-forms allow-same-origin"
87 src=
"resources/sandboxed-iframe-form-allowed.html">
89 <iframe style=
"width: 60px; height: 60px;"
90 sandbox=
"allow-scripts allow-forms allow-same-origin"
91 src=
"resources/sandboxed-iframe-form-allowed.html">
94 <p id='test_status'
>FAIL: Script didn't run
</p>