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

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

Powered by Google App Engine
This is Rietveld 408576698