OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <script> | 4 <script> |
5 if (window.testRunner) | 5 if (window.testRunner) |
6 testRunner.dumpAsText(); | 6 testRunner.dumpAsText(); |
7 | 7 |
8 window.onload = function() { | 8 window.onload = function() { |
9 shouldBeTrue("(self.appletFrame1.document['app'].init) != undefined"); | |
10 shouldBeTrue("(self.appletFrame2.document['app'].init) == undefined"); | |
11 | |
12 shouldBeTrue("(self.embedFrame1.document.getElementById('plugin').destroyStr
eam) != undefined"); | 9 shouldBeTrue("(self.embedFrame1.document.getElementById('plugin').destroyStr
eam) != undefined"); |
13 shouldBeTrue("(self.embedFrame2.document.getElementById('plugin').destroyStr
eam) == undefined"); | 10 shouldBeTrue("(self.embedFrame2.document.getElementById('plugin').destroyStr
eam) == undefined"); |
14 | 11 |
15 shouldBeTrue("(self.objectFrame1.document.getElementById('plugin').destroySt
ream) != undefined"); | 12 shouldBeTrue("(self.objectFrame1.document.getElementById('plugin').destroySt
ream) != undefined"); |
16 shouldBeTrue("(self.objectFrame2.document.getElementById('plugin').destroySt
ream) == undefined"); | 13 shouldBeTrue("(self.objectFrame2.document.getElementById('plugin').destroySt
ream) == undefined"); |
17 | 14 |
18 isSuccessfullyParsed(); | 15 isSuccessfullyParsed(); |
19 } | 16 } |
20 </script> | 17 </script> |
21 </head> | 18 </head> |
22 | 19 |
23 <body> | 20 <body> |
24 <p id="description"></p> | 21 <p id="description"></p> |
25 | 22 |
26 <p>NOTE: The first sub-test will fail in DumpRenderTree, since DumpRenderTre
e | |
27 does not support applets. That sub-test must be run in Safari instead.</p> | |
28 | |
29 <div id="console"></div> | 23 <div id="console"></div> |
30 | 24 |
31 <!-- Applets --> | 25 <!-- Embeds --> |
32 | |
33 <iframe name="appletFrame1" | |
34 style="width: 200px; height: 100px;" | |
35 src="resources/sandboxed-iframe-plugins-frame-applet.html"> | |
36 </iframe> | |
37 <iframe name="appletFrame2" | |
38 style="width: 200px; height: 100px;" | |
39 sandbox="allow-same-origin allow-scripts" | |
40 src="resources/sandboxed-iframe-plugins-frame-applet.html"> | |
41 </iframe> | |
42 | 26 |
43 <!-- Embeds --> | |
44 | |
45 <iframe name="embedFrame1" | 27 <iframe name="embedFrame1" |
46 style="width: 200px; height: 100px;" | 28 style="width: 200px; height: 100px;" |
47 src="resources/sandboxed-iframe-plugins-frame-embed.html"> | 29 src="resources/sandboxed-iframe-plugins-frame-embed.html"> |
48 </iframe> | 30 </iframe> |
49 <iframe name="embedFrame2" | 31 <iframe name="embedFrame2" |
50 style="width: 200px; height: 100px;" | 32 style="width: 200px; height: 100px;" |
51 sandbox="allow-same-origin" | 33 sandbox="allow-same-origin" |
52 src="resources/sandboxed-iframe-plugins-frame-embed.html"> | 34 src="resources/sandboxed-iframe-plugins-frame-embed.html"> |
53 </iframe> | 35 </iframe> |
54 | 36 |
55 <!-- Objects --> | 37 <!-- Objects --> |
56 | 38 |
57 <iframe name="objectFrame1" | 39 <iframe name="objectFrame1" |
58 style="width: 200px; height: 100px;" | 40 style="width: 200px; height: 100px;" |
59 src="resources/sandboxed-iframe-plugins-frame-object.html"> | 41 src="resources/sandboxed-iframe-plugins-frame-object.html"> |
60 </iframe> | 42 </iframe> |
61 <iframe name="objectFrame2" | 43 <iframe name="objectFrame2" |
62 style="width: 200px; height: 100px;" | 44 style="width: 200px; height: 100px;" |
63 sandbox="allow-same-origin" | 45 sandbox="allow-same-origin" |
64 src="resources/sandboxed-iframe-plugins-frame-object.html"> | 46 src="resources/sandboxed-iframe-plugins-frame-object.html"> |
65 </iframe> | 47 </iframe> |
66 | 48 |
67 <script> | 49 <script> |
68 description("This test verifies that sandboxing of plugins works as intended
. Three tests are made, each in one sandboxed and one non-sandboxed IFrame: appl
ets, embeds, and objects."); | 50 description("This test verifies that sandboxing of plugins works as intended
. Two tests are made, each in one sandboxed and one non-sandboxed IFrame: embeds
and objects."); |
69 </script> | 51 </script> |
70 </body> | 52 </body> |
71 </html> | 53 </html> |
OLD | NEW |