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