blob: d9e03701598b8a6cd81e80f4131ad128232de96c [file] [log] [blame]
Test exceptions thrown by the CSSPrimitiveValue APIs. Primitive values are currently immutable (see https://bugs.webkit.org/show_bug.cgi?id=31223)
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS left.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_DIMENSION) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_PX) is 10
PASS left.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.setFloatValue(CSSPrimitiveValue.CSS_DIMENSION, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.setFloatValue(CSSPrimitiveValue.CSS_PX, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.setFloatValue(CSSPrimitiveValue.CSS_UNKNOWN, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.setFloatValue(CSSPrimitiveValue.CSS_STRING, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN) threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getFloatValue(CSSPrimitiveValue.CSS_STRING) threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getStringValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getCounterValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getRectValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getRGBColorValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_DIMENSION) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_PX) is 10
PASS fontFamily.getStringValue() is "Times"
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_STRING, 'Hi there!') threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_ATTR, "G'day!") threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_UNKNOWN, 'Hi there!') threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_DIMENSION, "G'day!") threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_COUNTER, 'Hello, world!') threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS fontFamily.getFloatValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS fontFamily.getCounterValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS fontFamily.getRectValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS fontFamily.getRGBColorValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS fontFamily.getStringValue() is "Times"
PASS left.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_DIMENSION) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_PX) is 10
PASS left.setFloatValue(CSSPrimitiveValue.CSS_NUMBER, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.setFloatValue(CSSPrimitiveValue.CSS_DIMENSION, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.setFloatValue(CSSPrimitiveValue.CSS_PX, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.setFloatValue(CSSPrimitiveValue.CSS_UNKNOWN, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.setFloatValue(CSSPrimitiveValue.CSS_STRING, 25) threw exception Error: NoModificationAllowedError: DOM Exception 7.
PASS left.getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN) threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getFloatValue(CSSPrimitiveValue.CSS_STRING) threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getStringValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getCounterValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getRectValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getRGBColorValue() threw exception Error: InvalidAccessError: DOM Exception 15.
PASS left.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_DIMENSION) is 10
PASS left.getFloatValue(CSSPrimitiveValue.CSS_PX) is 10
FAIL fontFamily.getStringValue() should be Times. Threw exception TypeError: undefined is not an object (evaluating 'fontFamily.getStringValue')
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_STRING, 'Hi there!') threw exception TypeError: undefined is not an object (evaluating 'fontFamily.setStringValue').
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_ATTR, "G'day!") threw exception TypeError: undefined is not an object (evaluating 'fontFamily.setStringValue').
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_UNKNOWN, 'Hi there!') threw exception TypeError: undefined is not an object (evaluating 'fontFamily.setStringValue').
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_DIMENSION, "G'day!") threw exception TypeError: undefined is not an object (evaluating 'fontFamily.setStringValue').
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_COUNTER, 'Hello, world!') threw exception TypeError: undefined is not an object (evaluating 'fontFamily.setStringValue').
PASS fontFamily.getFloatValue() threw exception TypeError: undefined is not an object (evaluating 'fontFamily.getFloatValue').
PASS fontFamily.getCounterValue() threw exception TypeError: undefined is not an object (evaluating 'fontFamily.getCounterValue').
PASS fontFamily.getRectValue() threw exception TypeError: undefined is not an object (evaluating 'fontFamily.getRectValue').
PASS fontFamily.getRGBColorValue() threw exception TypeError: undefined is not an object (evaluating 'fontFamily.getRGBColorValue').
FAIL fontFamily.getStringValue() should be Times. Threw exception TypeError: undefined is not an object (evaluating 'fontFamily.getStringValue')
PASS successfullyParsed is true
TEST COMPLETE