Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/fast/table/resources/base.js |
| diff --git a/third_party/WebKit/LayoutTests/fast/table/resources/base.js b/third_party/WebKit/LayoutTests/fast/table/resources/base.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e1b670f271c1463f86c37caa1c7bc1110c256f00 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/fast/table/resources/base.js |
| @@ -0,0 +1,14 @@ |
| +if (window.testRunner) { |
| + // This is a workaroud for an issue that the test runner sends notifyDone |
| + // before resources specified in CSS url finish loading. Currently all |
| + // such resources are specified in inline CSSs so we can rely on the |
| + // Document load event (Note that we cannot rely on the event generally). |
| + testRunner.waitUntilDone(); |
| + window.addEventListener('load', () => { |
| + // Force layout. |
| + document.body.offsetTop; |
| + |
| + testRunner.notifyDone(); |
| + }); |
| +} |
| + |
|
rune
2017/04/18 15:30:09
The name "base.js" doesn't indicate what this scri
yhirano
2017/04/19 01:32:50
Done.
Resources linked from inline CSSs block the
|