diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-07 04:55:10 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-07 04:55:10 +0000 |
commit | 865eabbaeb9a4fa6cfcd7f7c0c49235f7b6ecd6c (patch) | |
tree | ba51a99014c3efe8f4be686571174f4800ac28e1 | |
parent | 13961a1197e2b3dd526ac928525da6857192b23d (diff) | |
download | chromium_src-865eabbaeb9a4fa6cfcd7f7c0c49235f7b6ecd6c.zip chromium_src-865eabbaeb9a4fa6cfcd7f7c0c49235f7b6ecd6c.tar.gz chromium_src-865eabbaeb9a4fa6cfcd7f7c0c49235f7b6ecd6c.tar.bz2 |
GTTF: Make PageCyclerCachedBrowserTest.URLNotInCache much faster
by only loading URLs needed for the test.
BUG=none
Review URL: https://chromiumcodereview.appspot.com/11480002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@171695 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/page_cycler/page_cycler_browsertest.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/chrome/browser/page_cycler/page_cycler_browsertest.cc b/chrome/browser/page_cycler/page_cycler_browsertest.cc index a29bbdf..eead9fd 100644 --- a/chrome/browser/page_cycler/page_cycler_browsertest.cc +++ b/chrome/browser/page_cycler/page_cycler_browsertest.cc @@ -364,16 +364,15 @@ IN_PROC_BROWSER_TEST_F(PageCyclerCachedBrowserTest, MAYBE_URLNotInCache) { RegisterForNotifications(); InitFilePaths(temp.path()); - std::string urls_string; - ASSERT_TRUE(file_util::ReadFileToString(urls_file(), - &urls_string)); + // Only use a single URL that is not in cache. That's sufficient for the test + // scenario, and makes things faster than needlessly cycling through all the + // other URLs. - urls_string.append("\n").append(kCacheMissURL); FilePath new_urls_file = temp.path().AppendASCII("urls"); ASSERT_FALSE(file_util::PathExists(new_urls_file)); - ASSERT_TRUE(file_util::WriteFile(new_urls_file, urls_string.c_str(), - urls_string.size())); + ASSERT_TRUE(file_util::WriteFile(new_urls_file, kCacheMissURL, + sizeof(kCacheMissURL))); InitPageCycler(new_urls_file, errors_file(), stats_file()); page_cycler()->Run(); |