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

Side by Side Diff: LayoutTests/fast/dom/Window/window-function-frame-getter-precedence.html

Issue 174073007: Remove deprecated window.showModalDialog() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 months 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="resources/WindowProperties.js"></script> 4 <script src="resources/WindowProperties.js"></script>
5 <script> 5 <script>
6 if (window.testRunner) 6 if (window.testRunner)
7 testRunner.dumpAsText(); 7 testRunner.dumpAsText();
8 8
9 function log(message, color) 9 function log(message, color)
10 { 10 {
(...skipping 20 matching lines...) Expand all
31 log("FAIL: " + a + " should be " + b + " but instead is " + eval A, "red"); 31 log("FAIL: " + a + " should be " + b + " but instead is " + eval A, "red");
32 } 32 }
33 33
34 function testFunction(functionName) 34 function testFunction(functionName)
35 { 35 {
36 var iframe = document.createElement('iframe'); 36 var iframe = document.createElement('iframe');
37 iframe.src = "about:blank"; 37 iframe.src = "about:blank";
38 iframe.name = functionName; 38 iframe.name = functionName;
39 document.body.appendChild(iframe); 39 document.body.appendChild(iframe);
40 40
41 // showModalDialog only works on mac in the DRT. So run this test o nly if its defined and print output only on failure. 41 shouldBe("typeof window." + functionName, "object");
42 // This'll keep the output consistent on all platforms.
43 if (functionName == "showModalDialog") {
44 if (window.showModalDialog != undefined)
45 shouldBe("typeof window." + functionName, "object", true);
46 } else
47 shouldBe("typeof window." + functionName, "object");
48 42
49 document.body.removeChild(iframe); 43 document.body.removeChild(iframe);
50 } 44 }
51 45
52 function runTests() 46 function runTests()
53 { 47 {
54 for (var func in windowFunctions) { 48 for (var func in windowFunctions) {
55 testFunction(windowFunctions[func]) 49 testFunction(windowFunctions[func])
56 } 50 }
57 51
58 window.myFunction = function() { return "myFunction"; } 52 window.myFunction = function() { return "myFunction"; }
59 testFunction("myFunction"); 53 testFunction("myFunction");
60 window.__proto__.myPrototypeFunction = function() { return "myProtot ypeFunction"; } 54 window.__proto__.myPrototypeFunction = function() { return "myProtot ypeFunction"; }
61 testFunction("myPrototypeFunction"); 55 testFunction("myPrototypeFunction");
62 } 56 }
63 </script> 57 </script>
64 </head> 58 </head>
65 <body onload="runTests();"> 59 <body onload="runTests();">
66 <p>This tests that a frame with a the same name as function on the window ob ject, has precedence in the lookup.</p> 60 <p>This tests that a frame with a the same name as function on the window ob ject, has precedence in the lookup.</p>
67 <pre id="console"></pre> 61 <pre id="console"></pre>
68 </body> 62 </body>
69 </html> 63 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698