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

Side by Side 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, 9 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <html>
3 <head>
4 <title>Pointer Events properties tests</title>
5 <meta name="viewport" content="width=device-width">
6 <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
7 <script src="/resources/testharness.js"></script>
8 <script src="/resources/testharnessreport.js"></script>
9 <!-- Additional helper script for common checks across event types -->
10 <script type="text/javascript" src="pointerevent_support.js"></script>
11 <script>
12 var detected_pointertypes = {};
13 var detected_eventTypes = {};
14 var eventList = ['pointerout', 'pointerover', 'pointerenter', 'point ermove', 'pointerdown', 'pointerup', 'pointerleave'];
15 var expectedPointerId = NaN;
Navid Zolghadr 2017/02/27 16:39:04 I believe the expectedPointerId is not needed in t
16
17 function resetTestState() {
18 detected_eventTypes = {};
19 expectedPointerId = NaN;
20 }
21 function run() {
22 var test_pointerEvent = setup_pointerevent_test("pointerevent at tributes", ALL_POINTERS);
23 var target = document.getElementById("target0");
24
25 eventList.forEach(function(eventName) {
26 on_event(target, eventName, function (event) {
27 detected_eventTypes[event.type] = true;
28 detected_pointertypes[event.pointerType] = true;
29
30 if (Object.keys(detected_eventTypes).length == eventList .length) {
31 test_pointerEvent.done();
32 }
33 });
34 });
35 on_event(target, "click", function (event) {
36 assert_unreached("click should not fire on disabled element" );
37 });
38 }
39 </script>
40 <style>
41 #target0 {
42 background: purple;
43 border: 1px solid orange;
44 touch-action: none;
45 width: 200px;
46 height: 100px;
47 }
48 </style>
49 </head>
50 <body onload="run()">
51 <h1> Pointer Event: pointerevents fire to disabled form controls</h1>
52 <h2 id="pointerTypeDescription"></h2>
53 <h4>
54 Test Description:
55 Pointerevents are dispatched to disabled form controls.
56 </h4>
57 <div id="instructions">
58 Use the mouse or pen to press on the purple button. Or with touch, t ap on the purple box.
59 </div>
60 <button id="target0" disabled>Disabled button</button>
61 <div id="complete-notice">
62 <p>Test complete: Scroll to Summary to view Pass/Fail Results.</p>
63 <p>The following pointer types were detected: <span id="pointertype- log"></span>.</p>
64 <p>Refresh the page to run the tests again with a different pointer type.</p>
65 </div>
66 <div id="log"></div>
67 </body>
68 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698