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

Unified Diff: chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc

Issue 14306004: Put Kiosk App parameters into device settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc b/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc
index 4774b1282991496039ee7ac4626345d3bb6723d4..ed1153d09c09966f23d1af9bc93e9aaedff7ffe6 100644
--- a/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc
+++ b/chrome/browser/chromeos/app_mode/kiosk_app_manager_browsertest.cc
@@ -12,6 +12,8 @@
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h"
+#include "chrome/browser/chromeos/settings/cros_settings.h"
+#include "chrome/browser/chromeos/settings/cros_settings_names.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
@@ -193,8 +195,21 @@ IN_PROC_BROWSER_TEST_F(KioskAppManagerTest, LoadCached) {
KioskAppManager::kKioskDictionaryName);
dict_update->Set(KioskAppManager::kKeyApps, apps_dict.release());
- // Triggers reload prefs.
- manager()->RemoveApp("dummy");
+ // Make the app appear in device settings.
+ base::ListValue device_local_accounts;
+ scoped_ptr<base::DictionaryValue> entry(new base::DictionaryValue);
+ entry->SetStringWithoutPathExpansion(
+ kAccountsPrefDeviceLocalAccountsKeyId,
+ "app_1_id");
+ entry->SetIntegerWithoutPathExpansion(
+ kAccountsPrefDeviceLocalAccountsKeyType,
+ DEVICE_LOCAL_ACCOUNT_TYPE_KIOSK_APP);
+ entry->SetStringWithoutPathExpansion(
+ kAccountsPrefDeviceLocalAccountsKeyKioskAppId,
+ "app_1");
+ device_local_accounts.Append(entry.release());
+ CrosSettings::Get()->Set(kAccountsPrefDeviceLocalAccounts,
+ device_local_accounts);
AppDataLoadWaiter waiter(manager());
waiter.Wait();
« no previous file with comments | « chrome/browser/chromeos/app_mode/kiosk_app_manager.cc ('k') | chrome/browser/chromeos/app_mode/kiosk_app_manager_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698