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

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

Issue 2495053003: Wait for history backend in popup blocker test (Closed)
Patch Set: Created 4 years, 1 month 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
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 710a3714a9d238ba8a5e5d9860553ebf2f1f2380..eca68b731b3cd435bd8ebd7f697d17e343e2f951 100644
--- a/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
+++ b/chrome/browser/ui/blocked_content/popup_blocker_browsertest.cc
@@ -15,6 +15,7 @@
#include "chrome/browser/chrome_notification_types.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/content_settings/tab_specific_content_settings.h"
+#include "chrome/browser/history/history_test_utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
@@ -337,16 +338,8 @@ 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(
@@ -357,6 +350,7 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest,
"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());
« chrome/browser/history/history_test_utils.cc ('K') | « chrome/browser/history/history_test_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698