blob: 530d9860ba9b9bcf9677a824e72c85150d75919d [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 NoModificationAllowedError: The object can not be modified..
PASS left.setFloatValue(CSSPrimitiveValue.CSS_DIMENSION, 25) threw exception NoModificationAllowedError: The object can not be modified..
PASS left.setFloatValue(CSSPrimitiveValue.CSS_PX, 25) threw exception NoModificationAllowedError: The object can not be modified..
PASS left.setFloatValue(CSSPrimitiveValue.CSS_UNKNOWN, 25) threw exception NoModificationAllowedError: The object can not be modified..
PASS left.setFloatValue(CSSPrimitiveValue.CSS_STRING, 25) threw exception NoModificationAllowedError: The object can not be modified..
PASS left.getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN) threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getFloatValue(CSSPrimitiveValue.CSS_STRING) threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getStringValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getCounterValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getRectValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getRGBColorValue() threw exception InvalidAccessError: The object does not support the operation or argument..
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 NoModificationAllowedError: The object can not be modified..
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_ATTR, "G'day!") threw exception NoModificationAllowedError: The object can not be modified..
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_UNKNOWN, 'Hi there!') threw exception NoModificationAllowedError: The object can not be modified..
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_DIMENSION, "G'day!") threw exception NoModificationAllowedError: The object can not be modified..
PASS fontFamily.setStringValue(CSSPrimitiveValue.CSS_COUNTER, 'Hello, world!') threw exception NoModificationAllowedError: The object can not be modified..
PASS fontFamily.getFloatValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS fontFamily.getCounterValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS fontFamily.getRectValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS fontFamily.getRGBColorValue() threw exception InvalidAccessError: The object does not support the operation or argument..
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 NoModificationAllowedError: The object can not be modified..
PASS left.setFloatValue(CSSPrimitiveValue.CSS_DIMENSION, 25) threw exception NoModificationAllowedError: The object can not be modified..
PASS left.setFloatValue(CSSPrimitiveValue.CSS_PX, 25) threw exception NoModificationAllowedError: The object can not be modified..
PASS left.setFloatValue(CSSPrimitiveValue.CSS_UNKNOWN, 25) threw exception NoModificationAllowedError: The object can not be modified..
PASS left.setFloatValue(CSSPrimitiveValue.CSS_STRING, 25) threw exception NoModificationAllowedError: The object can not be modified..
PASS left.getFloatValue(CSSPrimitiveValue.CSS_UNKNOWN) threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getFloatValue(CSSPrimitiveValue.CSS_STRING) threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getStringValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getCounterValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getRectValue() threw exception InvalidAccessError: The object does not support the operation or argument..
PASS left.getRGBColorValue() threw exception InvalidAccessError: The object does not support the operation or argument..
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