| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 base::CommandLine* command_line) { | 1175 base::CommandLine* command_line) { |
| 1176 command_line->AppendSwitch(switches::kForceFirstRun); | 1176 command_line->AppendSwitch(switches::kForceFirstRun); |
| 1177 } | 1177 } |
| 1178 | 1178 |
| 1179 void StartupBrowserCreatorFirstRunTest::SetUpInProcessBrowserTestFixture() { | 1179 void StartupBrowserCreatorFirstRunTest::SetUpInProcessBrowserTestFixture() { |
| 1180 #if defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) | 1180 #if defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) |
| 1181 // Set a policy that prevents the first-run dialog from being shown. | 1181 // Set a policy that prevents the first-run dialog from being shown. |
| 1182 policy_map_.Set(policy::key::kMetricsReportingEnabled, | 1182 policy_map_.Set(policy::key::kMetricsReportingEnabled, |
| 1183 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, | 1183 policy::POLICY_LEVEL_MANDATORY, policy::POLICY_SCOPE_USER, |
| 1184 policy::POLICY_SOURCE_CLOUD, | 1184 policy::POLICY_SOURCE_CLOUD, |
| 1185 base::WrapUnique(new base::FundamentalValue(false)), nullptr); | 1185 base::MakeUnique<base::FundamentalValue>(false), nullptr); |
| 1186 provider_.UpdateChromePolicy(policy_map_); | 1186 provider_.UpdateChromePolicy(policy_map_); |
| 1187 #endif // defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) | 1187 #endif // defined(OS_LINUX) && defined(GOOGLE_CHROME_BUILD) |
| 1188 | 1188 |
| 1189 EXPECT_CALL(provider_, IsInitializationComplete(_)) | 1189 EXPECT_CALL(provider_, IsInitializationComplete(_)) |
| 1190 .WillRepeatedly(Return(true)); | 1190 .WillRepeatedly(Return(true)); |
| 1191 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); | 1191 policy::BrowserPolicyConnector::SetPolicyProviderForTesting(&provider_); |
| 1192 } | 1192 } |
| 1193 | 1193 |
| 1194 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_MACOSX) | 1194 #if defined(GOOGLE_CHROME_BUILD) && defined(OS_MACOSX) |
| 1195 // http://crbug.com/314819 | 1195 // http://crbug.com/314819 |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 ASSERT_TRUE(new_browser); | 1617 ASSERT_TRUE(new_browser); |
| 1618 | 1618 |
| 1619 // Verify that the first-run tab is shown and no other pages are present. | 1619 // Verify that the first-run tab is shown and no other pages are present. |
| 1620 TabStripModel* tab_strip = new_browser->tab_strip_model(); | 1620 TabStripModel* tab_strip = new_browser->tab_strip_model(); |
| 1621 ASSERT_EQ(1, tab_strip->count()); | 1621 ASSERT_EQ(1, tab_strip->count()); |
| 1622 EXPECT_EQ("title1.html", | 1622 EXPECT_EQ("title1.html", |
| 1623 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); | 1623 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); |
| 1624 } | 1624 } |
| 1625 | 1625 |
| 1626 #endif // !defined(OS_CHROMEOS) | 1626 #endif // !defined(OS_CHROMEOS) |
| OLD | NEW |