Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Issue 2049283002: Make sure CSS agent messages flush before testing. (Closed)

Created:
4 years, 6 months ago by rune
Modified:
4 years, 6 months ago
Reviewers:
dgozman, pfeldman
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, sergeyv+blink_chromium.org, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make sure CSS agent messages flush before testing. While working on updating active stylesheets as part of the style and layout tree update in [1], two inspector tests started failing. The reason was these tests rely on a console message to trigger a step in the test after the active stylesheets have been pushed to the inspector client. But even if the stylesheets were updated in InspectorCSSAgent before the console message was sent, the console message arrived in the client before the new active stylesheets. The reason was that the console message is immediately flushed, while the messages from the InspectorCSSAgent are lazily flushed from WebDevToolsAgentImpl:: didProcessTask. I tried to force the active stylesheet update with a forced layout tree update like this: document.documentElement.offsetTop; console.log(...); But, due the console.log message being dispatched first as described above, I ended up postponing the console.log with a rAF which means it will run in a later task and the didProcessTask will trigger in between to flush the active stylesheet message(s). Note that this was not currently causing any failures. It's done in preparation for landing changes for 567021 without breaking anything. Looking at TestExpectations, I noticed crbug.com/597572, which might be a similar issue. [1] https://codereview.chromium.org/1913833002/ R=pfeldman@chromium.org,dgozman@chromium.org BUG=567021 Committed: https://crrev.com/debc55c49bd4a79870be6482bc4466971cdb5a1b Cr-Commit-Position: refs/heads/master@{#398825}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Use setTimeout #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-navigated.js View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 12 (5 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2049283002/1
4 years, 6 months ago (2016-06-08 21:18:03 UTC) #2
rune
ptal
4 years, 6 months ago (2016-06-08 23:22:38 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/235788)
4 years, 6 months ago (2016-06-09 00:13:01 UTC) #5
pfeldman
lgtm https://codereview.chromium.org/2049283002/diff/1/third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-navigated.js File third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-navigated.js (right): https://codereview.chromium.org/2049283002/diff/1/third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-navigated.js#newcode3 third_party/WebKit/LayoutTests/http/tests/inspector/resource-tree/resources/script-navigated.js:3: requestAnimationFrame(() => { We don't need a frame ...
4 years, 6 months ago (2016-06-09 05:25:04 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2049283002/20001
4 years, 6 months ago (2016-06-09 08:15:29 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 6 months ago (2016-06-09 09:34:39 UTC) #10
commit-bot: I haz the power
4 years, 6 months ago (2016-06-09 09:36:16 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/debc55c49bd4a79870be6482bc4466971cdb5a1b
Cr-Commit-Position: refs/heads/master@{#398825}

Powered by Google App Engine
This is Rietveld 408576698