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

Unified Diff: chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc

Issue 1799223002: [Extensions] Fix BrowserActionInteractiveTest.TabSwitchClosesPopup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
diff --git a/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc b/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
index 0a86d3673237600184e4448399b9e16c68234d68..f5b70554a1730bb904c0a4818adc4cc395cb3067 100644
--- a/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
+++ b/chrome/browser/extensions/api/extension_action/browser_action_interactive_test.cc
@@ -288,11 +288,17 @@ IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, TabSwitchClosesPopup) {
// Add a second tab to the browser and open an extension popup.
chrome::NewTab(browser());
ASSERT_EQ(2, browser()->tab_strip_model()->count());
+ EXPECT_EQ(browser()->tab_strip_model()->GetWebContentsAt(1),
+ browser()->tab_strip_model()->GetActiveWebContents());
OpenExtensionPopupViaAPI();
- // Press CTRL+TAB to change active tabs, the extension popup should close.
- ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
Devlin 2016/03/14 21:21:34 This strikes me as wrong in case this shortcut is
- browser(), ui::VKEY_TAB, true, false, false, false));
+ content::WindowedNotificationObserver observer(
+ extensions::NOTIFICATION_EXTENSION_HOST_DESTROYED,
+ content::NotificationService::AllSources());
+ // Change active tabs, the extension popup should close.
+ browser()->tab_strip_model()->ActivateTabAt(0, true);
+ observer.Wait();
+
asargent_no_longer_on_chrome 2016/03/14 23:11:24 Is there any easy way to verify that the actual NO
Devlin 2016/03/15 00:07:04 Not an easy one. The source is a browser context
EXPECT_FALSE(BrowserActionTestUtil(browser()).HasPopup());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698