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

Issue 1713473002: Make TestRenderWidgetHostView::Show/Hide call through to RWHI (Closed)

Created:
4 years, 10 months ago by johnme
Modified:
3 years, 10 months ago
Reviewers:
boliu, sky, no sievers
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@crash
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make TestRenderWidgetHostView::Show/Hide call through to RWHI Before this patch, after calling test_web_contents->WasHidden() on a TestWebContents, test_web_contents->GetMainFrame()->GetVisibilityState() would still return blink::WebPageVisibilityStateVisible, because TestRenderWidgetHostView::Hide didn't propagate the WasHidden to RenderWidgetHostImpl (unlike all the non-test implementations of RenderWidgetHostView). This patch fixes that. There don't seem to be significant downsides to propagating the WasHidden to RWHI; it tries to send a few IPC messages, but since Send is stubbed out, those are simply discarded. I did have to add a null check in RenderWidgetHostViewBase::GetPhysicalBackingSize (called from RWHI::GetResizeParams, called from RWHI::WasResized, called from RWHI::WasShown), since gfx::Screen::GetScreen() sometimes returns null in unit tests. And I had to update some of the web_contents_impl_unittest.cc tests, which were expecting interstitials etc to be hidden, even though RWHI generally defaults to visible (it would be possible to instead keep the is_showing_ bool in TestRenderWidgetHostView, but it seems weird to allow TRWHV and RWHI to disagree about whether they are visible. Also there's one test that manages to hit a null screen on navigation, so I added a TestScreen to ExtensionContextMenuModelTest.TestPageAccessSubmenu. BUG=577336, 636953 Review-Url: https://codereview.chromium.org/1713473002 Cr-Commit-Position: refs/heads/master@{#449606} Committed: https://chromium.googlesource.com/chromium/src/+/1c496374204313ae4233bc19c6495c8c2b0ee660

Patch Set 1 #

Patch Set 2 : Fix typo #

Patch Set 3 : Fix NPE #

Patch Set 4 : Remove is_showing_ #

Patch Set 5 : Update web_contents_impl_unittest.cc #

Total comments: 3

Patch Set 6 : Remove misleading EXPECT_TRUE(interstitial->is_showing()); #

Patch Set 7 : Rebase #

Patch Set 8 : Fix ExtensionContextMenuModelTest.TestPageAccessSubmenu #

Total comments: 5

Patch Set 9 : Tentatively undo render_widget_host_view_base.cc modification #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -46 lines) Patch
M chrome/browser/extensions/extension_context_menu_model_unittest.cc View 1 2 3 4 5 6 7 4 chunks +4 lines, -0 lines 0 comments Download
M chrome/browser/push_messaging/push_messaging_notification_manager_unittest.cc View 1 2 3 4 5 6 3 chunks +4 lines, -4 lines 0 comments Download
M components/visitedlink/test/visitedlink_unittest.cc View 1 2 3 4 5 6 5 chunks +6 lines, -4 lines 0 comments Download
M content/browser/web_contents/web_contents_impl_unittest.cc View 1 2 3 4 5 6 9 chunks +7 lines, -15 lines 0 comments Download
M content/public/test/test_renderer_host.h View 1 2 3 4 5 6 1 chunk +0 lines, -5 lines 0 comments Download
M content/test/test_render_view_host.h View 1 2 3 4 5 6 4 chunks +1 line, -6 lines 0 comments Download
M content/test/test_render_view_host.cc View 1 2 3 4 5 6 3 chunks +5 lines, -12 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 67 (39 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/1713473002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1713473002/1
4 years, 10 months ago (2016-02-18 10:35:35 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_gn_chromeos_rel on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_chromeos_rel/builds/145047)
4 years, 10 months ago (2016-02-18 10:46:47 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/1713473002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1713473002/20001
4 years, 10 months ago (2016-02-18 10:48:56 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/168388)
4 years, 10 months ago (2016-02-18 11:18:33 UTC) #8
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1713473002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1713473002/40001
4 years, 10 months ago (2016-02-18 11:58:09 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-18 13:01:54 UTC) #12
johnme
4 years, 10 months ago (2016-02-18 14:14:11 UTC) #15
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1713473002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1713473002/60001
4 years, 10 months ago (2016-02-18 14:14:48 UTC) #17
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/181924)
4 years, 10 months ago (2016-02-18 14:45:08 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1713473002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1713473002/80001
4 years, 10 months ago (2016-02-18 17:33:51 UTC) #22
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-18 18:45:48 UTC) #25
no sievers
https://codereview.chromium.org/1713473002/diff/80001/content/browser/web_contents/web_contents_impl_unittest.cc File content/browser/web_contents/web_contents_impl_unittest.cc (right): https://codereview.chromium.org/1713473002/diff/80001/content/browser/web_contents/web_contents_impl_unittest.cc#newcode1699 content/browser/web_contents/web_contents_impl_unittest.cc:1699: EXPECT_TRUE(interstitial->is_showing()); Agreed that this was hardcoding the wrong expectations. ...
4 years, 10 months ago (2016-02-18 21:22:09 UTC) #26
no sievers
https://codereview.chromium.org/1713473002/diff/80001/content/browser/web_contents/web_contents_impl_unittest.cc File content/browser/web_contents/web_contents_impl_unittest.cc (right): https://codereview.chromium.org/1713473002/diff/80001/content/browser/web_contents/web_contents_impl_unittest.cc#newcode1699 content/browser/web_contents/web_contents_impl_unittest.cc:1699: EXPECT_TRUE(interstitial->is_showing()); Btw feel free to file a separate bug ...
4 years, 10 months ago (2016-02-18 21:29:43 UTC) #27
johnme
Sorry, I put this patch on hold as it seemed like I was going down ...
4 years, 4 months ago (2016-08-11 14:11:44 UTC) #31
no sievers
thanks, lgtm!
4 years, 4 months ago (2016-08-16 21:51:41 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1713473002/100001
4 years, 4 months ago (2016-08-17 00:54:58 UTC) #36
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/262379)
4 years, 4 months ago (2016-08-17 01:27:31 UTC) #38
johnme
Added a TestScreen to ExtensionContextMenuModelTest.TestPageAccessSubmenu since otherwise it tries to dereference a null screen at ...
3 years, 10 months ago (2017-02-08 18:32:54 UTC) #43
johnme
sky: Please review the overall patch, since sievers is no longer an OWNER. boliu: Please ...
3 years, 10 months ago (2017-02-08 19:56:39 UTC) #50
boliu
https://codereview.chromium.org/1713473002/diff/140001/content/browser/renderer_host/render_widget_host_view_base.cc File content/browser/renderer_host/render_widget_host_view_base.cc (right): https://codereview.chromium.org/1713473002/diff/140001/content/browser/renderer_host/render_widget_host_view_base.cc#newcode107 content/browser/renderer_host/render_widget_host_view_base.cc:107: if (!screen) I'm curious which tests and which platform ...
3 years, 10 months ago (2017-02-08 20:13:34 UTC) #51
sky
https://codereview.chromium.org/1713473002/diff/140001/content/browser/renderer_host/render_widget_host_view_base.cc File content/browser/renderer_host/render_widget_host_view_base.cc (right): https://codereview.chromium.org/1713473002/diff/140001/content/browser/renderer_host/render_widget_host_view_base.cc#newcode107 content/browser/renderer_host/render_widget_host_view_base.cc:107: if (!screen) On 2017/02/08 20:13:34, boliu wrote: > I'm ...
3 years, 10 months ago (2017-02-08 23:21:36 UTC) #52
johnme
https://codereview.chromium.org/1713473002/diff/140001/content/browser/renderer_host/render_widget_host_view_base.cc File content/browser/renderer_host/render_widget_host_view_base.cc (right): https://codereview.chromium.org/1713473002/diff/140001/content/browser/renderer_host/render_widget_host_view_base.cc#newcode107 content/browser/renderer_host/render_widget_host_view_base.cc:107: if (!screen) On 2017/02/08 23:21:36, sky wrote: > On ...
3 years, 10 months ago (2017-02-09 18:59:29 UTC) #55
boliu
lgtm
3 years, 10 months ago (2017-02-09 19:50:51 UTC) #56
sky
LGTM
3 years, 10 months ago (2017-02-09 21:01:37 UTC) #59
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/1713473002/160001
3 years, 10 months ago (2017-02-10 13:50:18 UTC) #62
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://chromium.googlesource.com/chromium/src/+/1c496374204313ae4233bc19c6495c8c2b0ee660
3 years, 10 months ago (2017-02-10 13:54:52 UTC) #65
Bret
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2684993011/ by bsep@chromium.org. ...
3 years, 10 months ago (2017-02-11 00:05:25 UTC) #66
Bret
3 years, 10 months ago (2017-02-11 02:22:26 UTC) #67
Message was sent while issue was closed.
On 2017/02/11 00:05:25, Bret Sepulveda wrote:
> A revert of this CL (patchset #9 id:160001) has been created in
> https://codereview.chromium.org/2684993011/ by mailto:bsep@chromium.org.
> 
> The reason for reverting is: Speculative revert. Many tests are crashing on
> CrOS, yours is the only plausible CL. Apologizes in advance if it turns out to
> be the wrong CL.
> 
> Example failure:
>
https://uberchromegw.corp.google.com/i/chromium.chromiumos/builders/Linux%20C....

Confirmed that this CL was the issue.

Powered by Google App Engine
This is Rietveld 408576698