<!DOCTYPE html>

<html>
<head>
  <script>
    if (window.testRunner) {
        testRunner.dumpAsText();
        testRunner.waitUntilDone();
    }

    var paintCount = 0;

    function onLoad() {
        var pluginDiv = document.getElementById("pluginDiv");
        // Create the plugin in the middle of the page.
        pluginDiv.innerHTML = "<embed id=\"testPlugin\" type=\"application/x-webkit-test-netscape\" width=\"200\" height=\"200\" onpaintevent=\"didPaint()\" windowedPlugin=\"false\"></embed>";
        if (window.internals)
            internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
        testRunner.display();
      }

    function notifyDone() {
        document.getElementById('result').innerHTML = "SUCCESS";
        testRunner.notifyDone();
    }
      
    function didPaint() {
        paintCount++;
        setTimeout("notifyDone();", 50);
    }
  </script>
</head>
<body onload="setTimeout(onLoad(), 50);">
  This tests that dynamically added windowless plugins receive paint events on creation.

  <div id="result">FAILURE</div>

  <div id="pluginDiv" style="position: absolute; left: 300px; top: 300px; height: 400px; width: 400px; padding: 1em;">
  </div>
</body>
</html>

<!DOCTYPE html>

<html>
<head>
  <script>
    if (window.testRunner) {
        testRunner.dumpAsText();
        testRunner.waitUntilDone();
    }

    var paintCount = 0;

    function onLoad() {
        var pluginDiv = document.getElementById("pluginDiv");
        // Create the plugin in the middle of the page.
        pluginDiv.innerHTML = "<embed id=\"testPlugin\" type=\"application/x-webkit-test-netscape\" width=\"200\" height=\"200\" onpaintevent=\"didPaint()\" windowedPlugin=\"false\"></embed>";
        if (window.internals)
            internals.updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks();
        testRunner.displayAsync();
      }

    function notifyDone() {
        document.getElementById('result').innerHTML = "SUCCESS";
        testRunner.notifyDone();
    }
      
    function didPaint() {
        paintCount++;
        setTimeout("notifyDone();", 50);
    }
  </script>
</head>
<body onload="setTimeout(onLoad(), 50);">
  This tests that dynamically added windowless plugins receive paint events on creation.

  <div id="result">FAILURE</div>

  <div id="pluginDiv" style="position: absolute; left: 300px; top: 300px; height: 400px; width: 400px; padding: 1em;">
  </div>
</body>
</html>

Remove testRunner.display from windowless plugin test
Remove testRunner.display from windowless plugin test

This is a straggler test that https://codereview.chromium.org/224093012/
dropped in the last patch set.

BUG=345027

Review URL: https://codereview.chromium.org/231673003

git-svn-id: bf5cd6ccde378db821296732a091cfbcf5285fbd@171179 bbb929c8-8fbe-4397-9dbb-9b2b20218538
