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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_pointerdown-manual.html

Issue 2020083002: Import wpt@1b61dad2be6c5100beb565e91c58b8c1084b3c7d (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing tests Created 4 years, 6 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 <!--
4 Test cases for Pointer Events v1 spec
5 This document references Test Assertions (abbrev TA below) written by Cathy Chan
6 http://www.w3.org/wiki/PointerEvents/TestAssertions
7 -->
8 <head>
9 <title>Pointer Events pointerdown tests</title>
10 <meta name="viewport" content="width=device-width">
11 <link rel="stylesheet" type="text/css" href="pointerevent_styles.css">
12 <script src="/resources/testharness.js"></script>
13 <script src="/resources/testharnessreport.js"></script>
14 <!-- Additional helper script for common checks across event types -->
15 <script type="text/javascript" src="pointerevent_support.js"></script>
16 <script>
17 var detected_pointertypes = {};
18 var test_pointerEvent = async_test("pointerdown event received");
19 // showPointerTypes is defined in pointerevent_support.js
20 // Requirements: the callback function will reference the test_point erEvent object and
21 // will fail unless the async_test is created with the var name "tes t_pointerEvent".
22 add_completion_callback(showPointerTypes);
23
24
25 function run() {
26 var target0 = document.getElementById("target0");
27 var pointerover_event;
28
29 on_event(target0, "pointerover", function (event) {
30 detected_pointertypes[event.pointerType] = true;
31 pointerover_event = event;
32 check_PointerEvent(event);
33 });
34
35 on_event(target0, "pointerdown", function (event) {
36 check_PointerEvent(event);
37
38 test_pointerEvent.step(function () {
39 assert_equals(event.pointerType, pointerover_event.point erType, "pointerType is same for pointerover and pointerdown");
40 assert_equals(event.isPrimary, pointerover_event.isPrima ry, "isPrimary is same for pointerover and pointerdown");
41 });
42
43 test_pointerEvent.done();
44 });
45 }
46 </script>
47 </head>
48 <body onload="run()">
49 <h1>Pointer Events pointerdown tests</h1>
50 <div id="target0">
51 Start with your pointing device outside of this box, then click here .
52 </div>
53 <div id="complete-notice">
54 <p>The following pointer types were detected: <span id="pointertype- log"></span>.</p>
55 <p>Refresh the page to run the tests again with a different pointer type.</p>
56 </div>
57 <div id="log"></div>
58 </body>
59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698