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 <body> |
| 4 <script src="../resources/testharness.js"></script> |
| 5 <script src="../resources/testharnessreport.js"></script> |
| 6 <script> |
| 7 test(function() { |
| 8 for (var i = 0.0; i <= 1.0; i += 0.01) { |
| 9 var rgba = 'rgba(0, 0, 0, ' + parseFloat(i.toFixed(2)) + ')'; |
| 10 document.body.style.color = rgba; |
| 11 assert_equals(document.body.style.color, rgba); |
| 12 assert_equals(getComputedStyle(document.body).color, rgba); |
| 13 } |
| 14 }); |
| 15 </script> |
| 16 |
OLD | NEW |