| 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 <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/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 "}", | 254 "}", |
| 255 &controlled_by)); | 255 &controlled_by)); |
| 256 EXPECT_EQ(!is_primary ? "shared" : std::string(), controlled_by); | 256 EXPECT_EQ(!is_primary ? "shared" : std::string(), controlled_by); |
| 257 } | 257 } |
| 258 | 258 |
| 259 // Checks the Accounts header and non-checkbox inputs. | 259 // Checks the Accounts header and non-checkbox inputs. |
| 260 void CheckAccountsOverlay(content::WebContents* contents, bool is_owner) { | 260 void CheckAccountsOverlay(content::WebContents* contents, bool is_owner) { |
| 261 // Set cros.accounts.allowGuest to false so we can test the accounts list. | 261 // Set cros.accounts.allowGuest to false so we can test the accounts list. |
| 262 // This has to be done after the PRE_* test or we can't add the owner. | 262 // This has to be done after the PRE_* test or we can't add the owner. |
| 263 stub_settings_provider_ptr_->Set(kAccountsPrefAllowNewUser, | 263 stub_settings_provider_ptr_->Set(kAccountsPrefAllowNewUser, |
| 264 base::FundamentalValue(false)); | 264 base::Value(false)); |
| 265 | 265 |
| 266 bool success; | 266 bool success; |
| 267 std::string js_expression = base::StringPrintf( | 267 std::string js_expression = base::StringPrintf( |
| 268 "var controlled = %d;" | 268 "var controlled = %d;" |
| 269 "var warning = $('ownerOnlyWarning');" | 269 "var warning = $('ownerOnlyWarning');" |
| 270 "var userList = $('userList');" | 270 "var userList = $('userList');" |
| 271 "var input = $('userNameEdit');" | 271 "var input = $('userNameEdit');" |
| 272 "var success;" | 272 "var success;" |
| 273 "if (controlled)" | 273 "if (controlled)" |
| 274 " success = warning && !warning.hidden && userList.disabled &&" | 274 " success = warning && !warning.hidden && userList.disabled &&" |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 content::WaitForLoadStop(contents); | 458 content::WaitForLoadStop(contents); |
| 459 { | 459 { |
| 460 SCOPED_TRACE("Screen lock false for both users"); | 460 SCOPED_TRACE("Screen lock false for both users"); |
| 461 expected_value = false; | 461 expected_value = false; |
| 462 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, | 462 CheckBooleanPreference(contents, prefs::kEnableAutoScreenLock, disabled, |
| 463 empty_controlled, expected_value); | 463 empty_controlled, expected_value); |
| 464 } | 464 } |
| 465 } | 465 } |
| 466 | 466 |
| 467 } // namespace chromeos | 467 } // namespace chromeos |
| OLD | NEW |