OLD | NEW |
---|---|
(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 }); | |
OLD | NEW |