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

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

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/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
« no previous file with comments | « chrome/browser/page_cycler/page_cycler.cc ('k') | chrome/browser/popup_blocker_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/file_util.h" 5 #include "base/file_util.h"
6 #include "base/path_service.h" 6 #include "base/path_service.h"
7 #include "base/string_split.h" 7 #include "base/string_split.h"
8 #include "base/string_util.h" 8 #include "base/string_util.h"
9 #include "base/threading/sequenced_worker_pool.h" 9 #include "base/threading/sequenced_worker_pool.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
11 #include "chrome/app/chrome_command_ids.h" 11 #include "chrome/app/chrome_command_ids.h"
12 #include "chrome/browser/browser_process.h" 12 #include "chrome/browser/browser_process.h"
13 #include "chrome/browser/page_cycler/page_cycler.h" 13 #include "chrome/browser/page_cycler/page_cycler.h"
14 #include "chrome/browser/ui/browser_tabstrip.h"
14 #include "chrome/common/chrome_paths.h" 15 #include "chrome/common/chrome_paths.h"
15 #include "chrome/common/url_constants.h" 16 #include "chrome/common/url_constants.h"
16 #include "chrome/test/base/browser_with_test_window_test.h" 17 #include "chrome/test/base/browser_with_test_window_test.h"
17 #include "chrome/test/base/testing_pref_service.h" 18 #include "chrome/test/base/testing_pref_service.h"
18 #include "content/public/browser/render_view_host.h" 19 #include "content/public/browser/render_view_host.h"
19 #include "content/public/test/test_browser_thread.h" 20 #include "content/public/test/test_browser_thread.h"
20 #include "net/base/net_errors.h" 21 #include "net/base/net_errors.h"
21 #include "testing/gmock/include/gmock/gmock.h" 22 #include "testing/gmock/include/gmock/gmock.h"
22 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
23 24
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 102
102 virtual ~PageCyclerTest() { 103 virtual ~PageCyclerTest() {
103 } 104 }
104 105
105 virtual void SetUp() OVERRIDE { 106 virtual void SetUp() OVERRIDE {
106 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_); 107 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir_);
107 test_data_dir_ = test_data_dir_.AppendASCII("page_cycler"); 108 test_data_dir_ = test_data_dir_.AppendASCII("page_cycler");
108 109
109 BrowserWithTestWindowTest::SetUp(); 110 BrowserWithTestWindowTest::SetUp();
110 AddTab(browser(), kAboutURL); 111 AddTab(browser(), kAboutURL);
111 ASSERT_FALSE(browser()->GetActiveWebContents() == NULL); 112 ASSERT_FALSE(chrome::GetActiveWebContents(browser()) == NULL);
112 } 113 }
113 114
114 void InitFilePaths(const FilePath& temp_path) { 115 void InitFilePaths(const FilePath& temp_path) {
115 errors_file_ = temp_path.AppendASCII("errors_file"); 116 errors_file_ = temp_path.AppendASCII("errors_file");
116 stats_file_ = temp_path.AppendASCII("stats_file"); 117 stats_file_ = temp_path.AppendASCII("stats_file");
117 118
118 CHECK(!file_util::PathExists(errors_file_)); 119 CHECK(!file_util::PathExists(errors_file_));
119 CHECK(!file_util::PathExists(stats_file_)); 120 CHECK(!file_util::PathExists(stats_file_));
120 } 121 }
121 122
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 .WillRepeatedly(Invoke(page_cycler(), 337 .WillRepeatedly(Invoke(page_cycler(),
337 &MockPageCycler::PageCyclerDidFinishLoad)); 338 &MockPageCycler::PageCyclerDidFinishLoad));
338 339
339 for (int i = 0; i < kNumLoads; ++i) 340 for (int i = 0; i < kNumLoads; ++i)
340 FinishLoad(); 341 FinishLoad();
341 342
342 PumpLoop(); 343 PumpLoop();
343 EXPECT_FALSE(PathExists(errors_file())); 344 EXPECT_FALSE(PathExists(errors_file()));
344 ASSERT_TRUE(PathExists(stats_file())); 345 ASSERT_TRUE(PathExists(stats_file()));
345 } 346 }
OLDNEW
« no previous file with comments | « chrome/browser/page_cycler/page_cycler.cc ('k') | chrome/browser/popup_blocker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698