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

Unified Diff: chrome/browser/policy/policy_browsertest.cc

Issue 10915002: Convert the history pyauto tests to a browser_tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: make DEPS clearer/cleaner after discussion with erikwright Created 8 years, 4 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
Index: chrome/browser/policy/policy_browsertest.cc
===================================================================
--- chrome/browser/policy/policy_browsertest.cc (revision 153884)
+++ chrome/browser/policy/policy_browsertest.cc (working copy)
@@ -14,8 +14,6 @@
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/autocomplete/autocomplete_controller.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/history/history.h"
-#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/net/url_request_mock_util.h"
#include "chrome/browser/policy/browser_policy_connector.h"
@@ -364,10 +362,7 @@
FilePath(FILE_PATH_LITERAL("empty.html")));
ui_test_utils::NavigateToURL(browser(), url);
// Verify that the navigation wasn't saved in the history.
- HistoryService* history = HistoryServiceFactory::GetForProfile(
- browser()->profile(), Profile::EXPLICIT_ACCESS);
- ASSERT_TRUE(history);
- ui_test_utils::HistoryEnumerator enumerator1(history);
+ ui_test_utils::HistoryEnumerator enumerator1(browser()->profile());
EXPECT_EQ(0u, enumerator1.urls().size());
// Now flip the policy and try again.
@@ -376,7 +371,7 @@
provider_.UpdateChromePolicy(policies);
ui_test_utils::NavigateToURL(browser(), url);
// Verify that the navigation was saved in the history.
- ui_test_utils::HistoryEnumerator enumerator2(history);
+ ui_test_utils::HistoryEnumerator enumerator2(browser()->profile());
ASSERT_EQ(1u, enumerator2.urls().size());
EXPECT_EQ(url, enumerator2.urls()[0]);
}
« no previous file with comments | « chrome/browser/history/history_browsertest.cc ('k') | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698