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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_browsertest.cc

Issue 397793002: Eliminate CreateBooleanValue from test files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad merge Created 6 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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 void StartupBrowserCreatorFirstRunTest::SetUpCommandLine( 1054 void StartupBrowserCreatorFirstRunTest::SetUpCommandLine(
1055 CommandLine* command_line) { 1055 CommandLine* command_line) {
1056 command_line->AppendSwitch(switches::kForceFirstRun); 1056 command_line->AppendSwitch(switches::kForceFirstRun);
1057 } 1057 }
1058 1058
1059 void StartupBrowserCreatorFirstRunTest::SetUpInProcessBrowserTestFixture() { 1059 void StartupBrowserCreatorFirstRunTest::SetUpInProcessBrowserTestFixture() {
1060 #if defined(ENABLE_CONFIGURATION_POLICY) 1060 #if defined(ENABLE_CONFIGURATION_POLICY)
1061 #if defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) 1061 #if defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD)
1062 // Set a policy that prevents the first-run dialog from being shown. 1062 // Set a policy that prevents the first-run dialog from being shown.
1063 policy_map_.Set(policy::key::kMetricsReportingEnabled, 1063 policy_map_.Set(policy::key::kMetricsReportingEnabled,
1064 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, 1064 policy::POLICY_LEVEL_MANDATORY,
1065 base::Value::CreateBooleanValue(false), NULL); 1065 policy::POLICY_SCOPE_USER,
1066 new base::FundamentalValue(false),
1067 NULL);
1066 provider_.UpdateChromePolicy(policy_map_); 1068 provider_.UpdateChromePolicy(policy_map_);
1067 #endif // defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) 1069 #endif // defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD)
1068 1070
1069 EXPECT_CALL(provider_, IsInitializationComplete(_)) 1071 EXPECT_CALL(provider_, IsInitializationComplete(_))
1070 .WillRepeatedly(Return(true)); 1072 .WillRepeatedly(Return(true));
1071 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); 1073 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_);
1072 #endif // defined(ENABLE_CONFIGURATION_POLICY) 1074 #endif // defined(ENABLE_CONFIGURATION_POLICY)
1073 } 1075 }
1074 1076
1075 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_MACOSX) 1077 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_MACOSX)
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1434 ASSERT_EQ(1, tab_strip->count()); 1436 ASSERT_EQ(1, tab_strip->count());
1435 EXPECT_EQ("title1.html", 1437 EXPECT_EQ("title1.html",
1436 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); 1438 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName());
1437 } 1439 }
1438 #endif // defined(ENABLE_CONFIGURATION_POLICY) 1440 #endif // defined(ENABLE_CONFIGURATION_POLICY)
1439 1441
1440 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || 1442 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) ||
1441 // defined(ENABLE_CONFIGURATION_POLICY) 1443 // defined(ENABLE_CONFIGURATION_POLICY)
1442 1444
1443 #endif // !defined(OS_CHROMEOS) 1445 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/sync/sync_policy_handler_unittest.cc ('k') | chrome/browser/ui/sync/one_click_signin_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698