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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html

Issue 2114783003: Fix the testharness async test API usage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More fixes 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html b/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html
index 4e5ce83c4f9c8f26b5fe8b424b3ebbe75c039362..7537f01f06191d997d962986e278b71898199f1b 100644
--- a/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html
+++ b/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow.html
@@ -16,12 +16,9 @@
<script>
async_test((test) => {
- document.onpointerlockerror = () => {
- assert_true(false, 'onpointerlockerror is not expected.');
- test.done();
- };
+ document.onpointerlockerror = test.unreached_func('onpointerlockerror is not expected.');
- document.onpointerlockchange = () => {
+ document.onpointerlockchange = test.step_func(() => {
// Not interested in handling before or after exitPointerLock.
if (document.pointerLockElement === null)
return;
@@ -32,13 +29,15 @@ async_test((test) => {
document.exitPointerLock();
test.done();
- };
+ });
convertTemplatesToShadowRootsWithin(host);
- assert_equals(document.pointerLockElement, null);
- assert_equals(host.shadowRoot.pointerLockElement, null);
- assert_equals(hostV0.shadowRoot.pointerLockElement, null);
+ test.step(() => {
+ assert_equals(document.pointerLockElement, null);
+ assert_equals(host.shadowRoot.pointerLockElement, null);
+ assert_equals(hostV0.shadowRoot.pointerLockElement, null);
+ });
var canvas = hostV0.shadowRoot.querySelector('canvas');
canvas.requestPointerLock();

Powered by Google App Engine
This is Rietveld 408576698