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

Side by Side Diff: chrome/browser/chrome_browser_main_unittest.cc

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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/chrome_browser_main.cc ('k') | chrome/browser/chrome_content_browser_client.h » ('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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "chrome/browser/chrome_browser_main.h" 10 #include "chrome/browser/chrome_browser_main.h"
11 #include "chrome/browser/chrome_content_browser_client.h" 11 #include "chrome/browser/chrome_content_browser_client.h"
12 #include "chrome/common/chrome_switches.h" 12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/test/base/testing_pref_service.h" 13 #include "chrome/test/base/testing_pref_service.h"
14 #include "content/public/browser/content_browser_client.h" 14 #include "content/public/browser/content_browser_client.h"
15 #include "content/public/common/main_function_params.h" 15 #include "content/public/common/main_function_params.h"
16 #include "net/socket/client_socket_pool_base.h" 16 #include "net/socket/client_socket_pool_base.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 class BrowserMainTest : public testing::Test { 19 class BrowserMainTest : public testing::Test {
20 public: 20 public:
21 BrowserMainTest() 21 BrowserMainTest()
22 : command_line_(CommandLine::NO_PROGRAM) { 22 : command_line_(CommandLine::NO_PROGRAM) {
23 ChromeBrowserMainParts::disable_enforcing_cookie_policies_for_tests_ = true; 23 ChromeBrowserMainParts::disable_enforcing_cookie_policies_for_tests_ = true;
24 } 24 }
25 25
26 protected: 26 protected:
27 TestingPrefService pref_service_;
28 CommandLine command_line_; 27 CommandLine command_line_;
29 }; 28 };
30 29
31 TEST_F(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket) { 30 TEST_F(BrowserMainTest, WarmConnectionFieldTrial_WarmestSocket) {
32 command_line_.AppendSwitchASCII(switches::kSocketReusePolicy, "0"); 31 command_line_.AppendSwitchASCII(switches::kSocketReusePolicy, "0");
33 32
34 scoped_ptr<content::MainFunctionParams> params( 33 scoped_ptr<content::MainFunctionParams> params(
35 new content::MainFunctionParams(command_line_)); 34 new content::MainFunctionParams(command_line_));
36 scoped_ptr<content::BrowserMainParts> browser_main_parts( 35 scoped_ptr<content::BrowserMainParts> browser_main_parts(
37 content::GetContentClient()->browser()->CreateBrowserMainParts(*params)); 36 content::GetContentClient()->browser()->CreateBrowserMainParts(*params));
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 #if defined(NDEBUG) && defined(DCHECK_ALWAYS_ON) 87 #if defined(NDEBUG) && defined(DCHECK_ALWAYS_ON)
89 EXPECT_DEATH(parts->browser_field_trials_.WarmConnectionFieldTrial(), 88 EXPECT_DEATH(parts->browser_field_trials_.WarmConnectionFieldTrial(),
90 "Not a valid socket reuse policy group"); 89 "Not a valid socket reuse policy group");
91 #else 90 #else
92 EXPECT_DEBUG_DEATH(parts->browser_field_trials_.WarmConnectionFieldTrial(), 91 EXPECT_DEBUG_DEATH(parts->browser_field_trials_.WarmConnectionFieldTrial(),
93 "Not a valid socket reuse policy group"); 92 "Not a valid socket reuse policy group");
94 #endif 93 #endif
95 } 94 }
96 } 95 }
97 #endif 96 #endif
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_main.cc ('k') | chrome/browser/chrome_content_browser_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698