Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <title>Harness Test: Floating point alpha values of numbers to two decimial plac es are serialized and returned correctly.</title> | |
| 3 <script src="../resources/testharness.js"></script> | |
| 4 <script src="../resources/testharnessreport.js"></script> | |
| 5 <script> | |
| 6 document.body = document.createElement('body'); | |
|
sashab
2017/01/02 23:04:15
Just put all this in a <body> tag
ktyliu
2017/01/03 02:14:22
Thanks for the tip
Done
| |
| 7 for (var i = 0.0; i <= 1.0; i += 0.01) { | |
| 8 var rgba = 'rgba(0, 0, 0, ' + parseFloat(i.toFixed(2)) + ')'; | |
| 9 document.body.style.color = rgba; | |
|
sashab
2017/01/02 23:04:15
Move all this inside the test() body
ktyliu
2017/01/03 02:14:22
Done
noted that putting test at top means that th
| |
| 10 test(function() { | |
| 11 assert_equals(document.body.style.color, rgba); | |
| 12 assert_equals(getComputedStyle(document.body).color, rgba); | |
| 13 }); | |
| 14 } | |
| 15 </script> | |
| 16 | |
| OLD | NEW |