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.
6 function getEnabled() {
7 chrome
.hotwordPrivate
.getStatus(
8 chrome
.test
.callbackPass(function(result
) {
9 chrome
.test
.assertFalse(result
.enabledSet
);
12 chrome
.hotwordPrivate
.setEnabled(true, function() {});
13 chrome
.hotwordPrivate
.getStatus(
14 chrome
.test
.callbackPass(function(result
) {
15 chrome
.test
.assertTrue(result
.enabled
);
17 chrome
.hotwordPrivate
.getStatus(
18 chrome
.test
.callbackPass(function(result
) {
19 chrome
.test
.assertTrue(result
.enabledSet
);
22 chrome
.hotwordPrivate
.setEnabled(false, function() {});
23 chrome
.hotwordPrivate
.getStatus(
24 chrome
.test
.callbackPass(function(result
) {
25 chrome
.test
.assertFalse(result
.enabled
);
27 chrome
.hotwordPrivate
.getStatus(
28 chrome
.test
.callbackPass(function(result
) {
29 chrome
.test
.assertTrue(result
.enabledSet
);