MD Settings: browser test failures in settings_main.js (outside of CQ) |
|||
Issue descriptionChanges related to issue 593989 have made some tests flaky or fragile, which a LOT of CLs in progress have encountered today. Symptoms: "Script error." or "Uncaught TypeError: Cannot read property '$$' of null" in MD Settings browser tests. Cause: in settings_main.js currentRouteChanged_ we schedule an async call to overscrollHeight_(). overscrollHeight_() inspects a bunch of elements that live in dom-ifs, so it returns early if the currentRoute property shows those elements won't exist. However, because other changes to currentRoute can be made in between one currentRouteChanged_ call and the async call to overscrollHeight_(), using async() in currentRouteChanged_ is not sufficient to ensure that the dom-ifs reflect the **current** value of currentRoute while executing overscrollHeight_(). Possible fixes: * Use setTimeout so other async(fn) operations and dom-if stamping are guaranteed to happen together, before entering overscrollHeight_() * Call Polymer.dom.flush in overscrollHeight_() after checking currentRoute, to ensure the dom-ifs all accurately reflect currentRoute
,
Jul 27 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7f2d9d4a9232dc7062689261a40a76e577d80a25 commit 7f2d9d4a9232dc7062689261a40a76e577d80a25 Author: michaelpg <michaelpg@chromium.org> Date: Wed Jul 27 07:55:50 2016 MD Settings: Flush templates in settings-main before checking An odd interleaving of async calls can cause dom-ifs not to be updated yet in a function scheduled by async(). This causes expected elements to not exist at the moment we look for them, even though the properties are correct. TBR=tommycli@chromium.org BUG= 631891 , 593989 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2182283003 Cr-Commit-Position: refs/heads/master@{#408074} [modify] https://crrev.com/7f2d9d4a9232dc7062689261a40a76e577d80a25/chrome/browser/resources/settings/settings_main/settings_main.js
,
Aug 2 2016
,
Aug 16 2016
|
|||
►
Sign in to add a comment |
|||
Comment 1 by michae...@chromium.org
, Jul 27 2016