Commit b507097f authored by Eric Willigers's avatar Eric Willigers Committed by Commit Bot

SVG: Test pointer-events computed value

Like other CSS keywords, pointer-events keywords serialize in lower case.
https://svgwg.org/svg2-draft/interact.html#PointerEventsProperty

Change-Id: Iae5aed5cb8280f6b6df84024d076252af59cff11
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1706214
Commit-Queue: Eric Willigers <ericwilligers@chromium.org>
Reviewed-by: default avatarAnders Hartvoll Ruud <andruud@chromium.org>
Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#678493}
parent 229413fc
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:h="http://www.w3.org/1999/xhtml"
width="800px" height="8000px">
<title>SVG Scripting and Interactivity: getComputedStyle().pointerEvents</title>
<metadata>
<h:link rel="help" href="https://svgwg.org/svg2-draft/interact.html#PointerEventsProperty"/>
<h:meta name="assert" content="pointer-events computed value is as specified."/>
</metadata>
<g id="target"></g>
<h:script src="/resources/testharness.js"/>
<h:script src="/resources/testharnessreport.js"/>
<h:script src="/css/support/computed-testcommon.js"/>
<script><![CDATA[
test_computed_value("pointer-events", "auto");
test_computed_value("pointer-events", "bounding-box");
test_computed_value("pointer-events", "visiblepainted");
test_computed_value("pointer-events", "visiblefill");
test_computed_value("pointer-events", "visiblestroke");
test_computed_value("pointer-events", "visible");
test_computed_value("pointer-events", "painted");
test_computed_value("pointer-events", "fill");
test_computed_value("pointer-events", "stroke");
test_computed_value("pointer-events", "all");
test_computed_value("pointer-events", "none");
]]></script>
</svg>
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:h="http://www.w3.org/1999/xhtml"
width="800px" height="8000px">
......
This is a testharness.js-based test.
PASS e.style['pointer-events'] = "auto" should set the property value
PASS e.style['pointer-events'] = "bounding-box" should set the property value
FAIL e.style['pointer-events'] = "visiblePainted" should set the property value assert_equals: serialization should be canonical expected "visiblePainted" but got "visiblepainted"
FAIL e.style['pointer-events'] = "visibleFill" should set the property value assert_equals: serialization should be canonical expected "visibleFill" but got "visiblefill"
FAIL e.style['pointer-events'] = "visibleStroke" should set the property value assert_equals: serialization should be canonical expected "visibleStroke" but got "visiblestroke"
PASS e.style['pointer-events'] = "visible" should set the property value
PASS e.style['pointer-events'] = "painted" should set the property value
PASS e.style['pointer-events'] = "fill" should set the property value
PASS e.style['pointer-events'] = "stroke" should set the property value
PASS e.style['pointer-events'] = "all" should set the property value
PASS e.style['pointer-events'] = "none" should set the property value
Harness: the test ran to completion.
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg"
xmlns:h="http://www.w3.org/1999/xhtml"
width="800px" height="8000px">
......@@ -15,9 +14,9 @@
test_valid_value("pointer-events", "auto");
test_valid_value("pointer-events", "bounding-box");
test_valid_value("pointer-events", "visiblePainted");
test_valid_value("pointer-events", "visibleFill");
test_valid_value("pointer-events", "visibleStroke");
test_valid_value("pointer-events", "visiblePainted", "visiblepainted");
test_valid_value("pointer-events", "visibleFill", "visiblefill");
test_valid_value("pointer-events", "visibleStroke", "visiblestroke");
test_valid_value("pointer-events", "visible");
test_valid_value("pointer-events", "painted");
test_valid_value("pointer-events", "fill");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment