| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../js/resources/js-test-pre.js"></script> | 4 <script src="../js/resources/js-test-pre.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <div id="test-div" style="font-size: 10pt; -webkit-transform: rotate(100grad); -
webkit-animation-delay: 0.2s;"></div> | 7 <div id="test-div" style="font-size: 10pt; -webkit-transform: rotate(100grad); -
webkit-animation-delay: 0.2s;"></div> |
| 8 <script> | 8 <script> |
| 9 if (window.testRunner) | 9 if (window.testRunner) |
| 10 testRunner.dumpAsText(); | 10 testRunner.dumpAsText(); |
| 11 | 11 |
| 12 var invalidAccessError = "Error: InvalidAccessError: DOM Exception 15"; | 12 var invalidAccessError = "InvalidAccessError: A parameter or an operation was no
t supported by the underlying object."; |
| 13 | 13 |
| 14 description("Testing whether CSSPrimitiveValue.getFloatValue() converts units co
rrectly."); | 14 description("Testing whether CSSPrimitiveValue.getFloatValue() converts units co
rrectly."); |
| 15 | 15 |
| 16 function getFloatValue(propertyName, unit) | 16 function getFloatValue(propertyName, unit) |
| 17 { | 17 { |
| 18 var result = document.getElementById("test-div").style.getPropertyCSSValue(p
ropertyName).getFloatValue(unit); | 18 var result = document.getElementById("test-div").style.getPropertyCSSValue(p
ropertyName).getFloatValue(unit); |
| 19 return Number(result.toFixed(6)); | 19 return Number(result.toFixed(6)); |
| 20 } | 20 } |
| 21 | 21 |
| 22 function getFirstFloatValueInList(propertyName, unit) | 22 function getFirstFloatValueInList(propertyName, unit) |
| (...skipping 30 matching lines...) Expand all Loading... |
| 53 shouldThrow("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS
_RGBCOLOR)", "invalidAccessError"); | 53 shouldThrow("getFirstFloatValueInList('-webkit-transform', CSSPrimitiveValue.CSS
_RGBCOLOR)", "invalidAccessError"); |
| 54 | 54 |
| 55 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_PERC
ENTAGE)", "invalidAccessError"); | 55 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_PERC
ENTAGE)", "invalidAccessError"); |
| 56 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_PX)"
, "invalidAccessError"); | 56 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_PX)"
, "invalidAccessError"); |
| 57 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_DEG)
", "invalidAccessError"); | 57 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_DEG)
", "invalidAccessError"); |
| 58 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_HZ)"
, "invalidAccessError"); | 58 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_HZ)"
, "invalidAccessError"); |
| 59 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_RGBC
OLOR)", "invalidAccessError"); | 59 shouldThrow("getFloatValue('-webkit-animation-delay', CSSPrimitiveValue.CSS_RGBC
OLOR)", "invalidAccessError"); |
| 60 </script> | 60 </script> |
| 61 <script src="../js/resources/js-test-post.js"></script> | 61 <script src="../js/resources/js-test-post.js"></script> |
| 62 </body> | 62 </body> |
| OLD | NEW |