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

Side by Side Diff: chrome/browser/page_cycler/page_cycler_browsertest.cc

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_split.h" 9 #include "base/string_split.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 content::NotificationRegistrar registrar_; 134 content::NotificationRegistrar registrar_;
135 }; 135 };
136 136
137 // Structure used for testing PageCycler's ability to playback a series of 137 // Structure used for testing PageCycler's ability to playback a series of
138 // URLs given a cache directory. 138 // URLs given a cache directory.
139 class PageCyclerCachedBrowserTest : public PageCyclerBrowserTest { 139 class PageCyclerCachedBrowserTest : public PageCyclerBrowserTest {
140 public: 140 public:
141 // For a cached test, we use the provided user data directory from the test 141 // For a cached test, we use the provided user data directory from the test
142 // directory. 142 // directory.
143 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 143 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
144 InProcessBrowserTest::SetUpCommandLine(command_line);
145
146 FilePath test_dir; 144 FilePath test_dir;
147 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir)); 145 ASSERT_TRUE(PathService::Get(chrome::DIR_TEST_DATA, &test_dir));
148 test_dir = test_dir.AppendASCII("page_cycler"); 146 test_dir = test_dir.AppendASCII("page_cycler");
149 147
150 FilePath source_data_dir = test_dir.AppendASCII("cached_data_dir"); 148 FilePath source_data_dir = test_dir.AppendASCII("cached_data_dir");
151 CHECK(file_util::PathExists(source_data_dir)); 149 CHECK(file_util::PathExists(source_data_dir));
152 150
153 CHECK(user_data_dir_.CreateUniqueTempDir()); 151 CHECK(user_data_dir_.CreateUniqueTempDir());
154 152
155 FilePath dest_data_dir = 153 FilePath dest_data_dir =
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 ASSERT_EQ(1u, errors.size()); 378 ASSERT_EQ(1u, errors.size());
381 379
382 std::string expected_error; 380 std::string expected_error;
383 expected_error.append("Failed to load the page at: ") 381 expected_error.append("Failed to load the page at: ")
384 .append(kCacheMissURL) 382 .append(kCacheMissURL)
385 .append(": The requested entry was not found in the cache."); 383 .append(": The requested entry was not found in the cache.");
386 384
387 ASSERT_FALSE(errors[0].compare(expected_error)); 385 ASSERT_FALSE(errors[0].compare(expected_error));
388 } 386 }
389 #endif 387 #endif
OLDNEW
« no previous file with comments | « chrome/browser/notifications/notification_browsertest.cc ('k') | chrome/browser/prerender/prefetch_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698