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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
11 #include "ash/desktop_background/desktop_background_controller_observer.h" | 11 #include "ash/desktop_background/desktop_background_controller_observer.h" |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
13 #include "base/command_line.h" | 13 #include "base/command_line.h" |
14 #include "base/compiler_specific.h" | 14 #include "base/compiler_specific.h" |
15 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
16 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
17 #include "base/json/json_writer.h" | 17 #include "base/json/json_writer.h" |
18 #include "base/macros.h" | 18 #include "base/macros.h" |
19 #include "base/memory/scoped_ptr.h" | 19 #include "base/memory/scoped_ptr.h" |
20 #include "base/path_service.h" | 20 #include "base/path_service.h" |
21 #include "base/run_loop.h" | 21 #include "base/run_loop.h" |
22 #include "chrome/browser/chromeos/login/login_manager_test.h" | 22 #include "chrome/browser/chromeos/login/login_manager_test.h" |
23 #include "chrome/browser/chromeos/login/startup_utils.h" | 23 #include "chrome/browser/chromeos/login/startup_utils.h" |
24 #include "chrome/browser/chromeos/login/ui/login_display_host_impl.h" | 24 #include "chrome/browser/chromeos/login/ui/login_display_host.h" |
25 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" | 25 #include "chrome/browser/chromeos/login/users/wallpaper/wallpaper_manager.h" |
26 #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_u til.h" | 26 #include "chrome/browser/chromeos/policy/cloud_external_data_manager_base_test_u til.h" |
27 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" | 27 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" |
28 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom eos.h" | 28 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_factory_chrom eos.h" |
29 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 29 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
30 #include "chrome/browser/profiles/profile.h" | 30 #include "chrome/browser/profiles/profile.h" |
31 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h" | |
31 #include "chrome/common/chrome_paths.h" | 32 #include "chrome/common/chrome_paths.h" |
32 #include "chromeos/chromeos_paths.h" | 33 #include "chromeos/chromeos_paths.h" |
33 #include "chromeos/chromeos_switches.h" | 34 #include "chromeos/chromeos_switches.h" |
34 #include "chromeos/dbus/cryptohome_client.h" | 35 #include "chromeos/dbus/cryptohome_client.h" |
35 #include "chromeos/dbus/dbus_thread_manager.h" | 36 #include "chromeos/dbus/dbus_thread_manager.h" |
36 #include "chromeos/dbus/fake_session_manager_client.h" | 37 #include "chromeos/dbus/fake_session_manager_client.h" |
37 #include "chromeos/dbus/session_manager_client.h" | 38 #include "chromeos/dbus/session_manager_client.h" |
38 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 39 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
39 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 40 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
40 #include "components/policy/core/common/cloud/cloud_policy_validator.h" | 41 #include "components/policy/core/common/cloud/cloud_policy_validator.h" |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
368 | 369 |
369 // Disabled due to flakiness: http://crbug.com/385648. | 370 // Disabled due to flakiness: http://crbug.com/385648. |
370 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, | 371 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, |
371 DISABLED_WallpaperOnLoginScreen) { | 372 DISABLED_WallpaperOnLoginScreen) { |
372 // Wait for active pod's wallpaper to be loaded. | 373 // Wait for active pod's wallpaper to be loaded. |
373 RunUntilWallpaperChangeCount(1); | 374 RunUntilWallpaperChangeCount(1); |
374 ASSERT_EQ(kGreenImageColor, GetAverageBackgroundColor()); | 375 ASSERT_EQ(kGreenImageColor, GetAverageBackgroundColor()); |
375 | 376 |
376 // Select the second pod (belonging to user 1). | 377 // Select the second pod (belonging to user 1). |
377 ASSERT_TRUE(content::ExecuteScript( | 378 ASSERT_TRUE(content::ExecuteScript( |
378 static_cast<chromeos::LoginDisplayHostImpl*>( | 379 chromeos::LoginDisplayHost::default_host() |
achuithb
2016/01/21 23:14:31
drop chromeos::
jdufault
2016/01/22 21:14:11
Done.
| |
379 chromeos::LoginDisplayHostImpl::default_host())->GetOobeUI()-> | 380 ->GetOobeUI() |
380 web_ui()->GetWebContents(), | 381 ->web_ui() |
382 ->GetWebContents(), | |
381 "document.getElementsByClassName('pod')[1].focus();")); | 383 "document.getElementsByClassName('pod')[1].focus();")); |
382 RunUntilWallpaperChangeCount(2); | 384 RunUntilWallpaperChangeCount(2); |
383 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); | 385 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); |
384 } | 386 } |
385 | 387 |
386 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PRE_PRE_PersistOverLogout) { | 388 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PRE_PRE_PersistOverLogout) { |
387 RegisterUser(testUsers_[0].GetUserEmail()); | 389 RegisterUser(testUsers_[0].GetUserEmail()); |
388 StartupUtils::MarkOobeCompleted(); | 390 StartupUtils::MarkOobeCompleted(); |
389 } | 391 } |
390 | 392 |
(...skipping 13 matching lines...) Expand all Loading... | |
404 | 406 |
405 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) { | 407 IN_PROC_BROWSER_TEST_F(WallpaperManagerPolicyTest, PersistOverLogout) { |
406 LoginUser(testUsers_[0].GetUserEmail()); | 408 LoginUser(testUsers_[0].GetUserEmail()); |
407 | 409 |
408 // Wait until wallpaper has been loaded. | 410 // Wait until wallpaper has been loaded. |
409 RunUntilWallpaperChangeCount(1); | 411 RunUntilWallpaperChangeCount(1); |
410 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); | 412 ASSERT_EQ(kRedImageColor, GetAverageBackgroundColor()); |
411 } | 413 } |
412 | 414 |
413 } // namespace chromeos | 415 } // namespace chromeos |
OLD | NEW |