Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Side by Side Diff: LayoutTests/fast/forms/post-popup-no-multiple-windows.html

Issue 40513003: Delete/move the remaining stale tests in TestExpectations. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: delete plugins/reentrant-update-widget-positions.html as well Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.setCanOpenWindows(true);
8 testRunner.overridePreference('WebKitSupportsMultipleWindows', false);
9 testRunner.waitUntilDone();
10 }
11
12 function click(elmt)
13 {
14 var event = document.createEvent('MouseEvent');
15 event.initEvent('click', true, true);
16 elmt.dispatchEvent(event);
17 }
18
19 function runTest()
20 {
21 if (window.testRunner)
22 testRunner.initialWindowCount = testRunner.windowCount();
23 var button = document.getElementById("post-button");
24 click(button);
25 if (window.testRunner) {
26 start = new Date();
27 testInterval = setInterval(checkIfDone, 1);
28 }
29 }
30
31 function checkIfDone ()
32 {
33 if (testRunner.globalFlag) {
34 document.writeln('FAIL: Popup opened in a new window');
35 clearInterval(testInterval);
36 testRunner.notifyDone();
37 } else if ((new Date() - start) > 10000) {
38 document.writeln('FAIL: Popup did not open');
39 clearInterval(testInterval);
40 testRunner.notifyDone();
41 }
42 }
43
44 window.addEventListener('load', runTest, true);
45 </script>
46 </head>
47 <body>
48 You need popups to be enabled to run this test.
49 <form method="post" target="_blank" action="data:text/html;charset=utf-8,<html ><head><script>function test() { if (!window.testRunner) return; testRunner.glob alFlag=1; if (testRunner.initialWindowCount != testRunner.windowCount()) return; document.writeln('PASS: Popup opened in the same window'); testRunner.notifyDon e(); }</script></head><body onload='test()'>The test passes if this page opens i n the same window</body></html>">
50 <input id="post-button" type="submit" value="Click me!" />
51 </form>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698