OLD | NEW |
---|---|
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "ash/desktop_background/desktop_background_controller.h" | 5 #include "ash/desktop_background/desktop_background_controller.h" |
6 #include "ash/desktop_background/desktop_background_controller_observer.h" | 6 #include "ash/desktop_background/desktop_background_controller_observer.h" |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/path_service.h" | 13 #include "base/path_service.h" |
14 #include "base/prefs/pref_service.h" | 14 #include "base/prefs/pref_service.h" |
15 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
16 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
17 #include "base/synchronization/lock.h" | 17 #include "base/synchronization/lock.h" |
18 #include "chrome/browser/browser_process.h" | 18 #include "chrome/browser/browser_process.h" |
19 #include "chrome/browser/chrome_notification_types.h" | 19 #include "chrome/browser/chrome_notification_types.h" |
20 #include "chrome/browser/chromeos/app_mode/fake_cws.h" | 20 #include "chrome/browser/chromeos/app_mode/fake_cws.h" |
21 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" | 21 #include "chrome/browser/chromeos/app_mode/kiosk_app_launch_error.h" |
22 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" | 22 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
23 #include "chrome/browser/chromeos/file_manager/fake_disk_mount_manager.h" | |
23 #include "chrome/browser/chromeos/login/app_launch_controller.h" | 24 #include "chrome/browser/chromeos/login/app_launch_controller.h" |
24 #include "chrome/browser/chromeos/login/startup_utils.h" | 25 #include "chrome/browser/chromeos/login/startup_utils.h" |
25 #include "chrome/browser/chromeos/login/test/app_window_waiter.h" | 26 #include "chrome/browser/chromeos/login/test/app_window_waiter.h" |
26 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" | 27 #include "chrome/browser/chromeos/login/test/oobe_base_test.h" |
27 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" | 28 #include "chrome/browser/chromeos/login/test/oobe_screen_waiter.h" |
28 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" | 29 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" |
29 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" | 30 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
30 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" | 31 #include "chrome/browser/chromeos/login/users/scoped_user_manager_enabler.h" |
31 #include "chrome/browser/chromeos/login/wizard_controller.h" | 32 #include "chrome/browser/chromeos/login/wizard_controller.h" |
32 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" | 33 #include "chrome/browser/chromeos/policy/device_policy_cros_browser_test.h" |
33 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" | 34 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
34 #include "chrome/browser/chromeos/profiles/profile_helper.h" | 35 #include "chrome/browser/chromeos/profiles/profile_helper.h" |
35 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" | 36 #include "chrome/browser/chromeos/settings/device_oauth2_token_service.h" |
36 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " | 37 #include "chrome/browser/chromeos/settings/device_oauth2_token_service_factory.h " |
37 #include "chrome/browser/extensions/extension_service.h" | 38 #include "chrome/browser/extensions/extension_service.h" |
38 #include "chrome/browser/extensions/extension_test_message_listener.h" | 39 #include "chrome/browser/extensions/extension_test_message_listener.h" |
39 #include "chrome/browser/profiles/profile_impl.h" | 40 #include "chrome/browser/profiles/profile_impl.h" |
40 #include "chrome/browser/profiles/profile_manager.h" | 41 #include "chrome/browser/profiles/profile_manager.h" |
41 #include "chrome/browser/profiles/profiles_state.h" | 42 #include "chrome/browser/profiles/profiles_state.h" |
42 #include "chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.h" | 43 #include "chrome/browser/ui/webui/chromeos/login/kiosk_app_menu_handler.h" |
43 #include "chrome/common/chrome_constants.h" | 44 #include "chrome/common/chrome_constants.h" |
44 #include "chrome/common/chrome_paths.h" | 45 #include "chrome/common/chrome_paths.h" |
45 #include "chrome/common/pref_names.h" | 46 #include "chrome/common/pref_names.h" |
46 #include "chromeos/chromeos_switches.h" | 47 #include "chromeos/chromeos_switches.h" |
47 #include "chromeos/dbus/cryptohome_client.h" | 48 #include "chromeos/dbus/cryptohome_client.h" |
49 #include "chromeos/disks/disk_mount_manager.h" | |
48 #include "components/signin/core/common/signin_pref_names.h" | 50 #include "components/signin/core/common/signin_pref_names.h" |
49 #include "content/public/browser/browser_thread.h" | 51 #include "content/public/browser/browser_thread.h" |
50 #include "content/public/browser/notification_observer.h" | 52 #include "content/public/browser/notification_observer.h" |
51 #include "content/public/browser/notification_registrar.h" | 53 #include "content/public/browser/notification_registrar.h" |
52 #include "content/public/browser/notification_service.h" | 54 #include "content/public/browser/notification_service.h" |
53 #include "content/public/test/browser_test_utils.h" | 55 #include "content/public/test/browser_test_utils.h" |
54 #include "extensions/browser/app_window/app_window.h" | 56 #include "extensions/browser/app_window/app_window.h" |
55 #include "extensions/browser/app_window/app_window_registry.h" | 57 #include "extensions/browser/app_window/app_window_registry.h" |
56 #include "extensions/browser/app_window/native_app_window.h" | 58 #include "extensions/browser/app_window/native_app_window.h" |
57 #include "extensions/browser/extension_system.h" | 59 #include "extensions/browser/extension_system.h" |
(...skipping 30 matching lines...) Expand all Loading... | |
88 // chrome/test/data/chromeos/app_mode/webstore/downloads/ | 90 // chrome/test/data/chromeos/app_mode/webstore/downloads/ |
89 const char kTestOfflineEnabledKioskApp[] = "ajoggoflpgplnnjkjamcmbepjdjdnpdp"; | 91 const char kTestOfflineEnabledKioskApp[] = "ajoggoflpgplnnjkjamcmbepjdjdnpdp"; |
90 | 92 |
91 // An app to test local fs data persistence across app update. V1 app writes | 93 // An app to test local fs data persistence across app update. V1 app writes |
92 // data into local fs. V2 app reads and verifies the data. | 94 // data into local fs. V2 app reads and verifies the data. |
93 // Webstore data json is in | 95 // Webstore data json is in |
94 // chrome/test/data/chromeos/app_mode/webstore/inlineinstall/ | 96 // chrome/test/data/chromeos/app_mode/webstore/inlineinstall/ |
95 // detail/bmbpicmpniaclbbpdkfglgipkkebnbjf | 97 // detail/bmbpicmpniaclbbpdkfglgipkkebnbjf |
96 const char kTestLocalFsKioskApp[] = "bmbpicmpniaclbbpdkfglgipkkebnbjf"; | 98 const char kTestLocalFsKioskApp[] = "bmbpicmpniaclbbpdkfglgipkkebnbjf"; |
97 | 99 |
100 const char kFakeUsbStickMountPath[] = "chromeos/app_mode/external_update/"; | |
101 | |
98 // Timeout while waiting for network connectivity during tests. | 102 // Timeout while waiting for network connectivity during tests. |
99 const int kTestNetworkTimeoutSeconds = 1; | 103 const int kTestNetworkTimeoutSeconds = 1; |
100 | 104 |
101 // Email of owner account for test. | 105 // Email of owner account for test. |
102 const char kTestOwnerEmail[] = "owner@example.com"; | 106 const char kTestOwnerEmail[] = "owner@example.com"; |
103 | 107 |
104 const char kTestEnterpriseAccountId[] = "enterprise-kiosk-app@localhost"; | 108 const char kTestEnterpriseAccountId[] = "enterprise-kiosk-app@localhost"; |
105 const char kTestEnterpriseServiceAccountId[] = "service_account@example.com"; | 109 const char kTestEnterpriseServiceAccountId[] = "service_account@example.com"; |
106 const char kTestRefreshToken[] = "fake-refresh-token"; | 110 const char kTestRefreshToken[] = "fake-refresh-token"; |
107 const char kTestUserinfoToken[] = "fake-userinfo-token"; | 111 const char kTestUserinfoToken[] = "fake-userinfo-token"; |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
231 runner_->Quit(); | 235 runner_->Quit(); |
232 } | 236 } |
233 | 237 |
234 content::WebContents* web_contents_; | 238 content::WebContents* web_contents_; |
235 const std::string js_; | 239 const std::string js_; |
236 scoped_refptr<content::MessageLoopRunner> runner_; | 240 scoped_refptr<content::MessageLoopRunner> runner_; |
237 | 241 |
238 DISALLOW_COPY_AND_ASSIGN(JsConditionWaiter); | 242 DISALLOW_COPY_AND_ASSIGN(JsConditionWaiter); |
239 }; | 243 }; |
240 | 244 |
245 class KioskFakeDiskMountManager : public file_manager::FakeDiskMountManager { | |
246 public: | |
247 explicit KioskFakeDiskMountManager(const std::string& usb_mount_path) | |
248 : usb_mount_path_(usb_mount_path) {} | |
249 | |
250 virtual ~KioskFakeDiskMountManager() {} | |
251 | |
252 void MountUsbStick() { | |
253 MountPath(usb_mount_path_, "", "", chromeos::MOUNT_TYPE_DEVICE); | |
254 } | |
255 | |
256 void UnMountUsbStick() { | |
257 UnmountPath(usb_mount_path_, | |
258 UNMOUNT_OPTIONS_NONE, | |
259 disks::DiskMountManager::UnmountPathCallback()); | |
260 } | |
261 | |
262 private: | |
263 std::string usb_mount_path_; | |
264 | |
265 DISALLOW_COPY_AND_ASSIGN(KioskFakeDiskMountManager); | |
266 }; | |
267 | |
241 } // namespace | 268 } // namespace |
242 | 269 |
243 class KioskTest : public OobeBaseTest { | 270 class KioskTest : public OobeBaseTest { |
244 public: | 271 public: |
245 KioskTest() : fake_cws_(new FakeCWS) { | 272 KioskTest() : fake_cws_(new FakeCWS) { |
246 set_exit_when_last_browser_closes(false); | 273 set_exit_when_last_browser_closes(false); |
247 } | 274 } |
248 | 275 |
249 virtual ~KioskTest() {} | 276 virtual ~KioskTest() {} |
250 | 277 |
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
917 chrome::NOTIFICATION_KIOSK_ENABLE_WARNING_VISIBLE, | 944 chrome::NOTIFICATION_KIOSK_ENABLE_WARNING_VISIBLE, |
918 content::NotificationService::AllSources()).Wait(); | 945 content::NotificationService::AllSources()).Wait(); |
919 } | 946 } |
920 | 947 |
921 class KioskUpdateTest : public KioskTest { | 948 class KioskUpdateTest : public KioskTest { |
922 public: | 949 public: |
923 KioskUpdateTest() {} | 950 KioskUpdateTest() {} |
924 virtual ~KioskUpdateTest() {} | 951 virtual ~KioskUpdateTest() {} |
925 | 952 |
926 protected: | 953 protected: |
954 virtual void SetUp() OVERRIDE { | |
955 base::FilePath test_data_dir; | |
956 PathService::Get(chrome::DIR_TEST_DATA, &test_data_dir); | |
957 test_data_dir = test_data_dir.AppendASCII(kFakeUsbStickMountPath); | |
958 fake_disk_mount_manager_ = | |
959 new KioskFakeDiskMountManager(test_data_dir.value()); | |
960 disks::DiskMountManager::InitializeForTesting(fake_disk_mount_manager_); | |
961 | |
962 KioskTest::SetUp(); | |
963 } | |
964 | |
965 virtual void TearDown() OVERRIDE { | |
966 disks::DiskMountManager::Shutdown(); | |
967 | |
968 KioskTest::TearDown(); | |
969 } | |
970 | |
927 virtual void SetUpOnMainThread() OVERRIDE { | 971 virtual void SetUpOnMainThread() OVERRIDE { |
928 KioskTest::SetUpOnMainThread(); | 972 KioskTest::SetUpOnMainThread(); |
929 } | 973 } |
930 | 974 |
931 void PreCacheApp(const std::string& app_id, | 975 void PreCacheApp(const std::string& app_id, |
932 const std::string& version, | 976 const std::string& version, |
933 const std::string& crx_file) { | 977 const std::string& crx_file) { |
934 set_test_app_id(app_id); | 978 set_test_app_id(app_id); |
935 set_test_app_version(version); | 979 set_test_app_version(version); |
936 set_test_crx_file(crx_file); | 980 set_test_crx_file(crx_file); |
(...skipping 20 matching lines...) Expand all Loading... | |
957 KioskAppManager::Get()->UpdateExternalCache(); | 1001 KioskAppManager::Get()->UpdateExternalCache(); |
958 waiter.Wait(); | 1002 waiter.Wait(); |
959 EXPECT_TRUE(waiter.loaded()); | 1003 EXPECT_TRUE(waiter.loaded()); |
960 std::string cached_version; | 1004 std::string cached_version; |
961 base::FilePath file_path; | 1005 base::FilePath file_path; |
962 EXPECT_TRUE( | 1006 EXPECT_TRUE( |
963 manager->GetCachedCrx(test_app_id(), &file_path, &cached_version)); | 1007 manager->GetCachedCrx(test_app_id(), &file_path, &cached_version)); |
964 EXPECT_EQ(version, cached_version); | 1008 EXPECT_EQ(version, cached_version); |
965 } | 1009 } |
966 | 1010 |
1011 void SimulateUpdateAppFromUsbStick() { | |
1012 KioskAppExternalUpdateWaiter waiter(KioskAppManager::Get(), test_app_id()); | |
1013 fake_disk_mount_manager_->MountUsbStick(); | |
1014 waiter.Wait(); | |
1015 fake_disk_mount_manager_->UnMountUsbStick(); | |
1016 } | |
1017 | |
967 void PreCacheAndLaunchApp(const std::string& app_id, | 1018 void PreCacheAndLaunchApp(const std::string& app_id, |
968 const std::string& version, | 1019 const std::string& version, |
969 const std::string& crx_file) { | 1020 const std::string& crx_file) { |
970 set_test_app_id(app_id); | 1021 set_test_app_id(app_id); |
971 set_test_app_version(version); | 1022 set_test_app_version(version); |
972 set_test_crx_file(crx_file); | 1023 set_test_crx_file(crx_file); |
973 PrepareAppLaunch(); | 1024 PrepareAppLaunch(); |
974 SimulateNetworkOnline(); | 1025 SimulateNetworkOnline(); |
975 LaunchApp(test_app_id(), false); | 1026 LaunchApp(test_app_id(), false); |
976 WaitForAppLaunchSuccess(); | 1027 WaitForAppLaunchSuccess(); |
977 EXPECT_EQ(version, GetInstalledAppVersion().GetString()); | 1028 EXPECT_EQ(version, GetInstalledAppVersion().GetString()); |
978 } | 1029 } |
979 | 1030 |
980 private: | 1031 private: |
1032 class KioskAppExternalUpdateWaiter : KioskAppManagerObserver { | |
1033 public: | |
1034 KioskAppExternalUpdateWaiter(KioskAppManager* manager, | |
1035 const std::string& app_id) | |
1036 : runner_(NULL), manager_(manager), app_id_(app_id), quit_(false) { | |
1037 manager_->AddObserver(this); | |
1038 } | |
1039 | |
1040 virtual ~KioskAppExternalUpdateWaiter() { manager_->RemoveObserver(this); } | |
1041 | |
1042 void Wait() { | |
1043 if (quit_) | |
1044 return; | |
1045 runner_ = new content::MessageLoopRunner; | |
1046 runner_->Run(); | |
1047 } | |
1048 | |
1049 private: | |
1050 // KioskAppManagerObserver overrides: | |
1051 virtual void OnKioskAppCacheUpdated(const std::string& app_id) OVERRIDE { | |
1052 if (app_id_ != app_id) | |
1053 return; | |
1054 quit_ = true; | |
1055 if (runner_) | |
1056 runner_->Quit(); | |
1057 } | |
1058 | |
1059 scoped_refptr<content::MessageLoopRunner> runner_; | |
1060 KioskAppManager* manager_; | |
1061 const std::string app_id_; | |
1062 bool quit_; | |
1063 | |
1064 DISALLOW_COPY_AND_ASSIGN(KioskAppExternalUpdateWaiter); | |
1065 }; | |
1066 | |
981 class AppDataLoadWaiter : public KioskAppManagerObserver { | 1067 class AppDataLoadWaiter : public KioskAppManagerObserver { |
982 public: | 1068 public: |
983 AppDataLoadWaiter(KioskAppManager* manager, | 1069 AppDataLoadWaiter(KioskAppManager* manager, |
984 const std::string& app_id, | 1070 const std::string& app_id, |
985 const std::string& version) | 1071 const std::string& version) |
986 : runner_(NULL), | 1072 : runner_(NULL), |
987 manager_(manager), | 1073 manager_(manager), |
988 loaded_(false), | 1074 loaded_(false), |
989 quit_(false), | 1075 quit_(false), |
990 app_id_(app_id), | 1076 app_id_(app_id), |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1030 scoped_refptr<content::MessageLoopRunner> runner_; | 1116 scoped_refptr<content::MessageLoopRunner> runner_; |
1031 KioskAppManager* manager_; | 1117 KioskAppManager* manager_; |
1032 bool loaded_; | 1118 bool loaded_; |
1033 bool quit_; | 1119 bool quit_; |
1034 std::string app_id_; | 1120 std::string app_id_; |
1035 std::string version_; | 1121 std::string version_; |
1036 | 1122 |
1037 DISALLOW_COPY_AND_ASSIGN(AppDataLoadWaiter); | 1123 DISALLOW_COPY_AND_ASSIGN(AppDataLoadWaiter); |
1038 }; | 1124 }; |
1039 | 1125 |
1126 // Owned by DiskMountManager. | |
1127 KioskFakeDiskMountManager* fake_disk_mount_manager_; | |
1128 | |
1040 DISALLOW_COPY_AND_ASSIGN(KioskUpdateTest); | 1129 DISALLOW_COPY_AND_ASSIGN(KioskUpdateTest); |
1041 }; | 1130 }; |
1042 | 1131 |
1043 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, PRE_LaunchOfflineEnabledAppNoNetwork) { | 1132 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, PRE_LaunchOfflineEnabledAppNoNetwork) { |
1044 PreCacheAndLaunchApp(kTestOfflineEnabledKioskApp, | 1133 PreCacheAndLaunchApp(kTestOfflineEnabledKioskApp, |
1045 "1.0.0", | 1134 "1.0.0", |
1046 std::string(kTestOfflineEnabledKioskApp) + "_v1.crx"); | 1135 std::string(kTestOfflineEnabledKioskApp) + "_v1.crx"); |
1047 } | 1136 } |
1048 | 1137 |
1049 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, LaunchOfflineEnabledAppNoNetwork) { | 1138 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, LaunchOfflineEnabledAppNoNetwork) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1135 test_app_id(), "ajoggoflpgplnnjkjamcmbepjdjdnpdp.crx", "2.0.0"); | 1224 test_app_id(), "ajoggoflpgplnnjkjamcmbepjdjdnpdp.crx", "2.0.0"); |
1136 | 1225 |
1137 StartUIForAppLaunch(); | 1226 StartUIForAppLaunch(); |
1138 SimulateNetworkOnline(); | 1227 SimulateNetworkOnline(); |
1139 LaunchApp(test_app_id(), false); | 1228 LaunchApp(test_app_id(), false); |
1140 WaitForAppLaunchSuccess(); | 1229 WaitForAppLaunchSuccess(); |
1141 | 1230 |
1142 EXPECT_EQ("2.0.0", GetInstalledAppVersion().GetString()); | 1231 EXPECT_EQ("2.0.0", GetInstalledAppVersion().GetString()); |
1143 } | 1232 } |
1144 | 1233 |
1234 // Pre-cache v1 kiosk app. | |
1235 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, PRE_PRE_UsbStickUpdateAppNoNetwork) { | |
xiyuan
2014/08/29 18:44:00
Can we use PreCacheAndLaunchApp in PRE_ test and g
jennyz
2014/08/29 20:53:06
Done.
| |
1236 PreCacheApp(kTestOfflineEnabledKioskApp, | |
1237 "1.0.0", | |
1238 std::string(kTestOfflineEnabledKioskApp) + "_v1.crx"); | |
1239 } | |
1240 | |
1241 // Take off network, plug in usb stick with a v2 app. | |
1242 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, PRE_UsbStickUpdateAppNoNetwork) { | |
1243 set_test_app_id(kTestOfflineEnabledKioskApp); | |
1244 StartUIForAppLaunch(); | |
1245 SimulateNetworkOffline(); | |
1246 LaunchApp(test_app_id(), false); | |
1247 WaitForAppLaunchSuccess(); | |
1248 EXPECT_EQ("1.0.0", GetInstalledAppVersion().GetString()); | |
1249 | |
1250 // Simulate mounting of usb stick with v2 app on the stick. | |
1251 SimulateUpdateAppFromUsbStick(); | |
1252 | |
1253 // The v2 kiosk app is copied into external cache, but won't be loaded | |
1254 // until next time the device is started. | |
1255 EXPECT_EQ("1.0.0", GetInstalledAppVersion().GetString()); | |
1256 } | |
1257 | |
1258 // Restart the device, verify the app has been updated to v2. | |
1259 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, UsbStickUpdateAppNoNetwork) { | |
1260 // Verify the kiosk app has been updated to v2. | |
1261 set_test_app_id(kTestOfflineEnabledKioskApp); | |
1262 StartUIForAppLaunch(); | |
1263 SimulateNetworkOffline(); | |
1264 LaunchApp(test_app_id(), false); | |
1265 WaitForAppLaunchSuccess(); | |
1266 EXPECT_EQ("2.0.0", GetInstalledAppVersion().GetString()); | |
1267 } | |
1268 | |
1145 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, PRE_PermissionChange) { | 1269 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, PRE_PermissionChange) { |
1146 PreCacheAndLaunchApp(kTestOfflineEnabledKioskApp, | 1270 PreCacheAndLaunchApp(kTestOfflineEnabledKioskApp, |
1147 "2.0.0", | 1271 "2.0.0", |
1148 std::string(kTestOfflineEnabledKioskApp) + ".crx"); | 1272 std::string(kTestOfflineEnabledKioskApp) + ".crx"); |
1149 } | 1273 } |
1150 | 1274 |
1151 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, PermissionChange) { | 1275 IN_PROC_BROWSER_TEST_F(KioskUpdateTest, PermissionChange) { |
1152 set_test_app_id(kTestOfflineEnabledKioskApp); | 1276 set_test_app_id(kTestOfflineEnabledKioskApp); |
1153 set_test_app_version("2.0.0"); | 1277 set_test_app_version("2.0.0"); |
1154 set_test_crx_file(test_app_id() + "_v2_permission_change.crx"); | 1278 set_test_crx_file(test_app_id() + "_v2_permission_change.crx"); |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1406 content::WindowedNotificationObserver( | 1530 content::WindowedNotificationObserver( |
1407 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, | 1531 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, |
1408 content::NotificationService::AllSources()).Wait(); | 1532 content::NotificationService::AllSources()).Wait(); |
1409 | 1533 |
1410 // Wait for the wallpaper to load. | 1534 // Wait for the wallpaper to load. |
1411 WaitForWallpaper(); | 1535 WaitForWallpaper(); |
1412 EXPECT_TRUE(wallpaper_loaded()); | 1536 EXPECT_TRUE(wallpaper_loaded()); |
1413 } | 1537 } |
1414 | 1538 |
1415 } // namespace chromeos | 1539 } // namespace chromeos |
OLD | NEW |