OLD | NEW |
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 Loading... |
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 Loading... |
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) |
OLD | NEW |