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

Side by Side Diff: LayoutTests/svg/css/script-tests/svg-attribute-length-parsing.js

Issue 44333002: Move innerHTML and outerHTML to Element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased to latest master 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
OLDNEW
1 if (window.testRunner) 1 if (window.testRunner)
2 testRunner.dumpAsText(); 2 testRunner.dumpAsText();
3 3
4 description("Test CSS <length> parsing on SVG presentation attributes.") 4 description("Test CSS <length> parsing on SVG presentation attributes.")
5 createSVGTestCase(); 5 createSVGTestCase();
6 6
7 var text = createSVGElement("text"); 7 var text = createSVGElement("text");
8 text.setAttribute("id", "text"); 8 text.setAttribute("id", "text");
9 text.setAttribute("x", "20px"); 9 text.setAttribute("x", "20px");
10 text.setAttribute("y", "100px"); 10 text.setAttribute("y", "100px");
11 text.setAttribute("visibility", "hidden");
11 text.innerHTML = "Test"; 12 text.innerHTML = "Test";
12 rootSVGElement.appendChild(text); 13 rootSVGElement.appendChild(text);
13 14
14 // Test initial value of font-length. 15 // Test initial value of font-length.
15 shouldBeEqualToString("document.defaultView.getComputedStyle(text, null).fontSiz e", "16px"); 16 shouldBeEqualToString("document.defaultView.getComputedStyle(text, null).fontSiz e", "16px");
16 17
17 // Set valid font-size of 100px 18 // Set valid font-size of 100px
18 text.setAttribute("font-size", "100px"); 19 text.setAttribute("font-size", "100px");
19 shouldBeEqualToString("document.defaultView.getComputedStyle(text, null).fontSiz e", "100px"); 20 shouldBeEqualToString("document.defaultView.getComputedStyle(text, null).fontSiz e", "100px");
20 21
21 // Space between unit and value - invalid according strict parsing rules. 22 // Space between unit and value - invalid according strict parsing rules.
22 text.setAttribute("font-size", "100 px"); 23 text.setAttribute("font-size", "100 px");
23 shouldBeEqualToString("document.defaultView.getComputedStyle(text, null).fontSiz e", "16px"); 24 shouldBeEqualToString("document.defaultView.getComputedStyle(text, null).fontSiz e", "16px");
24 25
25 // Space within the value - invalid according strict parsing rules. 26 // Space within the value - invalid according strict parsing rules.
26 text.setAttribute("font-size", "10 0px"); 27 text.setAttribute("font-size", "10 0px");
27 shouldBeEqualToString("document.defaultView.getComputedStyle(text, null).fontSiz e", "16px"); 28 shouldBeEqualToString("document.defaultView.getComputedStyle(text, null).fontSiz e", "16px");
28 29
29 var successfullyParsed = true; 30 var successfullyParsed = true;
30 31
31 completeTest(); 32 completeTest();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698