Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_disabled_form_control-manual.html

Issue 2716063002: Send pointer events regardless of it being a disabled form control. (Closed)
Patch Set: Add layout test Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_disabled_form_control-manual.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_disabled_form_control-manual.html b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_disabled_form_control-manual.html
new file mode 100644
index 0000000000000000000000000000000000000000..96c13690d57b16211697c58a868d2ab1b29c6c78
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/pointerevents/pointerevent_disabled_form_control-manual.html
@@ -0,0 +1,68 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Pointer Events properties tests</title>
+ <meta name="viewport" content="width=device-width">
+ <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <!-- Additional helper script for common checks across event types -->
+ <script type="text/javascript" src="pointerevent_support.js"></script>
+ <script>
+ var detected_pointertypes = {};
+ var detected_eventTypes = {};
+ var eventList = ['pointerout', 'pointerover', 'pointerenter', 'pointermove', 'pointerdown', 'pointerup', 'pointerleave'];
+ var expectedPointerId = NaN;
Navid Zolghadr 2017/02/27 16:39:04 I believe the expectedPointerId is not needed in t
+
+ function resetTestState() {
+ detected_eventTypes = {};
+ expectedPointerId = NaN;
+ }
+ function run() {
+ var test_pointerEvent = setup_pointerevent_test("pointerevent attributes", ALL_POINTERS);
+ var target = document.getElementById("target0");
+
+ eventList.forEach(function(eventName) {
+ on_event(target, eventName, function (event) {
+ detected_eventTypes[event.type] = true;
+ detected_pointertypes[event.pointerType] = true;
+
+ if (Object.keys(detected_eventTypes).length == eventList.length) {
+ test_pointerEvent.done();
+ }
+ });
+ });
+ on_event(target, "click", function (event) {
+ assert_unreached("click should not fire on disabled element");
+ });
+ }
+ </script>
+ <style>
+ #target0 {
+ background: purple;
+ border: 1px solid orange;
+ touch-action: none;
+ width: 200px;
+ height: 100px;
+ }
+ </style>
+ </head>
+ <body onload="run()">
+ <h1> Pointer Event: pointerevents fire to disabled form controls</h1>
+ <h2 id="pointerTypeDescription"></h2>
+ <h4>
+ Test Description:
+ Pointerevents are dispatched to disabled form controls.
+ </h4>
+ <div id="instructions">
+ Use the mouse or pen to press on the purple button. Or with touch, tap on the purple box.
+ </div>
+ <button id="target0" disabled>Disabled button</button>
+ <div id="complete-notice">
+ <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
+ <p>The following pointer types were detected: <span id="pointertype-log"></span>.</p>
+ <p>Refresh the page to run the tests again with a different pointer type.</p>
+ </div>
+ <div id="log"></div>
+ </body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698