blob: 6822622b225ac86d892a4a2a5aec8d059e8f2b69 [file] [log] [blame]
Test that we only invalidate the style when changing an attribute referenced by a stylesheet. This test requires the internals object to work properly.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is false
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is false
Changing the attribute 'foo', it is not referenced by any stylesheet and should not cause any invalidation.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is false
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is false
Changing the attribute 'CamelCase'. It is used by the stylesheet and should cause the target to be invalidated.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is true
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is true
Getting the computed style should for the style to be resolved.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is false
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is false
Removing the attribute should also invalidate the style.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is true
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is true
Getting the computed style should for the style to be resolved.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is false
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is false
Changing the attribute 'camelcase'. It is not used as such by the stylesheet, but in HTML attribute names are case-insensitive and we should still invalidate the style.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is true
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is true
Getting the computed style should for the style to be resolved.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is false
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is false
Removing the attribute should also invalidate the style.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is true
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is true
Getting the computed style should for the style to be resolved.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is false
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is false
Changing the attribute 'CAMELCASE'. It is not used as such by the stylesheet, but in HTML attribute names are case-insensitive and we should still invalidate the style.
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[0]) is true
PASS window.internals.nodeNeedsStyleRecalc(document.querySelectorAll("target")[1]) is true
PASS successfullyParsed is true
TEST COMPLETE