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

Side by Side Diff: LayoutTests/svg/dynamic-updates/resources/SVGTestCase.js

Issue 43223002: SVGTests should not leave detached elements in the tree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Always reattach Created 7 years, 2 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 // Force activating pixel tests - this variable is used in fast/js/resources/js- test-pre.js, when calling setDumpAsText(). 1 // Force activating pixel tests - this variable is used in fast/js/resources/js- test-pre.js, when calling setDumpAsText().
2 window.enablePixelTesting = true; 2 window.enablePixelTesting = true;
3 3
4 var svgNS = "http://www.w3.org/2000/svg"; 4 var svgNS = "http://www.w3.org/2000/svg";
5 var xlinkNS = "http://www.w3.org/1999/xlink"; 5 var xlinkNS = "http://www.w3.org/1999/xlink";
6 var xhtmlNS = "http://www.w3.org/1999/xhtml"; 6 var xhtmlNS = "http://www.w3.org/1999/xhtml";
7 7
8 var rootSVGElement; 8 var rootSVGElement;
9 var iframeElement; 9 var iframeElement;
10 10
11 function createSVGElement(name) { 11 function createSVGElement(name) {
12 return document.createElementNS(svgNS, "svg:" + name); 12 return document.createElementNS(svgNS, "svg:" + name);
13 } 13 }
14 14
15 function shouldHaveBBox(element, width, height)
16 {
17 shouldBe(element + ".getBBox().width", width);
18 shouldBe(element + ".getBBox().height", height);
19 }
20
15 function createSVGTestCase() { 21 function createSVGTestCase() {
16 if (window.testRunner) 22 if (window.testRunner)
17 testRunner.waitUntilDone(); 23 testRunner.waitUntilDone();
18 24
19 rootSVGElement = createSVGElement("svg"); 25 rootSVGElement = createSVGElement("svg");
20 rootSVGElement.setAttribute("width", "300"); 26 rootSVGElement.setAttribute("width", "300");
21 rootSVGElement.setAttribute("height", "300"); 27 rootSVGElement.setAttribute("height", "300");
22 28
23 var bodyElement = document.documentElement.lastChild; 29 var bodyElement = document.documentElement.lastChild;
24 bodyElement.insertBefore(rootSVGElement, document.getElementById("descriptio n")); 30 bodyElement.insertBefore(rootSVGElement, document.getElementById("descriptio n"));
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 var script = document.createElement("script"); 63 var script = document.createElement("script");
58 64
59 script.onload = function() { 65 script.onload = function() {
60 if (window.testRunner) 66 if (window.testRunner)
61 testRunner.notifyDone(); 67 testRunner.notifyDone();
62 }; 68 };
63 69
64 script.src = "../../fast/js/resources/js-test-post.js"; 70 script.src = "../../fast/js/resources/js-test-post.js";
65 document.body.appendChild(script); 71 document.body.appendChild(script);
66 } 72 }
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/svg/dynamic-updates/script-tests/SVGCircleElement-dom-requiredFeatures.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698