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

Unified Diff: chrome/test/data/extensions/api_test/chromeos_info_private/extended/background.js

Issue 2314313002: Add sessionType and playStoreStatus to chromeosInfoPrivate. (Closed)
Patch Set: . Created 4 years, 3 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/test/data/extensions/api_test/chromeos_info_private/extended/background.js
diff --git a/chrome/test/data/extensions/api_test/chromeos_info_private/extended/background.js b/chrome/test/data/extensions/api_test/chromeos_info_private/extended/background.js
new file mode 100644
index 0000000000000000000000000000000000000000..13747f8d7c8c8af5f0a07dece3bdff3b54fa4287
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/chromeos_info_private/extended/background.js
@@ -0,0 +1,24 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+chrome.app.runtime.onLaunched.addListener(function() {
+ chrome.test.getConfig(function(config) {
+ var testName = JSON.parse(config.customArg);
Devlin 2016/09/07 23:08:43 why not just testname = config.customArg?
Rahul Chaturvedi 2016/09/07 23:40:55 Done.
+ if (!testName) {
+ chrome.test.fail("Missing test name.");
+ return;
+ }
+ chrome.chromeosInfoPrivate.get(['sessionType', 'playStoreStatus'],
+ function (values) {
+ if (testName == 'kiosk') {
+ chrome.test.assertEq('kiosk', values['sessionType']);
+ } else if (testName == 'arc available') {
+ chrome.test.assertEq('available', values['playStoreStatus']);
+ } else if (testName == 'arc enabled') {
+ chrome.test.assertEq('enabled', values['playStoreStatus']);
+ }
+ chrome.test.succeed();
+ });
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698