| 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-target" style="var-a: fail; var-b: fail;"></div> | 4 <div id="test-target" style="var-a: fail; var-b: fail;"></div> |
| 5 | 5 |
| 6 <script> | 6 <script> |
| 7 description('This tests Javascript modification of CSS variables in inline style
s.'); | 7 description('This tests Javascript modification of CSS variables in inline style
s.'); |
| 8 | 8 |
| 9 var div = document.querySelector('#test-target'); | 9 var div = document.querySelector('#test-target'); |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 var forEachIterations = []; | 21 var forEachIterations = []; |
| 22 div.style.var.forEach(function(value, name, map) { | 22 div.style.var.forEach(function(value, name, map) { |
| 23 forEachIterations.push([value, name, map.toString()]); | 23 forEachIterations.push([value, name, map.toString()]); |
| 24 }); | 24 }); |
| 25 | 25 |
| 26 shouldBe('forEachIterations[0]', '["pass", "a", "[object CSSVariablesMap]"]'); | 26 shouldBe('forEachIterations[0]', '["pass", "a", "[object CSSVariablesMap]"]'); |
| 27 shouldBe('forEachIterations[1]', '["pass", "b", "[object CSSVariablesMap]"]'); | 27 shouldBe('forEachIterations[1]', '["pass", "b", "[object CSSVariablesMap]"]'); |
| 28 shouldBe('forEachIterations[2]', '["pass", "c", "[object CSSVariablesMap]"]'); | 28 shouldBe('forEachIterations[2]', '["pass", "c", "[object CSSVariablesMap]"]'); |
| 29 shouldBe('forEachIterations.length', '3'); | 29 shouldBe('forEachIterations.length', '3'); |
| 30 </script> | 30 </script> |
| 31 <script src="../../js/resources/js-test-post.js"></script> | |
| OLD | NEW |