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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/pointerlock/pointerlock_remove_target_on_mouseup-manual.html

Issue 2846993002: [PointerLock] Add null check before dispatching click event (Closed)
Patch Set: rbyers's comments: Use wpt/pointerlock/; Rename test Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt_automation/pointerlock/pointerlock_common_input.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/external/wpt/pointerlock/pointerlock_remove_target_on_mouseup-manual.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/pointerlock/pointerlock_remove_target_on_mouseup-manual.html b/third_party/WebKit/LayoutTests/external/wpt/pointerlock/pointerlock_remove_target_on_mouseup-manual.html
new file mode 100644
index 0000000000000000000000000000000000000000..71b9eb693713556a7cf263c8a9cc00880e57758c
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/external/wpt/pointerlock/pointerlock_remove_target_on_mouseup-manual.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Remove PointerLock target on mouseup</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<p>Click anywhere to run the test. If a "PASS" result appears the test passes, otherwise it fails</p>
+<div id="target"></div>
+<script>
+async_test(t => {
+ const target = document.getElementById('target');
+ document.addEventListener('mousedown', t.step_func(() => {
+ target.requestPointerLock();
+ document.addEventListener('mouseup', t.step_func(() => {
+ target.remove();
+ assert_true(document.pointerLockElement === null, 'Pointer lock exited!');
+ t.done();
+ }));
+ }));
+})
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/external/wpt_automation/pointerlock/pointerlock_common_input.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698