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

Issue 1313013005: Add a test that we resume commits after inserting the body. (Closed)

Created:
5 years, 3 months ago by esprehn
Modified:
5 years, 3 months ago
CC:
blink-reviews, blink-reviews-dom_chromium.org, dglazkov+blink, eae+blinkwatch, gavinp+loader_chromium.org, Nate Chapin, kinuko+watch, rwlbuis, sof, tyoshino+watch_chromium.org
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Add a test that we resume commits after inserting the body. To test our loading behavior we add a new framework of mocks for writing tests. These allow simulating network responses in specific chunks so you can test how the rendering engine reacts to having the content come off the wire. This framework will be used to write future tests for various sub-systems as pages are loading. Future loading/FOUC tests will check painting, layout and if frames have been scheduled as well. The test added in this patch writes html in chunks and checks that we only resume pumping frames after the body has been inserted. The test caught a bug in blink where we would resume commits when loading the initial empty document because the document would insert an implicit <body> calling into WebViewImpl::willInsertBody which then triggers a resumeTreeViewCommits. This bug doesn't manifest when loading real tabs because we always call resize(non-zero) after creating the WebView to set the initial size. This then triggers a layout since the size is non-zero which then does DeprecatedPaintLayerCompositor::didLayout and finally enableCompositingModeIfNeeded which calls back into WebViewImpl::setRootGraphicsLayer(nullptr) which then does setDeferCommits(true) turning back on deferred commits. It looks like this bug may have manifested in 0x0 Android WebViews if they were created and then resized after they started loading. BUG=521692 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201405

Patch Set 1 #

Patch Set 2 : remove extra incs. #

Total comments: 10

Patch Set 3 : dcheng@ review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+429 lines, -15 lines) Patch
M Source/core/dom/Document.h View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 chunks +15 lines, -0 lines 0 comments Download
M Source/core/loader/DocumentLoader.cpp View 1 2 1 chunk +4 lines, -1 line 0 comments Download
M Source/web/WebViewImpl.cpp View 2 chunks +3 lines, -0 lines 0 comments Download
A Source/web/tests/DocumentLoadingRenderingTest.cpp View 1 2 1 chunk +64 lines, -0 lines 0 comments Download
A Source/web/tests/sim/SimLayerTreeView.h View 1 2 1 chunk +30 lines, -0 lines 0 comments Download
A + Source/web/tests/sim/SimLayerTreeView.cpp View 1 2 1 chunk +4 lines, -2 lines 0 comments Download
A Source/web/tests/sim/SimNetwork.h View 1 2 1 chunk +46 lines, -0 lines 0 comments Download
A Source/web/tests/sim/SimNetwork.cpp View 1 2 1 chunk +92 lines, -0 lines 0 comments Download
A Source/web/tests/sim/SimRequest.h View 1 2 1 chunk +48 lines, -0 lines 0 comments Download
A Source/web/tests/sim/SimRequest.cpp View 1 2 1 chunk +78 lines, -0 lines 0 comments Download
A Source/web/tests/sim/SimWebViewClient.h View 1 2 1 chunk +26 lines, -0 lines 0 comments Download
A + Source/web/tests/sim/SimWebViewClient.cpp View 1 2 1 chunk +5 lines, -11 lines 0 comments Download
M Source/web/web.gypi View 1 2 2 chunks +9 lines, -0 lines 0 comments Download
M public/web/WebViewClient.h View 1 2 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 23 (9 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/1313013005/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1313013005/1
5 years, 3 months ago (2015-08-27 16:09:54 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/127065)
5 years, 3 months ago (2015-08-27 16:39:27 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1313013005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1313013005/20001
5 years, 3 months ago (2015-08-27 16:44:45 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-27 18:19:58 UTC) #9
esprehn
5 years, 3 months ago (2015-08-27 18:25:35 UTC) #10
dcheng
https://codereview.chromium.org/1313013005/diff/20001/Source/web/tests/DocumentLoadingRenderingTest.cpp File Source/web/tests/DocumentLoadingRenderingTest.cpp (right): https://codereview.chromium.org/1313013005/diff/20001/Source/web/tests/DocumentLoadingRenderingTest.cpp#newcode20 Source/web/tests/DocumentLoadingRenderingTest.cpp:20: TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterBodyParsedWithoutSheets) Since the fixture doesn't do anything, how ...
5 years, 3 months ago (2015-08-27 23:10:22 UTC) #12
kouhei (in TOK)
> It would be even nicer if there was a way to be notified (in ...
5 years, 3 months ago (2015-08-28 04:28:49 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1313013005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1313013005/40001
5 years, 3 months ago (2015-08-28 08:26:19 UTC) #15
esprehn
https://codereview.chromium.org/1313013005/diff/20001/Source/web/tests/DocumentLoadingRenderingTest.cpp File Source/web/tests/DocumentLoadingRenderingTest.cpp (right): https://codereview.chromium.org/1313013005/diff/20001/Source/web/tests/DocumentLoadingRenderingTest.cpp#newcode20 Source/web/tests/DocumentLoadingRenderingTest.cpp:20: TEST_F(DocumentLoadingRenderingTest, ShouldResumeCommitsAfterBodyParsedWithoutSheets) On 2015/08/27 at 23:10:22, dcheng wrote: > ...
5 years, 3 months ago (2015-08-28 08:31:44 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-08-28 09:42:29 UTC) #18
esprehn
ping.
5 years, 3 months ago (2015-08-28 14:51:52 UTC) #19
dglazkov
On 2015/08/28 at 09:42:29, commit-bot wrote: > Dry run: This issue passed the CQ dry ...
5 years, 3 months ago (2015-08-28 15:00:24 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1313013005/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1313013005/40001
5 years, 3 months ago (2015-08-28 15:00:45 UTC) #22
commit-bot: I haz the power
5 years, 3 months ago (2015-08-28 15:05:13 UTC) #23
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=201405

Powered by Google App Engine
This is Rietveld 408576698