Commit c3d8da07 authored by Stephen McGruer's avatar Stephen McGruer Committed by Commit Bot

Remove 'async' from async_tests in display-lock/

Passing an async function to async_test will soon be disallowed in WPT,
as any asserts thrown will be turned into unhandled promise rejections
and the test will timeout. If a test needs async functions it should use
promise_test instead - however in this case the tests don't actually
need async functions (they don't use await or rely on promises).

Bug: https://github.com/web-platform-tests/wpt/pull/25540
Change-Id: I9be1f0b89350b611ed7db260e9ec5b79def03305
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414758Reviewed-by: default avatarvmpstr <vmpstr@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807916}
parent e4999266
...@@ -37,7 +37,7 @@ function axElementById(id) { ...@@ -37,7 +37,7 @@ function axElementById(id) {
return accessibilityController.accessibleElementById(id); return accessibilityController.accessibleElementById(id);
} }
async_test(async (t) => { async_test((t) => {
const target = document.getElementById("target"); const target = document.getElementById("target");
let axTarget = axElementById("target"); let axTarget = axElementById("target");
t.step(() => { assert_false(axTarget.isIgnored); }); t.step(() => { assert_false(axTarget.isIgnored); });
......
...@@ -29,7 +29,7 @@ function axElementById(id) { ...@@ -29,7 +29,7 @@ function axElementById(id) {
return accessibilityController.accessibleElementById(id); return accessibilityController.accessibleElementById(id);
} }
async_test(async (t) => { async_test((t) => {
let target = document.getElementById("target"); let target = document.getElementById("target");
let axTarget = axElementById("target"); let axTarget = axElementById("target");
t.step(() => { assert_false(axTarget.isIgnored); }); t.step(() => { assert_false(axTarget.isIgnored); });
......
...@@ -24,7 +24,7 @@ function axElementById(id) { ...@@ -24,7 +24,7 @@ function axElementById(id) {
return accessibilityController.accessibleElementById(id); return accessibilityController.accessibleElementById(id);
} }
async_test(async(t) => { async_test((t) => {
let axHidden = axElementById("hidden"); let axHidden = axElementById("hidden");
// #hidden is locked, and thus is saved as an AXNodeObject instead of an AXLayoutObject, // #hidden is locked, and thus is saved as an AXNodeObject instead of an AXLayoutObject,
// and has 3 child nodes: "foo" text, "<newline>" text, and #child node. // and has 3 child nodes: "foo" text, "<newline>" text, and #child node.
......
...@@ -28,7 +28,7 @@ function axElementById(id) { ...@@ -28,7 +28,7 @@ function axElementById(id) {
// and has 3 child nodes: "foo" text, "<newline>" text, and #child node. // and has 3 child nodes: "foo" text, "<newline>" text, and #child node.
// Note that we have the separate <newline> text because it's an AXNodeObject and does // Note that we have the separate <newline> text because it's an AXNodeObject and does
// not do whitespace collapsing (though this might change in the future). // not do whitespace collapsing (though this might change in the future).
async_test(async(t) => { async_test((t) => {
let axHidden = axElementById("hidden"); let axHidden = axElementById("hidden");
t.step(() => { assert_equals(axHidden.childrenCount, 3, "Children count when locked"); }); t.step(() => { assert_equals(axHidden.childrenCount, 3, "Children count when locked"); });
......
...@@ -25,7 +25,7 @@ function axElementById(id) { ...@@ -25,7 +25,7 @@ function axElementById(id) {
return accessibilityController.accessibleElementById(id); return accessibilityController.accessibleElementById(id);
} }
async_test(async(t) => { async_test((t) => {
let axHidden = axElementById("hidden"); let axHidden = axElementById("hidden");
// #hidden is locked, and thus is saved as an AXNodeObject instead of an AXLayoutObject, // #hidden is locked, and thus is saved as an AXNodeObject instead of an AXLayoutObject,
// and has 3 child nodes: "foo" text, "<newline>" text, and #child node. // and has 3 child nodes: "foo" text, "<newline>" text, and #child node.
......
...@@ -30,7 +30,7 @@ function axElementById(id) { ...@@ -30,7 +30,7 @@ function axElementById(id) {
return accessibilityController.accessibleElementById(id); return accessibilityController.accessibleElementById(id);
} }
async_test(async(t) => { async_test((t) => {
let axHidden = axElementById("hidden"); let axHidden = axElementById("hidden");
t.step(() => { t.step(() => {
// #hidden is locked, and thus is saved as an AXNodeObject instead of an AXLayoutObject, // #hidden is locked, and thus is saved as an AXNodeObject instead of an AXLayoutObject,
......
...@@ -24,7 +24,7 @@ function axElementById(id) { ...@@ -24,7 +24,7 @@ function axElementById(id) {
return accessibilityController.accessibleElementById(id); return accessibilityController.accessibleElementById(id);
} }
async_test(async(t) => { async_test((t) => {
let axHidden = axElementById("hidden"); let axHidden = axElementById("hidden");
// #hidden is locked, and thus is saved as an AXNodeObject instead of an AXLayoutObject, // #hidden is locked, and thus is saved as an AXNodeObject instead of an AXLayoutObject,
// and has 3 child nodes: "foo" text, "<newline>" text, and #child node. // and has 3 child nodes: "foo" text, "<newline>" text, and #child node.
......
...@@ -29,7 +29,7 @@ function axElementById(id) { ...@@ -29,7 +29,7 @@ function axElementById(id) {
return accessibilityController.accessibleElementById(id); return accessibilityController.accessibleElementById(id);
} }
async_test(async (t) => { async_test((t) => {
let target = document.getElementById("target"); let target = document.getElementById("target");
let axTarget = axElementById("target"); let axTarget = axElementById("target");
t.step(() => { assert_false(axTarget.isIgnored); }); t.step(() => { assert_false(axTarget.isIgnored); });
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment