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

Side by Side Diff: LayoutTests/svg/dynamic-updates/script-tests/SVGSVGElement-dom-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, 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 | Annotate | Revision Log
OLDNEW
1 // [Name] SVGSVGElement-dom-requiredFeatures.js 1 // [Name] SVGSVGElement-dom-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 svgElement = rootSVGElement; 6 var svgElement = rootSVGElement;
7 7
8 function repaintTest() { 8 function repaintTest() {
9 debug("Check that SVGSVGElement is initially displayed"); 9 debug("Check that SVGSVGElement is initially displayed");
10 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", "inline"); 10 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", "inline");
11 debug("Check that setting requiredFeatures to something invalid makes it not render"); 11 debug("Check that setting requiredFeatures to something invalid makes it not render");
12 svgElement.setAttribute("requiredFeatures", "foo"); 12 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat ure#BogusFeature");
13 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", ""); 13 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", "");
14 debug("Check that setting requiredFeatures to something valid makes it rende r again"); 14 debug("Check that setting requiredFeatures to something valid makes it rende r again");
15 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat ure#Shape"); 15 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat ure#Shape");
16 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", "inline"); 16 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", "inline");
17 debug("Check that adding something valid to requiredFeatures keeps rendering the element"); 17 debug("Check that adding something valid to requiredFeatures keeps rendering the element");
18 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat ure#Gradient"); 18 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat ure#Gradient");
19 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", "inline"); 19 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", "inline");
20 debug("Check that adding something invalid to requiredFeatures makes it not render"); 20 debug("Check that adding something invalid to requiredFeatures makes it not render");
21 svgElement.setAttribute("requiredFeatures", "foo"); 21 svgElement.setAttribute("requiredFeatures", "http://www.w3.org/TR/SVG11/feat ure#BogusFeature");
22 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", ""); 22 shouldBeEqualToString("document.defaultView.getComputedStyle(svgElement, nul l).display", "");
23 23
24 completeTest(); 24 completeTest();
25 } 25 }
26 26
27 27
28 var successfullyParsed = true; 28 var successfullyParsed = true;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698