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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/shared_options_browsertest.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. 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 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "chrome/browser/chromeos/login/login_manager_test.h" 10 #include "chrome/browser/chromeos/login/login_manager_test.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 { 352 {
353 SCOPED_TRACE("Screen lock false for both users"); 353 SCOPED_TRACE("Screen lock false for both users");
354 expected_value = false; 354 expected_value = false;
355 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, 355 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled,
356 empty_controlled, expected_value); 356 empty_controlled, expected_value);
357 } 357 }
358 358
359 // Set the secondary user's preference to true, and reload the primary user's 359 // Set the secondary user's preference to true, and reload the primary user's
360 // browser to see the updated controlled-by indicator. 360 // browser to see the updated controlled-by indicator.
361 prefs2->SetBoolean(prefs::kEnableAutoScreenLock, true); 361 prefs2->SetBoolean(prefs::kEnableAutoScreenLock, true);
362 chrome::Reload(browser, CURRENT_TAB); 362 chrome::Reload(browser, WindowOpenDisposition::CURRENT_TAB);
363 content::WaitForLoadStop(contents); 363 content::WaitForLoadStop(contents);
364 { 364 {
365 SCOPED_TRACE("Screen lock false for primary user"); 365 SCOPED_TRACE("Screen lock false for primary user");
366 expected_value = false; 366 expected_value = false;
367 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, 367 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled,
368 shared_controlled, expected_value); 368 shared_controlled, expected_value);
369 } 369 }
370 370
371 // Set the preference to true for the primary user and check that the 371 // Set the preference to true for the primary user and check that the
372 // indicator disappears. 372 // indicator disappears.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 { 433 {
434 SCOPED_TRACE("Screen lock false for secondary user"); 434 SCOPED_TRACE("Screen lock false for secondary user");
435 expected_value = false; 435 expected_value = false;
436 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, 436 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled,
437 shared_controlled, expected_value); 437 shared_controlled, expected_value);
438 } 438 }
439 439
440 // Set the preference to false for the primary user and check that the 440 // Set the preference to false for the primary user and check that the
441 // indicator disappears. 441 // indicator disappears.
442 prefs1->SetBoolean(prefs::kEnableAutoScreenLock, false); 442 prefs1->SetBoolean(prefs::kEnableAutoScreenLock, false);
443 chrome::Reload(browser, CURRENT_TAB); 443 chrome::Reload(browser, WindowOpenDisposition::CURRENT_TAB);
444 content::WaitForLoadStop(contents); 444 content::WaitForLoadStop(contents);
445 { 445 {
446 SCOPED_TRACE("Screen lock false for both users"); 446 SCOPED_TRACE("Screen lock false for both users");
447 expected_value = false; 447 expected_value = false;
448 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, 448 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled,
449 empty_controlled, expected_value); 449 empty_controlled, expected_value);
450 } 450 }
451 } 451 }
452 452
453 } // namespace chromeos 453 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698