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

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

Issue 2104943005: Drop the adding and removing of the 'running' class in SVGTestCase.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Force activating pixel tests - this variable is used in resources/js-test.js, when calling setDumpAsText(). 1 // Force activating pixel tests - this variable is used in resources/js-test.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 if (window.testRunner) { 11 if (window.testRunner) {
12 var s = document.createElement('style'); 12 var s = document.createElement('style');
13 s.innerHTML += ".running h1, .running pre, .running div#console, .running p { display:none }";
14 s.innerHTML += "h1, pre, div#console, p { opacity: 0 }"; 13 s.innerHTML += "h1, pre, div#console, p { opacity: 0 }";
15 s.innerHTML += "body { overflow: hidden }"; 14 s.innerHTML += "body { overflow: hidden }";
16 document.head.appendChild(s); 15 document.head.appendChild(s);
17 document.head.parentNode.classList.add("running");
18 } 16 }
19 17
20 function afterTest() { 18 function afterTest() {
21 document.head.parentNode.classList.remove("running");
22 finishJSTest(); 19 finishJSTest();
23 } 20 }
24 21
25 function createSVGElement(name) { 22 function createSVGElement(name) {
26 return document.createElementNS(svgNS, "svg:" + name); 23 return document.createElementNS(svgNS, "svg:" + name);
27 } 24 }
28 25
29 function shouldHaveBBox(element, width, height) 26 function shouldHaveBBox(element, width, height)
30 { 27 {
31 shouldBe(element + ".getBBox().width", width); 28 shouldBe(element + ".getBBox().width", width);
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 var clientRect = rootSVGElement.getBoundingClientRect(); 65 var clientRect = rootSVGElement.getBoundingClientRect();
69 x = x + clientRect.left; 66 x = x + clientRect.left;
70 y = y + clientRect.top; 67 y = y + clientRect.top;
71 68
72 if (window.eventSender) { 69 if (window.eventSender) {
73 eventSender.mouseMoveTo(x, y); 70 eventSender.mouseMoveTo(x, y);
74 eventSender.mouseDown(); 71 eventSender.mouseDown();
75 eventSender.mouseUp(); 72 eventSender.mouseUp();
76 } 73 }
77 } 74 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698