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

Side by Side Diff: LayoutTests/svg/dom/SVGStyleElement/script-tests/disable-svg-style-element.js

Issue 114373004: Remove the SVGColor and SVGPaint DOM interfaces (were deprecated). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: text diff fix Created 7 years 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 description('Test the disabled property on an svg style element.'); 1 description('Test the disabled property on an svg style element.');
2 2
3 var console = document.getElementById('console'); 3 var console = document.getElementById('console');
4 4
5 // Setup 5 // Setup
6 function createStyle(ns, type, ruletext) { 6 function createStyle(ns, type, ruletext) {
7 var style = document.createElementNS(ns, "style"); 7 var style = document.createElementNS(ns, "style");
8 var rules = document.createTextNode(ruletext); 8 var rules = document.createTextNode(ruletext);
9 style.appendChild(rules); 9 style.appendChild(rules);
10 style.type = type; 10 style.type = type;
(...skipping 13 matching lines...) Expand all
24 24
25 var rect = document.createElementNS(xmlns, "rect"); 25 var rect = document.createElementNS(xmlns, "rect");
26 rect.setAttribute("width", 100); 26 rect.setAttribute("width", 100);
27 rect.setAttribute("height", 100); 27 rect.setAttribute("height", 100);
28 svg.appendChild(rect); 28 svg.appendChild(rect);
29 29
30 document.body.appendChild(svg); 30 document.body.appendChild(svg);
31 31
32 // Simple case 32 // Simple case
33 shouldBeFalse('styleElement.disabled'); 33 shouldBeFalse('styleElement.disabled');
34 shouldBe('window.getComputedStyle(rect).fill', '"#0000ff"'); 34 shouldBe('window.getComputedStyle(rect).fill', '"rgb(0, 0, 255)"');
35 35
36 styleElement.disabled = true 36 styleElement.disabled = true
37 shouldBeTrue('styleElement.disabled'); 37 shouldBeTrue('styleElement.disabled');
38 shouldBe('window.getComputedStyle(rect).fill', '"#ff0000"'); 38 shouldBe('window.getComputedStyle(rect).fill', '"rgb(255, 0, 0)"');
39 39
40 // Test disconnected element 40 // Test disconnected element
41 var newStyleElement = document.createElementNS(xmlns, 'style'); 41 var newStyleElement = document.createElementNS(xmlns, 'style');
42 shouldBeFalse('newStyleElement.disabled'); 42 shouldBeFalse('newStyleElement.disabled');
43 newStyleElement.disabled = true 43 newStyleElement.disabled = true
44 shouldBeFalse('newStyleElement.disabled'); 44 shouldBeFalse('newStyleElement.disabled');
45 45
46 // Test non-CSS element 46 // Test non-CSS element
47 shouldBeFalse('otherStyleElement.disabled'); 47 shouldBeFalse('otherStyleElement.disabled');
48 otherStyleElement.disabled = true 48 otherStyleElement.disabled = true
49 shouldBeFalse('otherStyleElement.disabled'); 49 shouldBeFalse('otherStyleElement.disabled');
50 50
51 document.body.removeChild(svg); 51 document.body.removeChild(svg);
OLDNEW
« no previous file with comments | « LayoutTests/svg/dom/SVGStyleElement/disable-svg-style-element-expected.txt ('k') | LayoutTests/svg/dom/rgb-color-parser.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698