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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/pointerevents/pointerevent_setpointercapture_disconnected-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 <head>
4 <title>setPointerCapture() throws on disconnected node</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 <script src="pointerevent_support.js"></script>
10 <script type="text/javascript">
11 var detected_pointertypes = {};
12 add_completion_callback(showPointerTypes);
13 var test_setPointerCapture = async_test("setPointerCapture: DOMExcep tion InvalidStateError");
14
15 function run() {
16 var target0 = document.getElementById("target0");
17 var target1 = document.getElementById("target1");
18
19 target1.parentNode.removeChild(target1);
20
21 on_event(target0, "pointerdown", function (event) {
22 detected_pointertypes[ event.pointerType ] = true;
23 try {
24 target1.setPointerCapture(event.pointerId);
25
26 test_setPointerCapture.step(function() {
27 assert_unreached("DOMException: InvalidStateError sh ould have been thrown.");
28 });
29 } catch (e) {
30 // TA: 13.4
31 test_setPointerCapture.step(function() {
32 assert_equals(e.name, "InvalidStateError", "DOMExcep tion should be InvalidStateError");
33 });
34 }
35 test_setPointerCapture.done();
36 });
37 }
38 </script>
39 </head>
40 <body onload="run()">
41 <h1>Pointer Event: DOMException InvalidStateError</h1>
42 <h4>Test Description:
43 When the setPointerCapture method is invoked, if the target node doe s not participate in its ownerDocument's tree, a DOMException with the name Inva lidStateError must be thrown.
44 </h4>
45 <br>
46 <div id="target0">
47 Use the mouse, touch or pen to contact this box.
48 </div>
49 <div id="target1"></div>
50 <div id="complete-notice">
51 <p>The following pointer types were detected: <span id="pointertype- log"></span>.</p>
52 </div>
53 <div id="log"></div>
54 </body>
55 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698