blob: cc9be3663944f6e0e9891ebcb4063f2cf8e76b7a [file] [log] [blame]
Test that WI.CSSStyleDeclaration.prototype.resolveVariableValue works as expected.
== Running test suite: WI.CSSStyleDeclaration.prototype.resolveVariableValue
-- Running test case: NotVariable
PASS: "red" should resolve to null.
-- Running test case: EmptyVariable
PASS: "var()" should resolve to null.
-- Running test case: InvalidVariable
PASS: "var(invalid)" should resolve to null.
-- Running test case: NonExistentVariable
PASS: "var(--DNE)" should resolve to null.
-- Running test case: ValidVariable
PASS: "var(--a)" should resolve to "blue".
-- Running test case: InvalidFallbackValue
PASS: "var(--DNE, )" should resolve to null.
-- Running test case: ValidFallbackValue
PASS: "var(--DNE, red)" should resolve to "red".
-- Running test case: InvalidFallbackVariable
PASS: "var(--DNE, var(--DNE))" should resolve to null.
-- Running test case: ValidFallbackVariable
PASS: "var(--DNE, var(--b, red))" should resolve to "green".
-- Running test case: ValidVariableWithInvalidFallbackValue
PASS: "var(--a, )" should resolve to "blue".
-- Running test case: ValidVariableWithValidFallbackValue
PASS: "var(--a, red)" should resolve to "blue".
-- Running test case: ValidVariableWithInvalidFallbackVariable
PASS: "var(--a, var(--DNE))" should resolve to "blue".
-- Running test case: ValidVariableWithValidFallbackVariable
PASS: "var(--a, var(--b))" should resolve to "blue".