| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/chromeos/policy/login_policy_test_base.h" | 10 #include "chrome/browser/chromeos/policy/login_policy_test_base.h" |
| 11 #include "chrome/browser/prefs/session_startup_pref.h" | 11 #include "chrome/browser/prefs/session_startup_pref.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/browser_list.h" | 13 #include "chrome/browser/ui/browser_list.h" |
| 14 #include "chrome/browser/ui/host_desktop.h" | |
| 15 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 14 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 16 #include "chrome/common/chrome_switches.h" | 15 #include "chrome/common/chrome_switches.h" |
| 17 #include "content/public/browser/notification_service.h" | 16 #include "content/public/browser/notification_service.h" |
| 18 #include "content/public/browser/web_contents.h" | 17 #include "content/public/browser/web_contents.h" |
| 19 #include "content/public/test/test_utils.h" | 18 #include "content/public/test/test_utils.h" |
| 20 #include "policy/policy_constants.h" | 19 #include "policy/policy_constants.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| 21 #include "ui/gfx/host_desktop_type.h" |
| 22 #include "url/gurl.h" | 22 #include "url/gurl.h" |
| 23 | 23 |
| 24 namespace policy { | 24 namespace policy { |
| 25 | 25 |
| 26 namespace { | 26 namespace { |
| 27 const char kStartUpURL1[] = "chrome://chrome/"; | 27 const char kStartUpURL1[] = "chrome://chrome/"; |
| 28 const char kStartUpURL2[] = "chrome://version/"; | 28 const char kStartUpURL2[] = "chrome://version/"; |
| 29 } | 29 } |
| 30 | 30 |
| 31 // Verifies that the |kRestoreOnStartup| and |kRestoreOnStartupURLs| policies | 31 // Verifies that the |kRestoreOnStartup| and |kRestoreOnStartupURLs| policies |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 | 86 |
| 87 // Verify that the policies are honored on an existing user's login. | 87 // Verify that the policies are honored on an existing user's login. |
| 88 IN_PROC_BROWSER_TEST_F(RestoreOnStartupTestChromeOS, LogInAndVerify) { | 88 IN_PROC_BROWSER_TEST_F(RestoreOnStartupTestChromeOS, LogInAndVerify) { |
| 89 content::WindowedNotificationObserver( | 89 content::WindowedNotificationObserver( |
| 90 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, | 90 chrome::NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE, |
| 91 content::NotificationService::AllSources()).Wait(); | 91 content::NotificationService::AllSources()).Wait(); |
| 92 LogInAndVerifyStartUpURLs(); | 92 LogInAndVerifyStartUpURLs(); |
| 93 } | 93 } |
| 94 | 94 |
| 95 } // namespace policy | 95 } // namespace policy |
| OLD | NEW |