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

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: review comments 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 (c) 2011 The Chromium Authors. All rights reserved.
Devlin 2016/09/07 16:12:28 not 2011 :)
Rahul Chaturvedi 2016/09/07 20:13:24 Done.
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 testArgs = JSON.parse(config.customArg);
Devlin 2016/09/07 16:12:28 Why not just pass the test name?
Rahul Chaturvedi 2016/09/07 20:13:23 Done.
8 if (!testArgs) {
9 chrome.test.fail("Missing test args.");
10 return;
11 }
12 if (!testArgs.testName) {
13 chrome.test.fail("Missing test name.");
14 return;
15 }
16 chrome.chromeosInfoPrivate.get(['sessionType', 'playStoreStatus'],
17 function (values) {
18 if (testArgs.testName == 'kiosk') {
19 chrome.test.assertEq('kiosk', values['sessionType']);
20 } else if (testArgs.testName == 'arc available') {
21 chrome.test.assertEq('available', values['playStoreStatus']);
22 } else if (testArgs.testName == 'arc enabled') {
23 chrome.test.assertEq('enabled', values['playStoreStatus']);
24 }
25 chrome.test.succeed();
26 });
27 });
28 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698