| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <map> | 5 #include <map> |
| 6 #include <set> | 6 #include <set> |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 signing_key.reset(); | 424 signing_key.reset(); |
| 425 test_server_.RegisterClient(PolicyBuilder::kFakeToken, | 425 test_server_.RegisterClient(PolicyBuilder::kFakeToken, |
| 426 PolicyBuilder::kFakeDeviceId); | 426 PolicyBuilder::kFakeDeviceId); |
| 427 ASSERT_TRUE(test_server_.Start()); | 427 ASSERT_TRUE(test_server_.Start()); |
| 428 | 428 |
| 429 BrowserList::AddObserver(this); | 429 BrowserList::AddObserver(this); |
| 430 | 430 |
| 431 DevicePolicyCrosBrowserTest::SetUp(); | 431 DevicePolicyCrosBrowserTest::SetUp(); |
| 432 } | 432 } |
| 433 | 433 |
| 434 virtual void SetUpCommandLine(CommandLine* command_line) override { | 434 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
| 435 DevicePolicyCrosBrowserTest::SetUpCommandLine(command_line); | 435 DevicePolicyCrosBrowserTest::SetUpCommandLine(command_line); |
| 436 command_line->AppendSwitch(chromeos::switches::kLoginManager); | 436 command_line->AppendSwitch(chromeos::switches::kLoginManager); |
| 437 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); | 437 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); |
| 438 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); | 438 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); |
| 439 command_line->AppendSwitchASCII(policy::switches::kDeviceManagementUrl, | 439 command_line->AppendSwitchASCII(policy::switches::kDeviceManagementUrl, |
| 440 test_server_.GetServiceURL().spec()); | 440 test_server_.GetServiceURL().spec()); |
| 441 } | 441 } |
| 442 | 442 |
| 443 virtual void SetUpInProcessBrowserTestFixture() override { | 443 virtual void SetUpInProcessBrowserTestFixture() override { |
| 444 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); | 444 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 445 | 445 |
| 446 // Clear command-line arguments (but keep command-line switches) so the | 446 // Clear command-line arguments (but keep command-line switches) so the |
| 447 // startup pages policy takes effect. | 447 // startup pages policy takes effect. |
| 448 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 448 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
| 449 CommandLine::StringVector argv(command_line->argv()); | 449 base::CommandLine::StringVector argv(command_line->argv()); |
| 450 argv.erase(argv.begin() + argv.size() - command_line->GetArgs().size(), | 450 argv.erase(argv.begin() + argv.size() - command_line->GetArgs().size(), |
| 451 argv.end()); | 451 argv.end()); |
| 452 command_line->InitFromArgv(argv); | 452 command_line->InitFromArgv(argv); |
| 453 | 453 |
| 454 InstallOwnerKey(); | 454 InstallOwnerKey(); |
| 455 MarkAsEnterpriseOwned(); | 455 MarkAsEnterpriseOwned(); |
| 456 | 456 |
| 457 InitializePolicy(); | 457 InitializePolicy(); |
| 458 } | 458 } |
| 459 | 459 |
| (...skipping 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2203 ASSERT_TRUE(content::ExecuteScript(contents_, | 2203 ASSERT_TRUE(content::ExecuteScript(contents_, |
| 2204 "$('tos-accept-button').click();")); | 2204 "$('tos-accept-button').click();")); |
| 2205 | 2205 |
| 2206 WaitForSessionStart(); | 2206 WaitForSessionStart(); |
| 2207 } | 2207 } |
| 2208 | 2208 |
| 2209 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, | 2209 INSTANTIATE_TEST_CASE_P(TermsOfServiceDownloadTestInstance, |
| 2210 TermsOfServiceDownloadTest, testing::Bool()); | 2210 TermsOfServiceDownloadTest, testing::Bool()); |
| 2211 | 2211 |
| 2212 } // namespace policy | 2212 } // namespace policy |
| OLD | NEW |