summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/plugins/plugin-placeholder-explicit-size.html
blob: 6a2ff70c3ff3089f4540c838bc60b488f1bc5bbf (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
<!DOCTYPE html>

<style>
applet, embed, object { display: block; margin: 10px; }
</style>

<!-- These should appear as green blocks of various sizes (200x150, 300x100, 200x100). -->
<applet code="DoesNotExist.class" width="200"></applet>
<embed type="application/x-fake-plugin" height="100"></embed>
<object type="application/x-fake-plugin" width="200" height="100"></object>

<template id="placeholder-template">
    <style>
        :host { overflow: hidden }
        div { margin: 0; padding: 0; width: 100%; height: 100%; background-color: green; }
    </style>
    <div></div>
</template>

<script>
var templateContent = document.getElementById('placeholder-template').content;
Array.prototype.forEach.call(document.querySelectorAll("applet, embed, object"), function(plugin) {
    internals.forcePluginPlaceholder(plugin, templateContent);
});
</script>