OLD | NEW |
1 <html> | 1 <html> |
2 <import src="../resources/chai.sky" /> | |
3 <import src="../resources/mocha.sky" /> | |
4 <foo /> | 2 <foo /> |
5 <script> | 3 <script> |
| 4 import "../resources/third_party/unittest/unittest.dart"; |
| 5 import "../resources/unit.dart"; |
6 | 6 |
7 describe('Inline styles', function() { | 7 import "dart:sky"; |
8 it('should be settable using "style" attribute', function() { | 8 |
| 9 void main() { |
| 10 initUnit(); |
| 11 |
| 12 test('should be settable using "style" attribute', () { |
9 var foo = document.querySelector('foo'); | 13 var foo = document.querySelector('foo'); |
10 foo.setAttribute('style', 'color: red'); | 14 foo.setAttribute('style', 'color: red'); |
11 | 15 |
12 | 16 |
13 assert.equal(foo.getAttribute('style'), 'color: red'); | 17 expect(foo.getAttribute('style'), equals('color: red')); |
14 assert.equal(foo.style.color, 'rgb(255, 0, 0)'); | 18 expect(foo.style.getPropertyValue("color"), equals('rgb(255, 0, 0)')); |
15 assert.equal(window.getComputedStyle(foo).color, 'rgb(255, 0, 0)'); | 19 expect(window.getComputedStyle(foo).getPropertyValue("color"), |
| 20 equals('rgb(255, 0, 0)')); |
16 }); | 21 }); |
17 }); | 22 } |
18 | |
19 </script> | 23 </script> |
20 </html> | 24 </html> |
OLD | NEW |