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

Unified Diff: chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc

Issue 2764943003: Attempt to de-flake popup blocker test for PlzNavigate (Closed)
Patch Set: Created 3 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/ui/blocked_content/popup_blocker_browsertest.cc
diff --git a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
index 5be1073c34d182b7bd857e07962e0fc1598fcd17..9c65ca313c6ec78e433a2782eafc60381ca0b61f 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
@@ -346,27 +346,25 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest,
}
// Verify that when you unblock popup, the popup shows in history and omnibox.
-// TODO(crbug.com/663333) Flaky on Linux.
-#if defined(OS_LINUX)
-#define MAYBE_UnblockedPopupShowsInHistoryAndOmnibox \
- DISABLED_UnblockedPopupShowsInHistoryAndOmnibox
-#else
-#define MAYBE_UnblockedPopupShowsInHistoryAndOmnibox \
- UnblockedPopupShowsInHistoryAndOmnibox
-#endif
IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest,
- MAYBE_UnblockedPopupShowsInHistoryAndOmnibox) {
+ UnblockedPopupShowsInHistoryAndOmnibox) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kDisablePopupBlocking);
GURL url(embedded_test_server()->GetURL(
"/popup_blocker/popup-blocked-to-post-blank.html"));
NavigateAndCheckPopupShown(url, ExpectTab);
+ // Make sure the navigation in the new tab actually finished.
+ WebContents* web_contents = browser()->tab_strip_model()->GetWebContentsAt(1);
+ base::string16 expected_title(base::ASCIIToUTF16("Popup Success!"));
+ content::TitleWatcher title_watcher(web_contents, expected_title);
+ EXPECT_EQ(expected_title, title_watcher.WaitAndGetTitle());
+ WaitForHistoryBackendToRun(browser()->profile());
+
std::string search_string =
"data:text/html,<title>Popup Success!</title>you should not see this "
"message if popup blocker is enabled";
- WaitForHistoryBackendToRun(browser()->profile());
ui_test_utils::HistoryEnumerator history(browser()->profile());
std::vector<GURL>& history_urls = history.urls();
ASSERT_EQ(2u, history_urls.size());
« 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