Make most accessibility layout tests run after layout has occurred.
This is pre-work for https://chromium-review.googlesource.com/c/chromium/src/+/1369489/29.
Bug: 835455
Change-Id: I23bcce41638ca0d4d07d499e977df7ec9a1cc717
Reviewed-on: https://chromium-review.googlesource.com/c/1484878
Reviewed-by: Xianzhu Wang <[email protected]>
Reviewed-by: Dominic Mazzoni <[email protected]>
Commit-Queue: Alice Boxhall <[email protected]>
Cr-Commit-Position: refs/heads/master@{#636117}
diff --git a/third_party/blink/web_tests/resources/run-after-layout-and-paint.js b/third_party/blink/web_tests/resources/run-after-layout-and-paint.js
index bf2ed0c..ef6771b 100644
--- a/third_party/blink/web_tests/resources/run-after-layout-and-paint.js
+++ b/third_party/blink/web_tests/resources/run-after-layout-and-paint.js
@@ -58,3 +58,18 @@
}, 0);
});
}
+
+function test_after_layout_and_paint(func, name, properties) {
+ var test = async_test(name, properties);
+ runAfterLayoutAndPaint(test.step_func(() => {
+ func.call(test, test);
+ test.done();
+ }, false));
+}
+
+function async_test_after_layout_and_paint(func, name, properties) {
+ var test = async_test(name, properties);
+ runAfterLayoutAndPaint(test.step_func(() => {
+ func.call(test, test);
+ }, false));
+}