| OLD | NEW |
| 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(); |
| OLD | NEW |