diff --git a/browser/ui/views/frame/brave_browser_view.cc b/browser/ui/views/frame/brave_browser_view.cc index f999c22b6e4c..c732d4c2d2bf 100644 --- a/browser/ui/views/frame/brave_browser_view.cc +++ b/browser/ui/views/frame/brave_browser_view.cc @@ -856,14 +856,12 @@ void BraveBrowserView::OnTileTabs(const TabTile& tile) { UpdateContentsWebViewVisual(); } -void BraveBrowserView::OnWillBreakTile(const TabTile& tile) { +void BraveBrowserView::OnDidBreakTile(const TabTile& tile) { if (!IsActiveWebContentsTiled(tile)) { return; } - base::SequencedTaskRunner::GetCurrentDefault()->PostTask( - FROM_HERE, base::BindOnce(&BraveBrowserView::UpdateContentsWebViewVisual, - weak_ptr_.GetWeakPtr())); + UpdateContentsWebViewVisual(); } void BraveBrowserView::OnSwapTabsInTile(const TabTile& tile) { diff --git a/browser/ui/views/frame/brave_browser_view.h b/browser/ui/views/frame/brave_browser_view.h index 40fbd122f9a2..dea453bd356f 100644 --- a/browser/ui/views/frame/brave_browser_view.h +++ b/browser/ui/views/frame/brave_browser_view.h @@ -131,7 +131,7 @@ class BraveBrowserView : public BrowserView, // SplitViewBrowserDataObserver: void OnTileTabs(const TabTile& tile) override; - void OnWillBreakTile(const TabTile& tile) override; + void OnDidBreakTile(const TabTile& tile) override; void OnSwapTabsInTile(const TabTile& tile) override; views::WebView* secondary_contents_web_view() { diff --git a/browser/ui/views/frame/split_view_browsertest.cc b/browser/ui/views/frame/split_view_browsertest.cc index b1aa7e46b9c3..36a57e5e7231 100644 --- a/browser/ui/views/frame/split_view_browsertest.cc +++ b/browser/ui/views/frame/split_view_browsertest.cc @@ -82,7 +82,6 @@ IN_PROC_BROWSER_TEST_F(SplitViewBrowserTest, split_view_data->IsTabTiled(tab_strip_model().GetTabHandleAt(0))); // Then, the secondary web view should become hidden - base::RunLoop().RunUntilIdle(); EXPECT_FALSE(secondary_contents_view().GetVisible()); }