diff options
author | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-24 17:57:55 +0000 |
---|---|---|
committer | mrossetti@chromium.org <mrossetti@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-05-24 17:57:55 +0000 |
commit | af03db04a291bfe516aa5d8de87772e8a9e42fa4 (patch) | |
tree | f3a9d4296d683945fbaa7b241f011cfe2662b089 /chrome/browser/history | |
parent | a940841aa0536f8bb8b847c91a43a37de5b62b4d (diff) | |
download | chromium_src-af03db04a291bfe516aa5d8de87772e8a9e42fa4.zip chromium_src-af03db04a291bfe516aa5d8de87772e8a9e42fa4.tar.gz chromium_src-af03db04a291bfe516aa5d8de87772e8a9e42fa4.tar.bz2 |
Change WaitForHistoryToLoad to Take a HistoryService...
...instead of a Browser. This makes the function more general and will allow me to call it directly from some new unit tests that don't actually have a Browser, but do have a HistoryService.
BUG=NONE
TEST=Existing tests pass.
Review URL: https://chromiumcodereview.appspot.com/10332316
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@138832 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history')
-rw-r--r-- | chrome/browser/history/history_browsertest.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chrome/browser/history/history_browsertest.cc b/chrome/browser/history/history_browsertest.cc index 84d3c49..3934cee 100644 --- a/chrome/browser/history/history_browsertest.cc +++ b/chrome/browser/history/history_browsertest.cc @@ -157,7 +157,8 @@ IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryEnabled) { EXPECT_TRUE(GetProfile()->GetHistoryService(Profile::EXPLICIT_ACCESS)); EXPECT_TRUE(GetProfile()->GetHistoryService(Profile::IMPLICIT_ACCESS)); - ui_test_utils::WaitForHistoryToLoad(browser()); + ui_test_utils::WaitForHistoryToLoad( + browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS)); ExpectEmptyHistory(); ui_test_utils::NavigateToURL(browser(), GetTestUrl()); @@ -177,7 +178,8 @@ IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryDisabled) { EXPECT_TRUE(GetProfile()->GetHistoryService(Profile::EXPLICIT_ACCESS)); EXPECT_FALSE(GetProfile()->GetHistoryService(Profile::IMPLICIT_ACCESS)); - ui_test_utils::WaitForHistoryToLoad(browser()); + ui_test_utils::WaitForHistoryToLoad( + browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS)); ExpectEmptyHistory(); ui_test_utils::NavigateToURL(browser(), GetTestUrl()); @@ -190,7 +192,8 @@ IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryDisabled) { IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryEnabledThenDisabled) { EXPECT_FALSE(GetPrefs()->GetBoolean(prefs::kSavingBrowserHistoryDisabled)); - ui_test_utils::WaitForHistoryToLoad(browser()); + ui_test_utils::WaitForHistoryToLoad( + browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS)); ui_test_utils::NavigateToURL(browser(), GetTestUrl()); WaitForHistoryBackendToRun(); @@ -219,7 +222,8 @@ IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryEnabledThenDisabled) { IN_PROC_BROWSER_TEST_F(HistoryBrowserTest, SavingHistoryDisabledThenEnabled) { GetPrefs()->SetBoolean(prefs::kSavingBrowserHistoryDisabled, true); - ui_test_utils::WaitForHistoryToLoad(browser()); + ui_test_utils::WaitForHistoryToLoad( + browser()->profile()->GetHistoryService(Profile::EXPLICIT_ACCESS)); ExpectEmptyHistory(); ui_test_utils::NavigateToURL(browser(), GetTestUrl()); |