| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <div id="test-div" style="width: 1ic;"></div> |
| <script> |
| description("Testing behaviors of CSSPrimitiveValue on the ic unit."); |
| |
| var divWidth = document.getElementById("test-div").style.getPropertyCSSValue("width"); |
| |
| shouldBe("divWidth.primitiveType", "CSSPrimitiveValue.CSS_UNKNOWN"); |
| |
| shouldThrowErrorName("divWidth.getFloatValue(CSSPrimitiveValue.CSS_S)", "InvalidAccessError"); |
| shouldThrowErrorName("divWidth.getCounterValue()", "InvalidAccessError"); |
| shouldThrowErrorName("divWidth.getRGBColorValue()", "InvalidAccessError"); |
| shouldThrowErrorName("divWidth.getRectValue()", "InvalidAccessError"); |
| shouldThrowErrorName("divWidth.getStringValue()", "InvalidAccessError"); |
| </script> |
| <script src="../../resources/js-test-post.js"></script> |
| </body> |