Commit d0dd5088 authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Commit Bot

cbuiv: cleanup SessionCrashedBubbleView test anchor rects

Bug: 1064663
Change-Id: I1cdaf324f5107d77dfd7dc82f02f88a04814a83b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2144815
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarPeter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#757987}
parent 3e262414
......@@ -8,7 +8,6 @@
#include "build/build_config.h"
#include "build/buildflag.h"
#include "chrome/browser/ui/bubble_anchor_util.h"
#include "chrome/browser/ui/test/test_browser_dialog.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/toolbar/browser_app_menu_button.h"
......@@ -24,13 +23,9 @@ class SessionCrashedBubbleViewTest : public DialogBrowserTest {
~SessionCrashedBubbleViewTest() override {}
void ShowUi(const std::string& name) override {
gfx::Rect anchor_rect = gfx::Rect();
views::View* anchor_view = nullptr;
if (anchor_rect == gfx::Rect()) {
anchor_view = BrowserView::GetBrowserViewForBrowser(browser())
->toolbar_button_provider()
->GetAppMenuButton();
}
views::View* anchor_view = BrowserView::GetBrowserViewForBrowser(browser())
->toolbar_button_provider()
->GetAppMenuButton();
crash_bubble_ = new SessionCrashedBubbleView(
anchor_view, browser(), name == "SessionCrashedBubbleOfferUma");
views::BubbleDialogDelegateView::CreateBubble(crash_bubble_)->Show();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment