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

Side by Side Diff: LayoutTests/svg/custom/frame-getSVGDocument.html

Issue 146193003: Remove SVGDocument binding (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase against ToT 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
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body> 6 <body>
7 <p id="description"></p> 7 <p id="description"></p>
8 <div id="console"></div> 8 <div id="console"></div>
9 <script> 9 <script>
10 description("Tests that HTMLFrameElement and HTMLIFrameElement expose a getSVG Document accessor"); 10 description("Tests that HTMLFrameElement and HTMLIFrameElement expose a getSVG Document accessor");
11 11
12 window.jsTestIsAsync = true; 12 window.jsTestIsAsync = true;
13 if (window.testRunner) 13 if (window.testRunner)
14 testRunner.waitUntilDone(); 14 testRunner.waitUntilDone();
15 15
16 var frame; 16 var frame;
17 var iframe; 17 var iframe;
18 var embed; 18 var embed;
19 var object; 19 var object;
20 20
21 function startTest() { 21 function startTest() {
22 frame = document.createElement("frame"); 22 frame = document.createElement("frame");
23 frame.onload = continueTest1; 23 frame.onload = continueTest1;
24 frame.src = "resources/getsvgdocument.svg"; 24 frame.src = "resources/getsvgdocument.svg";
25 document.documentElement.appendChild(frame); 25 document.documentElement.appendChild(frame);
26 shouldBeTrue("!!frame.getSVGDocument"); 26 shouldBeTrue("!!frame.getSVGDocument");
27 } 27 }
28 28
29 var continueTest1 = function() { 29 var continueTest1 = function() {
30 shouldBeEqualToString("frame.getSVGDocument().toString()", "[object SVGDocum ent]"); 30 shouldBeEqualToString("frame.getSVGDocument().toString()", "[object XMLDocum ent]");
31 frame.parentNode.removeChild(frame); 31 frame.parentNode.removeChild(frame);
32 32
33 iframe = document.createElement("iframe"); 33 iframe = document.createElement("iframe");
34 iframe.onload = continueTest2; 34 iframe.onload = continueTest2;
35 iframe.src = "resources/getsvgdocument.svg"; 35 iframe.src = "resources/getsvgdocument.svg";
36 document.documentElement.appendChild(iframe); 36 document.documentElement.appendChild(iframe);
37 shouldBeTrue("!!iframe.getSVGDocument"); 37 shouldBeTrue("!!iframe.getSVGDocument");
38 } 38 }
39 39
40 var continueTest2 = function() { 40 var continueTest2 = function() {
41 shouldBeEqualToString("iframe.getSVGDocument().toString()", "[object SVGDocu ment]"); 41 shouldBeEqualToString("iframe.getSVGDocument().toString()", "[object XMLDocu ment]");
42 iframe.parentNode.removeChild(iframe); 42 iframe.parentNode.removeChild(iframe);
43 43
44 embed = document.createElement("embed"); 44 embed = document.createElement("embed");
45 embed.onload = continueTest3; 45 embed.onload = continueTest3;
46 embed.src = "resources/getsvgdocument.svg"; 46 embed.src = "resources/getsvgdocument.svg";
47 document.documentElement.appendChild(embed); 47 document.documentElement.appendChild(embed);
48 shouldBeTrue("!!embed.getSVGDocument"); 48 shouldBeTrue("!!embed.getSVGDocument");
49 } 49 }
50 50
51 var continueTest3 = function(event) { 51 var continueTest3 = function(event) {
52 shouldBeEqualToString("embed.getSVGDocument().toString()", "[object SVGDocum ent]"); 52 shouldBeEqualToString("embed.getSVGDocument().toString()", "[object XMLDocum ent]");
53 embed.parentNode.removeChild(embed); 53 embed.parentNode.removeChild(embed);
54 54
55 object = document.createElement("object"); 55 object = document.createElement("object");
56 object.onload = continueTest4; 56 object.onload = continueTest4;
57 object.data = "resources/getsvgdocument.svg"; 57 object.data = "resources/getsvgdocument.svg";
58 document.documentElement.appendChild(object); 58 document.documentElement.appendChild(object);
59 shouldBeTrue("!!object.getSVGDocument"); 59 shouldBeTrue("!!object.getSVGDocument");
60 } 60 }
61 61
62 function continueTest4() { 62 function continueTest4() {
63 shouldBeEqualToString("object.getSVGDocument().toString()", "[object SVGDocu ment]"); 63 shouldBeEqualToString("object.getSVGDocument().toString()", "[object XMLDocu ment]");
64 object.parentNode.removeChild(object); 64 object.parentNode.removeChild(object);
65 65
66 finishJSTest(); 66 finishJSTest();
67 } 67 }
68 68
69 startTest(); 69 startTest();
70 </script> 70 </script>
71 </body> 71 </body>
72 </html> 72 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698