commit | 2c76a0fac8022f693c0ee86a18676734b79e8512 | [log] [tgz] |
---|---|---|
author | Arthur Sonzogni <arthursonzogni@chromium.org> | Tue Sep 04 16:49:09 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Sep 04 16:49:09 2018 |
tree | d9ad87410f18fece3235b6e079ad9e98ac1e56f6 | |
parent | e695110c80d0749d2ed561b5e5152ab7cdfbd328 [diff] |
Fix flaky LayoutTest: adopt-iframe-src-attr-after-remove.html This test was: 1) using non valid HTML syntax (line 3). 2) using (for no reason) named access on the window object https://html.spec.whatwg.org/#named-access-on-the-window-object The iframe with id "iframe" is globally accessible using "window.iframe" (or implicitly "iframe"). This is more or less deprecated in favor of using document.getElementById("iframe"). It causes the test to be flaky (see below for understanding why). This CL removes 1) and 2). Why this test is flaky? --------------------------- Line 37 in DOMContentLoaded handler, adoptAfterLoaded is executed after a 1ms timeout. If the 'load' event is fired before 1ms, the iframe is removed and window.iframe is now undefined. Then in adoptAfterLoaded, 'ifr' is undefined and is dereferenced line 24, the script fails just before calling testRunner.notifyDone(). Bug: 831155, 861808 Change-Id: I131dfb3b74c6d3fea1c412b219008a1be544a4f7 Reviewed-on: https://chromium-review.googlesource.com/1202282 Reviewed-by: Camille Lamy <clamy@chromium.org> Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org> Cr-Commit-Position: refs/heads/master@{#588546}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .