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

Issue 1765623003: ABANDONED CL: Fix delivery of TestFinishedInSecondaryWindow message from OOPIFs. (Closed)

Created:
4 years, 9 months ago by Łukasz Anforowicz
Modified:
4 years, 7 months ago
CC:
blink-reviews, chromium-reviews, darin-cc_chromium.org, jam, jochen+watch_chromium.org, mkwst+moarreviews-shell_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, nasko, Peter Beverloo, site-isolation-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix delivery of TestFinishedInSecondaryWindow message from OOPIFs. Layout Tests run with --site-per-process flag and finishing in an OOPIF were timing out because: - BlinkTestController / NotifyDoneForwarder were only handling ShellViewHostMsg_TestFinishedInSecondaryWindow coming from secondary test windows (in the fixed cases, the message is coming from an OOPIF; note that the current CL fixes handling and routing of the message and naming is OOPIF-ied ["secondary window" -> "secondary renderer"] in a separate, earlier CL - crrev.com/1746393002). - In case of LayoutTests + OOPIF, the RenderViewObserver can see a RenderView before it gets a routing id [1]. Before this CL RenderViewObserver would stash the incorrect routing id which BlinkTestRunner would attempt to use when sending ShellViewHostMsg_TestFinishedInSecondaryWindow. This CL removes the unnecessary RenderViewObserver::routing_id_ field and simply forwards the routing id calculations/queries into the currently observed RenderView. - ShellViewHostMsg_TestFinishedInSecondaryWindow would be dropped on the floor when the RenderView is swapped out. This CL fixes the 3 issues described above and updates layout test expectations for --site-per-process flag accordingly (note that some tests that used to time out are passing now, but some simply changed the failure mode from a timeout into a text diff or another failure mode). BUG=477150 [1] Example callstack when RenderView doesn't yet have a routing id when it is passed to the constructor of RenderViewObserver: 1 0x7f1fd66cfc36 content::RenderViewObserver::RenderViewObserver() 2 0x0000004758a3 content::BlinkTestRunner::BlinkTestRunner() 3 0x000000450bb3 content::LayoutTestContentRendererClient::WebTestProxyCreated() 4 0x00000047c237 content::(anonymous namespace)::CreateWebTestProxy() 5 0x7f1fd6770294 content::RenderViewImpl::Create() 6 0x7f1fd676a5f5 content::RenderThreadImpl::OnControlMessageReceived()

Patch Set 1 #

Patch Set 2 : Reuse NotifyDoneForwarder to handle main window's messages. #

Patch Set 3 : Rebasing on top of another CL. #

Patch Set 4 : Need to retain some timeout expectations. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -30 lines) Patch
M content/common/swapped_out_messages.cc View 1 2 1 chunk +1 line, -0 lines 2 comments Download
M content/public/renderer/render_view_observer.h View 2 chunks +6 lines, -3 lines 0 comments Download
M content/public/renderer/render_view_observer.cc View 3 chunks +5 lines, -6 lines 0 comments Download
M content/shell/browser/layout_test/blink_test_controller.cc View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/FlagExpectations/site-per-process View 1 2 3 5 chunks +14 lines, -21 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 9 (4 generated)
Łukasz Anforowicz
jochen@, could you please take a look? This is the smallest of the CLs that ...
4 years, 9 months ago (2016-03-04 02:55:06 UTC) #3
Łukasz Anforowicz
Hmmm... I guess I need to take a look at the linux_site_isolation failures. Weird that ...
4 years, 9 months ago (2016-03-04 05:20:12 UTC) #4
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1765623003/diff/60001/content/common/swapped_out_messages.cc File content/common/swapped_out_messages.cc (right): https://codereview.chromium.org/1765623003/diff/60001/content/common/swapped_out_messages.cc#newcode12 content/common/swapped_out_messages.cc:12: #include "content/shell/common/shell_messages.h" WAT? can you please introduce a ContentClient ...
4 years, 9 months ago (2016-03-08 16:33:18 UTC) #7
Łukasz Anforowicz
nasko@ and alexmos@ to CC - FYI (nasko@ for swapped out, alexmos@ for the #include ...
4 years, 9 months ago (2016-03-08 17:31:06 UTC) #8
jochen (gone - plz use gerrit)
4 years, 9 months ago (2016-03-09 15:06:40 UTC) #9
On 2016/03/08 at 17:31:06, lukasza wrote:
> nasko@ and alexmos@ to CC - FYI
> (nasko@ for swapped out, alexmos@ for the #include pointed out by jochen@)
> 
> Thanks for reviewing jochen@.  Let me land the other CLs first and do some
more investigation between re-reviewing this one and deciding what needs to be
done (and who knows - maybe by that time swapped out will be already ripped out
of the code base? :-).
> 
>
https://codereview.chromium.org/1765623003/diff/60001/content/common/swapped_...
> File content/common/swapped_out_messages.cc (right):
> 
>
https://codereview.chromium.org/1765623003/diff/60001/content/common/swapped_...
> content/common/swapped_out_messages.cc:12: #include
"content/shell/common/shell_messages.h"
> On 2016/03/08 16:33:18, jochen wrote:
> > WAT?
> > 
> > can you please introduce a ContentClient callback and override that from
content
> > shell? content musn't depend on shell
> 
> Hmmm... good point.  How could I miss that... :-/
> 
> 1. I am trying to tighten DEPS rules in
https://codereview.chromium.org/1777503003/
> 
> 2. nasko@ says that this extra temporary hole in swapped out processing might
be ok (he plans to yank out swapped out in the next few weeks).
> 

it's in since almost a year. I disagree on the label "temporary" :)

we should either fix this, or skip the test.

> 3. before proceeding, I probably should double-check why we end up sending a
message in swapped out state here.  For example - what exactly causes the test
to finish?  If test finishes because of didFinishLoad, then is
TestRunner::topLoadingFrame a main frame?  Is it ok if it is not a main frame? 
Maybe we should communicate with the browser via a randomly-picked local frame
(just as we do in https://codereview.chromium.org/1715573002/#msg9)?

that's an excellent question. 

in the process that has the main frame, the topLoadingFrame should always be the
main frame.

Powered by Google App Engine
This is Rietveld 408576698