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

Side by Side Diff: LayoutTests/svg/dynamic-updates/script-tests/SVGPolygonElement-svgdom-requiredFeatures.js

Issue 20738002: Make DOMImplementation::hasFeature() behave according to specification (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Without the binaries so that the try bots are happy Created 7 years, 4 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 // [Name] SVGPolygonElement-svgdom-requiredFeatures.js 1 // [Name] SVGPolygonElement-svgdom-requiredFeatures.js
2 // [Expected rendering result] a series of PASS messages 2 // [Expected rendering result] a series of PASS messages
3 3
4 createSVGTestCase(); 4 createSVGTestCase();
5 5
6 var polygonElement = createSVGElement("polygon"); 6 var polygonElement = createSVGElement("polygon");
7 polygonElement.setAttribute("points", "0,0 200,0 200,200 0, 200"); 7 polygonElement.setAttribute("points", "0,0 200,0 200,200 0, 200");
8 8
9 rootSVGElement.appendChild(polygonElement); 9 rootSVGElement.appendChild(polygonElement);
10 10
11 function repaintTest() { 11 function repaintTest() {
12 debug("Check that SVGPolygonElement is initially displayed"); 12 debug("Check that SVGPolygonElement is initially displayed");
13 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", "inline"); 13 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", "inline");
14 debug("Check that setting requiredFeatures to something invalid makes it not render"); 14 debug("Check that setting requiredFeatures to something invalid makes it not render");
15 polygonElement.requiredFeatures.appendItem("foo"); 15 polygonElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/featu re#BogusFeature");
16 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", ""); 16 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", "");
17 debug("Check that setting requiredFeatures to something valid makes it rende r again"); 17 debug("Check that setting requiredFeatures to something valid makes it rende r again");
18 polygonElement.requiredFeatures.replaceItem("http://www.w3.org/TR/SVG11/feat ure#Shape", 0); 18 polygonElement.requiredFeatures.replaceItem("http://www.w3.org/TR/SVG11/feat ure#Shape", 0);
19 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", "inline"); 19 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", "inline");
20 debug("Check that adding something valid to requiredFeatures keeps rendering the element"); 20 debug("Check that adding something valid to requiredFeatures keeps rendering the element");
21 polygonElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/featu re#Gradient"); 21 polygonElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/featu re#Gradient");
22 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", "inline"); 22 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", "inline");
23 debug("Check that adding something invalid to requiredFeatures makes it not render"); 23 debug("Check that adding something invalid to requiredFeatures makes it not render");
24 polygonElement.requiredFeatures.appendItem("foo"); 24 polygonElement.requiredFeatures.appendItem("http://www.w3.org/TR/SVG11/featu re#BogusFeature");
25 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", ""); 25 shouldBeEqualToString("document.defaultView.getComputedStyle(polygonElement, null).display", "");
26 26
27 completeTest(); 27 completeTest();
28 } 28 }
29 29
30 var successfullyParsed = true; 30 var successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698