Index: chrome/browser/popup_blocker_browsertest.cc |
diff --git a/chrome/browser/popup_blocker_browsertest.cc b/chrome/browser/popup_blocker_browsertest.cc |
index 231f4ffc1ed00dd7a6f9e2925015f075f3a9595d..4dba5ef44775a9cc0028bfe00f42e2b0b536ad54 100644 |
--- a/chrome/browser/popup_blocker_browsertest.cc |
+++ b/chrome/browser/popup_blocker_browsertest.cc |
@@ -12,6 +12,7 @@ |
#include "chrome/browser/content_settings/host_content_settings_map.h" |
#include "chrome/browser/content_settings/tab_specific_content_settings.h" |
#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/search_engines/template_url_service_factory.h" |
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/browser_commands.h" |
@@ -26,8 +27,8 @@ |
#include "chrome/common/chrome_switches.h" |
#include "chrome/test/base/in_process_browser_test.h" |
#include "chrome/test/base/ui_test_utils.h" |
-#include "content/public/browser/web_contents.h" |
#include "content/public/browser/notification_service.h" |
+#include "content/public/browser/web_contents.h" |
#include "content/public/common/url_constants.h" |
#include "content/public/test/browser_test_utils.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -161,6 +162,9 @@ IN_PROC_BROWSER_TEST_F(PopupBlockerBrowserTest, |
ASSERT_EQ(GURL(search_string), history_urls[0]); |
ASSERT_EQ(url, history_urls[1]); |
+ TemplateURLService* service = TemplateURLServiceFactory::GetForProfile( |
+ browser()->profile()); |
+ ui_test_utils::WaitForTemplateURLServiceToLoad(service); |
LocationBar* location_bar = browser()->window()->GetLocationBar(); |
ui_test_utils::SendToOmniboxAndSubmit(location_bar, search_string); |
OmniboxEditModel* model = location_bar->GetLocationEntry()->model(); |