forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 2
/
file_bug391728.html
100 lines (82 loc) · 3.69 KB
/
file_bug391728.html
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<html>
<head>
<style type="text/css">
embed,object {
border: 1px solid black;
}
embed:-moz-handler-disabled,
object:-moz-handler-disabled {
border-style: dotted !important;
}
embed:-moz-handler-blocked,
object:-moz-handler-blocked {
border-style: dashed !important;
}
embed:-moz-type-unsupported,
object:-moz-type-unsupported {
border-style: none !important;
}
</style>
<script type="text/javascript">
function unknown_plugin_detected(event) {
window.parent.unknown_plugin_detected(event);
}
function blocked_plugin_detected(event) {
window.parent.blocked_plugin_detected(event);
}
function disabled_plugin_detected(event) {
window.parent.disabled_plugin_detected(event);
}
document.addEventListener("PluginNotFound", unknown_plugin_detected, true);
document.addEventListener("PluginDisabled", disabled_plugin_detected, true);
document.addEventListener("PluginBlocklisted", blocked_plugin_detected, true);
</script>
</head>
<body>
<!-- Embeds always fire events and have the pseudo class attached -->
<div><embed id="plugin1" style="width: 100px; height: 100px" type="application/x-test"></div>
<div><embed id="plugin2" style="width: 100px; height: 100px" src="data:application/x-test,test"></div>
<!-- So do objects with no content and no pluginurl -->
<div><object id="plugin3" style="width: 100px; height: 100px" type="application/x-test"></object></div>
<div><object id="plugin4" style="width: 100px; height: 100px" data="data:application/x-test,test"></object></div>
<!-- The mimetype of the actual data is supposed to be used in preference -->
<div><embed id="plugin5" style="width: 100px; height: 100px" type="application/x-unknown" src="data:application/x-test,test"></div>
<div><object id="plugin6" style="width: 100px; height: 100px" type="application/x-unknown" data="data:application/x-test,test"></object></div>
<!-- Params are not considered content -->
<div><object id="plugin7" style="width: 100px; height: 100px" type="application/x-test">
<param name="foo" value="bar">
</object></div>
<div><object id="plugin8" style="width: 100px; height: 100px" data="data:application/x-test,test">
<param name="foo" value="bar">
</object></div>
<!-- Nor is whitespace -->
<div><object id="plugin9" style="width: 100px; height: 100px" type="application/x-test">
</object></div>
<div><object id="plugin10" style="width: 100px; height: 100px" data="data:application/x-test,test">
</object></div>
<!-- Pluginurl forces the psuedo class and error event regardless of content -->
<div><object id="plugin11" style="width: 100px; height: 100px" type="application/x-test">
<param name="pluginurl" value="http://foo">
<p>Fallback content</p>
</object></div>
<div><object id="plugin12" style="width: 100px; height: 100px" data="data:application/x-test,test">
<param name="pluginurl" value="http://foo">
<p>Fallback content</p>
</object></div>
<!-- No errors or psuedo classes for objects with fallback content -->
<div><object id="fallback1" style="width: 100px; height: 100px" type="application/x-test">
<p>Fallback content</p>
</object></div>
<div><object id="fallback2" style="width: 100px; height: 100px" data="data:application/x-test,test">
<p>Fallback content</p>
</object></div>
<!-- Even other plugins are considered content so no errors dispatched from these
objects, but the inner embeds do get processed -->
<div><object id="fallback3" style="width: 100px; height: 100px" type="application/x-test">
<embed id="plugin13" style="width: 100px; height: 100px" type="application/x-test">
</object></div>
<div><object id="fallback4" style="width: 100px; height: 100px" data="data:application/x-test,test">
<embed id="plugin14" style="width: 100px; height: 100px" type="application/x-test">
</object></div>
</body>
</html>