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

Side by Side Diff: sky/tests/lowlevel/classlist.sky

Issue 942553002: Make element.style["color"] work in Sky (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Add back removeProperty Created 5 years, 10 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
« no previous file with comments | « sky/tests/lowlevel/bug-438036.sky ('k') | sky/tests/lowlevel/style-basic.sky » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <sky> 2 <sky>
3 <style> 3 <style>
4 div { font-size: 5px; } 4 div { font-size: 5px; }
5 .font-10 { font-size: 10px; } 5 .font-10 { font-size: 10px; }
6 .font-12 { font-size: 12px; } 6 .font-12 { font-size: 12px; }
7 .font-24 { font-size: 24px; } 7 .font-24 { font-size: 24px; }
8 </style> 8 </style>
9 <div id="sandbox"></div> 9 <div id="sandbox"></div>
10 <script> 10 <script>
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 expect(target.classList.toString(), equals("second first")); 95 expect(target.classList.toString(), equals("second first"));
96 // expect(target.classList.toggle("second", true), isTrue); 96 // expect(target.classList.toggle("second", true), isTrue);
97 // expect(target.classList.toString(), equals("second first")); 97 // expect(target.classList.toString(), equals("second first"));
98 // expect(target.classList.toggle("second", true), isTrue); 98 // expect(target.classList.toggle("second", true), isTrue);
99 // expect(target.classList.toggle("second", false), isFalse); 99 // expect(target.classList.toggle("second", false), isFalse);
100 // expect(target.classList.toggle("second", false), isFalse); 100 // expect(target.classList.toggle("second", false), isFalse);
101 // expect(target.classList.toString(), equals("first")); 101 // expect(target.classList.toString(), equals("first"));
102 }); 102 });
103 103
104 test("should dynamically update style", () { 104 test("should dynamically update style", () {
105 expect(window.getComputedStyle(target).getPropertyValue("font-size"), 105 expect(window.getComputedStyle(target)["font-size"],
106 equals("5px")); 106 equals("5px"));
107 target.classList.add("font-10"); 107 target.classList.add("font-10");
108 target.classList.add("font-12"); 108 target.classList.add("font-12");
109 expect(window.getComputedStyle(target).getPropertyValue("font-size"), 109 expect(window.getComputedStyle(target)["font-size"],
110 equals("12px")); 110 equals("12px"));
111 target.classList.add("font-24"); 111 target.classList.add("font-24");
112 expect(window.getComputedStyle(target).getPropertyValue("font-size"), 112 expect(window.getComputedStyle(target)["font-size"],
113 equals("24px")); 113 equals("24px"));
114 target.classList.remove("font-12"); 114 target.classList.remove("font-12");
115 expect(window.getComputedStyle(target).getPropertyValue("font-size"), 115 expect(window.getComputedStyle(target)["font-size"],
116 equals("24px")); 116 equals("24px"));
117 target.classList.remove("font-24"); 117 target.classList.remove("font-24");
118 expect(window.getComputedStyle(target).getPropertyValue("font-size"), 118 expect(window.getComputedStyle(target)["font-size"],
119 equals("10px")); 119 equals("10px"));
120 target.classList.remove("font-10"); 120 target.classList.remove("font-10");
121 expect(window.getComputedStyle(target).getPropertyValue("font-size"), 121 expect(window.getComputedStyle(target)["font-size"],
122 equals("5px")); 122 equals("5px"));
123 }); 123 });
124 } 124 }
125 </script> 125 </script>
126 </sky> 126 </sky>
OLDNEW
« no previous file with comments | « sky/tests/lowlevel/bug-438036.sky ('k') | sky/tests/lowlevel/style-basic.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698