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

Side by Side Diff: chrome/test/data/extensions/api_test/screenlock_private/lock_unlock/test.js

Issue 168623003: Add chrome.screenlockPrivate API functions to handle alternate auth types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var stage = 0; 5 var stage = 0;
6 6
7 function step() { 7 function step() {
8 chrome.screenlockPrivate.getLocked(function gotLocked(locked) { 8 chrome.screenlockPrivate.getLocked(function gotLocked(locked) {
9 if (stage === 0) { 9 if (stage === 0) {
10 if (locked) { 10 if (locked) {
(...skipping 23 matching lines...) Expand all
34 34
35 chrome.screenlockPrivate.onChanged.addListener(function(locked) { 35 chrome.screenlockPrivate.onChanged.addListener(function(locked) {
36 if (locked != (1 == (stage % 2))) { 36 if (locked != (1 == (stage % 2))) {
37 chrome.test.fail((locked ? '' : 'un') + 'locked at stage ' + stage + 37 chrome.test.fail((locked ? '' : 'un') + 'locked at stage ' + stage +
38 ' onChanged'); 38 ' onChanged');
39 } else { 39 } else {
40 return step(); 40 return step();
41 } 41 }
42 }); 42 });
43 43
44 step(); 44 chrome.test.runTests([
45 function testLockUnlock() {
46 step();
47 }
48 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698