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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 chrome.app.runtime.onLaunched.addListener(function() {
6 chrome.test.getConfig(function(config) {
7 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.
8 if (!testName) {
9 chrome.test.fail("Missing test name.");
10 return;
11 }
12 chrome.chromeosInfoPrivate.get(['sessionType', 'playStoreStatus'],
13 function (values) {
14 if (testName == 'kiosk') {
15 chrome.test.assertEq('kiosk', values['sessionType']);
16 } else if (testName == 'arc available') {
17 chrome.test.assertEq('available', values['playStoreStatus']);
18 } else if (testName == 'arc enabled') {
19 chrome.test.assertEq('enabled', values['playStoreStatus']);
20 }
21 chrome.test.succeed();
22 });
23 });
24 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698