gecko/content/base/test/file_bug391728_2.html

100 lines
3.7 KiB
HTML
Raw Normal View History

<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-unknown"></div>
<div><embed id="plugin2" style="width: 100px; height: 100px" src="data:application/x-unknown,test"></div>
<!-- So do objects with no content and no pluginurl -->
<div><object id="plugin3" style="width: 100px; height: 100px" type="application/x-unknown"></object></div>
<div><object id="plugin4" style="width: 100px; height: 100px" data="data:application/x-unknown,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-test" src="data:application/x-unknown,test"></div>
<div><object id="plugin6" style="width: 100px; height: 100px" type="application/x-test" data="data:application/x-unknown,test"></object></div>
<!-- Params are not considered content -->
<div><object id="plugin7" style="width: 100px; height: 100px" type="application/x-unknown">
<param name="foo" value="bar">
</object></div>
<div><object id="plugin8" style="width: 100px; height: 100px" data="data:application/x-unknown,test">
<param name="foo" value="bar">
</object></div>
<!-- Nor is whitespace -->
<div><object id="plugin9" style="width: 100px; height: 100px" type="application/x-unknown">
</object></div>
<div><object id="plugin10" style="width: 100px; height: 100px" data="data:application/x-unknown,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-unknown">
<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-unknown,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-unknown">
<p>Fallback content</p>
</object></div>
<div><object id="fallback2" style="width: 100px; height: 100px" data="data:application/x-unknown,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-unknown">
<embed id="plugin13" style="width: 100px; height: 100px" type="application/x-unknown">
</object></div>
<div><object id="fallback4" style="width: 100px; height: 100px" data="data:application/x-unknown,test">
<embed id="plugin14" style="width: 100px; height: 100px" type="application/x-unknown">
</object></div>
</body>
</html>