OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | |
6 var tests = [ | 5 var tests = [ |
7 function successfulSetCreds() { | 6 function successfulSetCreds() { |
8 var userEmail = 'foo@gmail.com'; | 7 var userEmail = 'foo@gmail.com'; |
9 var robotEmail = 'foorobot@googleusercontent.com'; | 8 var robotEmail = 'foorobot@googleusercontent.com'; |
10 var credentials = '1/23546efa54'; | 9 var credentials = '1/23546efa54'; |
11 chrome.chromeAuthPrivate.setCloudPrintCredentials( | 10 chrome.chromeAuthPrivate.setCloudPrintCredentials( |
12 userEmail, robotEmail, credentials, | 11 userEmail, robotEmail, credentials, |
13 chrome.test.callbackPass(function(result) { | 12 chrome.test.callbackPass(function(result) { |
14 // In test mode, we expect the API to reflect the arguments back to | 13 // In test mode, we expect the API to reflect the arguments back to |
15 // us appended together. | 14 // us appended together. |
16 chrome.test.assertNoLastError(); | 15 chrome.test.assertNoLastError(); |
17 chrome.test.assertEq(result, userEmail + robotEmail + credentials); | 16 chrome.test.assertEq(result, userEmail + robotEmail + credentials); |
18 })); | 17 })); |
19 } | 18 } |
20 ]; | 19 ]; |
21 | 20 |
22 chrome.test.runTests(tests); | 21 chrome.test.runTests(tests); |
OLD | NEW |