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

Unified Diff: third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow2.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-shadow2.html
diff --git a/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow2.html b/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow2.html
index e39de0068754d4c96cdc94596227eab01b0eea9b..763d4a43984aae2af9cc7d2957dac31f27e62c15 100644
--- a/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow2.html
+++ b/third_party/WebKit/LayoutTests/shadow-dom/v0/pointer-lock-in-shadow2.html
@@ -20,12 +20,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;
@@ -37,15 +34,17 @@ async_test((test) => {
document.exitPointerLock();
test.done();
- };
+ });
convertTemplatesToShadowRootsWithin(host);
var hostV1inV0 = hostV0.shadowRoot.querySelector('#hostV1inV0');
- assert_equals(document.pointerLockElement, null);
- assert_equals(host.shadowRoot.pointerLockElement, null);
- assert_equals(hostV0.shadowRoot.pointerLockElement, null);
- assert_equals(hostV1inV0.shadowRoot.pointerLockElement, null);
+ test.step(() => {
+ assert_equals(document.pointerLockElement, null);
+ assert_equals(host.shadowRoot.pointerLockElement, null);
+ assert_equals(hostV0.shadowRoot.pointerLockElement, null);
+ assert_equals(hostV1inV0.shadowRoot.pointerLockElement, null);
+ });
var canvas = hostV1inV0.shadowRoot.querySelector('canvas');
canvas.requestPointerLock();

Powered by Google App Engine
This is Rietveld 408576698