| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <head><script src="../../js/resources/js-test-pre.js"></script></head> | 2 <head><script src="../../js/resources/js-test-pre.js"></script></head> |
| 3 | 3 |
| 4 <div id="test" style="var-a: apple; var-b: banana; var-c: carrot"></div> | 4 <div id="test" style="var-a: apple; var-b: banana; var-c: carrot"></div> |
| 5 | 5 |
| 6 <script> | 6 <script> |
| 7 description('This tests basic calling of forEach on a CSSVariablesMap object.'); | 7 description('This tests basic calling of forEach on a CSSVariablesMap object.'); |
| 8 | 8 |
| 9 var div = document.querySelector('#test'); | 9 var div = document.querySelector('#test'); |
| 10 var log; | 10 var log; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 div.style.var.forEach(function(value, name, map) { | 27 div.style.var.forEach(function(value, name, map) { |
| 28 log.push(map + ', ' + name + ': ' + value + ', this == ' + JSON.stringify(th
is)); | 28 log.push(map + ', ' + name + ': ' + value + ', this == ' + JSON.stringify(th
is)); |
| 29 }, {test: 'pass'}); | 29 }, {test: 'pass'}); |
| 30 shouldBeEqualToString('log[0]', '[object CSSVariablesMap], a: apple, this == {"t
est":"pass"}'); | 30 shouldBeEqualToString('log[0]', '[object CSSVariablesMap], a: apple, this == {"t
est":"pass"}'); |
| 31 shouldBeEqualToString('log[1]', '[object CSSVariablesMap], b: banana, this == {"
test":"pass"}'); | 31 shouldBeEqualToString('log[1]', '[object CSSVariablesMap], b: banana, this == {"
test":"pass"}'); |
| 32 shouldBeEqualToString('log[2]', '[object CSSVariablesMap], c: carrot, this == {"
test":"pass"}'); | 32 shouldBeEqualToString('log[2]', '[object CSSVariablesMap], c: carrot, this == {"
test":"pass"}'); |
| 33 shouldBe('log.length', '3'); | 33 shouldBe('log.length', '3'); |
| 34 | 34 |
| 35 debug(''); | 35 debug(''); |
| 36 </script> | 36 </script> |
| 37 <script src="../../js/resources/js-test-post.js"></script> | |
| OLD | NEW |