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

Side by Side Diff: chrome/browser/chromeos/arc/auth/arc_active_directory_enrollment_token_fetcher_browsertest.cc

Issue 2957983002: Remove pointless InProcessBrowserTest calls. (Closed)
Patch Set: build Created 3 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
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 <memory> 5 #include <memory>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 : public InProcessBrowserTest { 233 : public InProcessBrowserTest {
234 public: 234 public:
235 // Public wrapper, required for base::Bind. 235 // Public wrapper, required for base::Bind.
236 void CloseAllBrowsers_Wrapper() { CloseAllBrowsers(); } 236 void CloseAllBrowsers_Wrapper() { CloseAllBrowsers(); }
237 237
238 protected: 238 protected:
239 ArcActiveDirectoryEnrollmentTokenFetcherBrowserTest() = default; 239 ArcActiveDirectoryEnrollmentTokenFetcherBrowserTest() = default;
240 ~ArcActiveDirectoryEnrollmentTokenFetcherBrowserTest() override = default; 240 ~ArcActiveDirectoryEnrollmentTokenFetcherBrowserTest() override = default;
241 241
242 void SetUpCommandLine(base::CommandLine* command_line) override { 242 void SetUpCommandLine(base::CommandLine* command_line) override {
243 InProcessBrowserTest::SetUpCommandLine(command_line);
244 command_line->AppendSwitchASCII(policy::switches::kDeviceManagementUrl, 243 command_line->AppendSwitchASCII(policy::switches::kDeviceManagementUrl,
245 "http://localhost"); 244 "http://localhost");
246 SetArcAvailableCommandLineForTesting(command_line); 245 SetArcAvailableCommandLineForTesting(command_line);
247 } 246 }
248 247
249 void SetUpInProcessBrowserTestFixture() override { 248 void SetUpInProcessBrowserTestFixture() override {
250 // Set fake cryptohome, because we want to fail DMToken retrieval 249 // Set fake cryptohome, because we want to fail DMToken retrieval
251 auto cryptohome_client = base::MakeUnique<chromeos::FakeCryptohomeClient>(); 250 auto cryptohome_client = base::MakeUnique<chromeos::FakeCryptohomeClient>();
252 fake_cryptohome_client_ = cryptohome_client.get(); 251 fake_cryptohome_client_ = cryptohome_client.get();
253 chromeos::DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient( 252 chromeos::DBusThreadManager::GetSetterForTesting()->SetCryptohomeClient(
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 &CloseBrowserJob, 527 &CloseBrowserJob,
529 base::Bind(&ArcActiveDirectoryEnrollmentTokenFetcherBrowserTest:: 528 base::Bind(&ArcActiveDirectoryEnrollmentTokenFetcherBrowserTest::
530 CloseAllBrowsers_Wrapper, 529 CloseAllBrowsers_Wrapper,
531 base::Unretained(this)))); 530 base::Unretained(this))));
532 StoreCorrectDmToken(); 531 StoreCorrectDmToken();
533 ExpectEnrollmentTokenFetchFails( 532 ExpectEnrollmentTokenFetchFails(
534 ArcActiveDirectoryEnrollmentTokenFetcher::Status::FAILURE); 533 ArcActiveDirectoryEnrollmentTokenFetcher::Status::FAILURE);
535 } 534 }
536 535
537 } // namespace arc 536 } // namespace arc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698