summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/plugins/webview-plugin-lifecycle.html
blob: 4175edc795b3c8f266ccdc246c2146c6963403b2 (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>
  #plugin {
    width: 150px;
    height: 150px;
    border: 1px solid black;
  }
</style>
<embed id="plugin" type="application/x-plugin-placeholder-test"></embed>
<script>
onload = function() {
    if (window.testRunner) {
        window.testRunner.waitUntilDone();
        // Need to paint two frames in order to allow the plugin to properly load.
        // TODO(chrishtr): find out why and fix.
        requestAnimationFrame(function() {
            requestAnimationFrame(function() {
                requestAnimationFrame(function() {
                    window.testRunner.notifyDone();
                });
            });
        });
    }
}
</script>