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

Side by Side Diff: chrome/browser/chromeos/arc/arc_auth_service_unittest.cc

Issue 2318023002: //chrome/browser/chromeos: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Address comment and also remove non-trivial cases Created 4 years, 3 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void SetUp() override { 60 void SetUp() override {
61 chromeos::DBusThreadManager::Initialize(); 61 chromeos::DBusThreadManager::Initialize();
62 62
63 base::CommandLine::ForCurrentProcess()->AppendSwitch( 63 base::CommandLine::ForCurrentProcess()->AppendSwitch(
64 chromeos::switches::kEnableArc); 64 chromeos::switches::kEnableArc);
65 ArcAuthService::DisableUIForTesting(); 65 ArcAuthService::DisableUIForTesting();
66 66
67 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir()); 67 EXPECT_TRUE(temp_dir_.CreateUniqueTempDir());
68 TestingProfile::Builder profile_builder; 68 TestingProfile::Builder profile_builder;
69 profile_builder.SetPath(temp_dir_.path().AppendASCII("TestArcProfile")); 69 profile_builder.SetPath(temp_dir_.GetPath().AppendASCII("TestArcProfile"));
70 70
71 profile_ = profile_builder.Build(); 71 profile_ = profile_builder.Build();
72 StartPreferenceSyncing(); 72 StartPreferenceSyncing();
73 73
74 bridge_service_.reset(new FakeArcBridgeService()); 74 bridge_service_.reset(new FakeArcBridgeService());
75 auth_service_.reset(new ArcAuthService(bridge_service_.get())); 75 auth_service_.reset(new ArcAuthService(bridge_service_.get()));
76 76
77 // Check initial conditions. 77 // Check initial conditions.
78 EXPECT_EQ(bridge_service_.get(), ArcBridgeService::Get()); 78 EXPECT_EQ(bridge_service_.get(), ArcBridgeService::Get());
79 EXPECT_TRUE(ArcBridgeService::Get()->stopped()); 79 EXPECT_TRUE(ArcBridgeService::Get()->stopped());
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 second_profile->GetPrefs()->SetBoolean(prefs::kArcEnabled, true); 359 second_profile->GetPrefs()->SetBoolean(prefs::kArcEnabled, true);
360 360
361 // Check that non-primary user can't use Arc. 361 // Check that non-primary user can't use Arc.
362 EXPECT_FALSE(chromeos::ProfileHelper::IsPrimaryProfile(second_profile.get())); 362 EXPECT_FALSE(chromeos::ProfileHelper::IsPrimaryProfile(second_profile.get()));
363 EXPECT_FALSE(ArcAppListPrefs::Get(second_profile.get())); 363 EXPECT_FALSE(ArcAppListPrefs::Get(second_profile.get()));
364 364
365 auth_service()->Shutdown(); 365 auth_service()->Shutdown();
366 } 366 }
367 367
368 } // namespace arc 368 } // namespace arc
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/arc/arc_auth_service_browsertest.cc ('k') | chrome/browser/chromeos/base/file_flusher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698