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

Side by Side Diff: chrome/browser/chromeos/login/users/multi_profile_user_controller_unittest.cc

Issue 657923003: Owner is allowed as a secondary user. chrome://settings honors profile now. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 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 "chrome/browser/chromeos/login/users/multi_profile_user_controller.h" 5 #include "chrome/browser/chromeos/login/users/multi_profile_user_controller.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/run_loop.h" 8 #include "base/run_loop.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" 10 #include "chrome/browser/chromeos/login/users/fake_user_manager.h"
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 << "Case " << i; 315 << "Case " << i;
316 } else { 316 } else {
317 EXPECT_NE(kBehaviorTestCases[i].expected_secondary_allowed, 317 EXPECT_NE(kBehaviorTestCases[i].expected_secondary_allowed,
318 MultiProfileUserController::ALLOWED) 318 MultiProfileUserController::ALLOWED)
319 << "Case " << i; 319 << "Case " << i;
320 } 320 }
321 } 321 }
322 } 322 }
323 323
324 // Tests that owner could not be a secondary user. 324 // Tests that owner could not be a secondary user.
325 TEST_F(MultiProfileUserControllerTest, NoSecondaryOwner) { 325 //
326 // TODO (ygorshenin@, crbug.com/230018): remove or change the test when the
327 // issue will be fixed.
328 TEST_F(MultiProfileUserControllerTest, DISABLED_NoSecondaryOwner) {
326 LoginUser(0); 329 LoginUser(0);
327 SetOwner(1); 330 SetOwner(1);
328 331
329 MultiProfileUserController::UserAllowedInSessionReason reason; 332 MultiProfileUserController::UserAllowedInSessionReason reason;
330 EXPECT_FALSE(controller()->IsUserAllowedInSession(kUsers[1], &reason)); 333 EXPECT_FALSE(controller()->IsUserAllowedInSession(kUsers[1], &reason));
331 EXPECT_EQ(MultiProfileUserController::NOT_ALLOWED_OWNER_AS_SECONDARY, reason); 334 EXPECT_EQ(MultiProfileUserController::NOT_ALLOWED_OWNER_AS_SECONDARY, reason);
332 335
333 EXPECT_EQ(0, user_not_allowed_count()); 336 EXPECT_EQ(0, user_not_allowed_count());
334 LoginUser(1); 337 LoginUser(1);
335 EXPECT_EQ(1, user_not_allowed_count()); 338 EXPECT_EQ(1, user_not_allowed_count());
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 EXPECT_EQ(MultiProfileUserController::NOT_ALLOWED_PRIMARY_POLICY_CERT_TAINTED, 437 EXPECT_EQ(MultiProfileUserController::NOT_ALLOWED_PRIMARY_POLICY_CERT_TAINTED,
435 reason); 438 reason);
436 EXPECT_EQ(MultiProfileUserController::NOT_ALLOWED_PRIMARY_POLICY_CERT_TAINTED, 439 EXPECT_EQ(MultiProfileUserController::NOT_ALLOWED_PRIMARY_POLICY_CERT_TAINTED,
437 MultiProfileUserController::GetPrimaryUserPolicy()); 440 MultiProfileUserController::GetPrimaryUserPolicy());
438 441
439 // Flush tasks posted to IO. 442 // Flush tasks posted to IO.
440 base::RunLoop().RunUntilIdle(); 443 base::RunLoop().RunUntilIdle();
441 } 444 }
442 445
443 } // namespace chromeos 446 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698