Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / test / data / extensions / api_test / hotword_private / getEnabled / test.js
blob1e86be629ffd9f0e0ba5edb05398d2f79bdc533f
1 // Copyright 2014 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.
5 chrome.test.runTests([
6 function getEnabled() {
7 chrome.hotwordPrivate.getStatus(
8 chrome.test.callbackPass(function(result) {
9 chrome.test.assertFalse(result.enabledSet);
10 }));
12 chrome.hotwordPrivate.setEnabled(true, function() {});
13 chrome.hotwordPrivate.getStatus(
14 chrome.test.callbackPass(function(result) {
15 chrome.test.assertTrue(result.enabled);
16 }));
17 chrome.hotwordPrivate.getStatus(
18 chrome.test.callbackPass(function(result) {
19 chrome.test.assertTrue(result.enabledSet);
20 }));
22 chrome.hotwordPrivate.setEnabled(false, function() {});
23 chrome.hotwordPrivate.getStatus(
24 chrome.test.callbackPass(function(result) {
25 chrome.test.assertFalse(result.enabled);
26 }));
27 chrome.hotwordPrivate.getStatus(
28 chrome.test.callbackPass(function(result) {
29 chrome.test.assertTrue(result.enabledSet);
30 }));
32 ]);