Commit 18e17a02 authored by Alexander Semashko's avatar Alexander Semashko Committed by Commit Bot

Fix/deflake tests in /chrome/browser/renderer_context_menu.

This is a prerequisite for switching WindowedNotificationObserver to use
base::RunLoop instead of deprecated MessageLoopRunner.

This CL is split out from https://crrev.com/c/982612.

This CL was uploaded by git cl split.

R=avi@chromium.org

Bug: 668707
Change-Id: I890f55395c05eebbe390b1401dea3a0f4d21b19c
Reviewed-on: https://chromium-review.googlesource.com/1120495Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Alexander Semashko <ahest@yandex-team.ru>
Cr-Commit-Position: refs/heads/master@{#571623}
parent caac66bc
...@@ -963,9 +963,6 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, OpenLinkInProfile) { ...@@ -963,9 +963,6 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, OpenLinkInProfile) {
} }
} }
ui_test_utils::WindowedTabAddedNotificationObserver tab_observer(
content::NotificationService::AllSources());
ASSERT_TRUE(embedded_test_server()->Start()); ASSERT_TRUE(embedded_test_server()->Start());
GURL url(embedded_test_server()->GetURL("/")); GURL url(embedded_test_server()->GetURL("/"));
...@@ -982,6 +979,8 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, OpenLinkInProfile) { ...@@ -982,6 +979,8 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, OpenLinkInProfile) {
// Open the menu items. They should match their corresponding profiles in // Open the menu items. They should match their corresponding profiles in
// |profiles_in_menu|. // |profiles_in_menu|.
for (Profile* profile : profiles_in_menu) { for (Profile* profile : profiles_in_menu) {
ui_test_utils::WindowedTabAddedNotificationObserver tab_observer(
content::NotificationService::AllSources());
int command_id = menu->GetCommandIDByProfilePath(profile->GetPath()); int command_id = menu->GetCommandIDByProfilePath(profile->GetPath());
ASSERT_NE(-1, command_id); ASSERT_NE(-1, command_id);
menu->ExecuteCommand(command_id, 0); menu->ExecuteCommand(command_id, 0);
......
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