Use testRunner instead of layoutTestController in networkinformation, perf, plugins...
[WebKit-https.git] / LayoutTests / plugins / mouse-click-iframe-to-plugin.html
1 <html>
2 <head>
3 <script>
4 function runTest() {
5     frameDocument = document.getElementById('frame').contentWindow.document;
6     frameDocument.body.innerHTML = "<textarea id=textarea cols=50 rows=5 onblur='this.style.backgroundColor=\"green\"'></textarea>";
7     var textarea = frameDocument.getElementById('textarea');
8     textarea.focus();
9
10     if (!window.testRunner) {
11         output.textContent = "Click on the plugin (the blue rectangle); if the text field turns green the test has passed, otherwise it has failed.";
12     } else {
13         eventSender.mouseMoveTo(60, 60);
14         eventSender.mouseDown();
15         eventSender.mouseUp();
16
17         if (frameDocument.activeElement != textarea) {
18           document.getElementById('output').textContent = "PASSED";
19         }
20         testRunner.dumpAsText();
21     }
22 }
23 </script>
24 </head>
25 <body onload="runTest();">
26 <embed type="application/x-webkit-test-netscape" width="100" height="100"></embed><br>
27 <iframe id="frame" width="640"></iframe>
28 <div id="output">FAILED</div>
29 </body>
30 </html>