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

Side by Side Diff: chrome/browser/chromeos/login/kiosk_browsertest.cc

Issue 1029803004: Add chrome.fileSystem.GetVolumeList(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed chrome_extensions.js. Created 5 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/file_system/file_system_api.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // chrome/test/data/chromeos/app_mode/webstore/downloads/ 104 // chrome/test/data/chromeos/app_mode/webstore/downloads/
105 const char kTestOfflineEnabledKioskApp[] = "ajoggoflpgplnnjkjamcmbepjdjdnpdp"; 105 const char kTestOfflineEnabledKioskApp[] = "ajoggoflpgplnnjkjamcmbepjdjdnpdp";
106 106
107 // An app to test local fs data persistence across app update. V1 app writes 107 // An app to test local fs data persistence across app update. V1 app writes
108 // data into local fs. V2 app reads and verifies the data. 108 // data into local fs. V2 app reads and verifies the data.
109 // Webstore data json is in 109 // Webstore data json is in
110 // chrome/test/data/chromeos/app_mode/webstore/inlineinstall/ 110 // chrome/test/data/chromeos/app_mode/webstore/inlineinstall/
111 // detail/bmbpicmpniaclbbpdkfglgipkkebnbjf 111 // detail/bmbpicmpniaclbbpdkfglgipkkebnbjf
112 const char kTestLocalFsKioskApp[] = "bmbpicmpniaclbbpdkfglgipkkebnbjf"; 112 const char kTestLocalFsKioskApp[] = "bmbpicmpniaclbbpdkfglgipkkebnbjf";
113 113
114 // An app to test local access to file systems via the
115 // chrome.fileSystem.requestFileSystem API.
116 // Webstore data json is in
117 // chrome/test/data/chromeos/app_mode/webstore/inlineinstall/
118 // detail/aaedpojejpghjkedenggihopfhfijcko
119 const char kTestGetVolumeListKioskApp[] = "aaedpojejpghjkedenggihopfhfijcko";
120
114 // Fake usb stick mount path. 121 // Fake usb stick mount path.
115 const char kFakeUsbMountPathUpdatePass[] = 122 const char kFakeUsbMountPathUpdatePass[] =
116 "chromeos/app_mode/external_update/update_pass"; 123 "chromeos/app_mode/external_update/update_pass";
117 const char kFakeUsbMountPathNoManifest[] = 124 const char kFakeUsbMountPathNoManifest[] =
118 "chromeos/app_mode/external_update/no_manifest"; 125 "chromeos/app_mode/external_update/no_manifest";
119 const char kFakeUsbMountPathBadManifest[] = 126 const char kFakeUsbMountPathBadManifest[] =
120 "chromeos/app_mode/external_update/bad_manifest"; 127 "chromeos/app_mode/external_update/bad_manifest";
121 const char kFakeUsbMountPathLowerAppVersion[] = 128 const char kFakeUsbMountPathLowerAppVersion[] =
122 "chromeos/app_mode/external_update/lower_app_version"; 129 "chromeos/app_mode/external_update/lower_app_version";
123 const char kFakeUsbMountPathLowerCrxVersion[] = 130 const char kFakeUsbMountPathLowerCrxVersion[] =
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 "login.AutolaunchScreen.confirmAutoLaunchForTesting", 1252 "login.AutolaunchScreen.confirmAutoLaunchForTesting",
1246 base::FundamentalValue(true)); 1253 base::FundamentalValue(true));
1247 1254
1248 // Make cros settings untrusted. 1255 // Make cros settings untrusted.
1249 CrosSettingsPermanentlyUntrustedMaker(); 1256 CrosSettingsPermanentlyUntrustedMaker();
1250 1257
1251 // Check that the attempt to auto-launch a kiosk app fails with an error. 1258 // Check that the attempt to auto-launch a kiosk app fails with an error.
1252 OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait(); 1259 OobeScreenWaiter(OobeDisplay::SCREEN_ERROR_MESSAGE).Wait();
1253 } 1260 }
1254 1261
1262 // Verifies available volumes for kiosk apps in kiosk session.
1263 IN_PROC_BROWSER_TEST_F(KioskTest, GetVolumeList) {
1264 set_test_app_id(kTestGetVolumeListKioskApp);
1265 set_test_app_version("0.1");
1266 set_test_crx_file(test_app_id() + ".crx");
1267
1268 extensions::ResultCatcher catcher;
1269 StartAppLaunchFromLoginScreen(SimulateNetworkOnlineClosure());
1270 ASSERT_TRUE(catcher.GetNextResult()) << catcher.message();
1271 }
1272
1255 // Verifies that an enterprise device does not auto-launch kiosk mode when cros 1273 // Verifies that an enterprise device does not auto-launch kiosk mode when cros
1256 // settings are untrusted. 1274 // settings are untrusted.
1257 IN_PROC_BROWSER_TEST_F(KioskTest, NoEnterpriseAutoLaunchWhenUntrusted) { 1275 IN_PROC_BROWSER_TEST_F(KioskTest, NoEnterpriseAutoLaunchWhenUntrusted) {
1258 PrepareAppLaunch(); 1276 PrepareAppLaunch();
1259 SimulateNetworkOnline(); 1277 SimulateNetworkOnline();
1260 1278
1261 // Make cros settings untrusted. 1279 // Make cros settings untrusted.
1262 CrosSettingsPermanentlyUntrustedMaker(); 1280 CrosSettingsPermanentlyUntrustedMaker();
1263 1281
1264 // Trigger the code that handles auto-launch on enterprise devices. This would 1282 // Trigger the code that handles auto-launch on enterprise devices. This would
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
1982 content::WindowedNotificationObserver( 2000 content::WindowedNotificationObserver(
1983 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE, 2001 chrome::NOTIFICATION_KIOSK_AUTOLAUNCH_WARNING_VISIBLE,
1984 content::NotificationService::AllSources()).Wait(); 2002 content::NotificationService::AllSources()).Wait();
1985 2003
1986 // Wait for the wallpaper to load. 2004 // Wait for the wallpaper to load.
1987 WaitForWallpaper(); 2005 WaitForWallpaper();
1988 EXPECT_TRUE(wallpaper_loaded()); 2006 EXPECT_TRUE(wallpaper_loaded());
1989 } 2007 }
1990 2008
1991 } // namespace chromeos 2009 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/file_system/file_system_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698