| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 virtual void SetUp() override { | 61 virtual void SetUp() override { |
| 62 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 62 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 63 SetServerPolicy(); | 63 SetServerPolicy(); |
| 64 | 64 |
| 65 test_server_.reset(new LocalPolicyTestServer(policy_file_path())); | 65 test_server_.reset(new LocalPolicyTestServer(policy_file_path())); |
| 66 ASSERT_TRUE(test_server_->Start()); | 66 ASSERT_TRUE(test_server_->Start()); |
| 67 | 67 |
| 68 OobeBaseTest::SetUp(); | 68 OobeBaseTest::SetUp(); |
| 69 } | 69 } |
| 70 | 70 |
| 71 virtual void SetUpCommandLine(CommandLine* command_line) override { | 71 virtual void SetUpCommandLine(base::CommandLine* command_line) override { |
| 72 command_line->AppendSwitchASCII(policy::switches::kDeviceManagementUrl, | 72 command_line->AppendSwitchASCII(policy::switches::kDeviceManagementUrl, |
| 73 test_server_->GetServiceURL().spec()); | 73 test_server_->GetServiceURL().spec()); |
| 74 OobeBaseTest::SetUpCommandLine(command_line); | 74 OobeBaseTest::SetUpCommandLine(command_line); |
| 75 } | 75 } |
| 76 | 76 |
| 77 virtual void SetUpOnMainThread() override { | 77 virtual void SetUpOnMainThread() override { |
| 78 SetMergeSessionParams(kAccountId); | 78 SetMergeSessionParams(kAccountId); |
| 79 SetupGaiaServerWithAccessTokens(); | 79 SetupGaiaServerWithAccessTokens(); |
| 80 OobeBaseTest::SetUpOnMainThread(); | 80 OobeBaseTest::SetUpOnMainThread(); |
| 81 } | 81 } |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 ASSERT_TRUE(tabs); | 178 ASSERT_TRUE(tabs); |
| 179 const int expected_tab_count = static_cast<int>(arraysize(kStartupURLs)); | 179 const int expected_tab_count = static_cast<int>(arraysize(kStartupURLs)); |
| 180 EXPECT_EQ(expected_tab_count, tabs->count()); | 180 EXPECT_EQ(expected_tab_count, tabs->count()); |
| 181 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) { | 181 for (int i = 0; i < expected_tab_count && i < tabs->count(); ++i) { |
| 182 EXPECT_EQ(GURL(kStartupURLs[i]), | 182 EXPECT_EQ(GURL(kStartupURLs[i]), |
| 183 tabs->GetWebContentsAt(i)->GetVisibleURL()); | 183 tabs->GetWebContentsAt(i)->GetVisibleURL()); |
| 184 } | 184 } |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace policy | 187 } // namespace policy |
| OLD | NEW |