OLD | NEW |
1 <html> | 1 <html> |
2 <link rel="import" href="../resources/chai.sky" /> | 2 <import src="../resources/chai.sky" /> |
3 <link rel="import" href="../resources/mocha.sky" /> | 3 <import src="../resources/mocha.sky" /> |
4 <foo /> | 4 <foo /> |
5 <script> | 5 <script> |
6 | 6 |
7 describe('Inline styles', function() { | 7 describe('Inline styles', function() { |
8 it('should be settable using "style" attribute', function() { | 8 it('should be settable using "style" attribute', function() { |
9 var foo = document.querySelector('foo'); | 9 var foo = document.querySelector('foo'); |
10 foo.setAttribute('style', 'color: red'); | 10 foo.setAttribute('style', 'color: red'); |
11 | 11 |
12 | 12 |
13 assert.equal(foo.getAttribute('style'), 'color: red'); | 13 assert.equal(foo.getAttribute('style'), 'color: red'); |
14 assert.equal(foo.style.color, 'rgb(255, 0, 0)'); | 14 assert.equal(foo.style.color, 'rgb(255, 0, 0)'); |
15 assert.equal(window.getComputedStyle(foo).color, 'rgb(255, 0, 0)'); | 15 assert.equal(window.getComputedStyle(foo).color, 'rgb(255, 0, 0)'); |
16 }); | 16 }); |
17 }); | 17 }); |
18 | 18 |
19 </script> | 19 </script> |
20 </html> | 20 </html> |
OLD | NEW |