tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / frames / sandboxed-iframe-forms.html
1 <html>
2 <head>
3 <script>
4
5 if (window.layoutTestController) {
6     window.layoutTestController.dumpAsText();
7     window.layoutTestController.waitUntilDone();
8 }
9
10 var submissionCount      = 0;
11 var disallowedSubmission = false;
12
13 function allowedFormSubmitted()
14 {
15     ++submissionCount;
16
17     if (submissionCount == 10) {
18         document.getElementById("test_status").innerHTML = (disallowedSubmission ? "FAIL" : "PASS");
19       
20         if (window.layoutTestController)
21             window.layoutTestController.notifyDone();
22     }
23 }
24
25 function disallowedFormSubmitted()
26 {
27     disallowedSubmission = true;
28 }
29
30 </script>
31 </head>
32
33 <body>
34
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     &quot;PASS&quot; on success.</p>
40
41     <!-- five IFrames with forms allowed -->
42
43     <iframe style="width: 60px; height: 60px;"
44         sandbox="allow-scripts allow-forms allow-same-origin"
45         src="resources/sandboxed-iframe-form-allowed.html">
46     </iframe>
47     <iframe style="width: 60px; height: 60px;"
48         sandbox="allow-scripts allow-forms allow-same-origin"
49         src="resources/sandboxed-iframe-form-allowed.html">
50     </iframe>
51     <iframe style="width: 60px; height: 60px;"
52         sandbox="allow-scripts allow-forms allow-same-origin"
53         src="resources/sandboxed-iframe-form-allowed.html">
54     </iframe>
55     <iframe style="width: 60px; height: 60px;"
56         sandbox="allow-scripts allow-forms allow-same-origin"
57         src="resources/sandboxed-iframe-form-allowed.html">
58     </iframe>
59     <iframe style="width: 60px; height: 60px;"
60         sandbox="allow-scripts allow-forms allow-same-origin"
61         src="resources/sandboxed-iframe-form-allowed.html">
62     </iframe>
63
64     <!-- one IFrame with forms disallowed -->
65
66     <iframe style="width: 60px; height: 60px;"
67         sandbox="allow-scripts allow-same-origin"
68         src="resources/sandboxed-iframe-form-disallowed.html">
69     </iframe>
70
71     <!-- five more IFrames with forms allowed -->
72
73     <iframe style="width: 60px; height: 60px;"
74         sandbox="allow-scripts allow-forms allow-same-origin"
75         src="resources/sandboxed-iframe-form-allowed.html">
76     </iframe>
77     <iframe style="width: 60px; height: 60px;"
78         sandbox="allow-scripts allow-forms allow-same-origin"
79         src="resources/sandboxed-iframe-form-allowed.html">
80     </iframe>
81     <iframe style="width: 60px; height: 60px;"
82         sandbox="allow-scripts allow-forms allow-same-origin"
83         src="resources/sandboxed-iframe-form-allowed.html">
84     </iframe>
85     <iframe style="width: 60px; height: 60px;"
86         sandbox="allow-scripts allow-forms allow-same-origin"
87         src="resources/sandboxed-iframe-form-allowed.html">
88     </iframe>
89     <iframe style="width: 60px; height: 60px;"
90         sandbox="allow-scripts allow-forms allow-same-origin"
91         src="resources/sandboxed-iframe-form-allowed.html">
92     </iframe>
93     
94     <p id='test_status'>FAIL: Script didn't run</p>
95 </body>
96 </html>