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

Unified Diff: chrome/test/data/extensions/api_test/chrome_auth_private/enable_chrome_connector/cloud_print_success_tests.js

Issue 7253001: Added a private chromeAuthPrivate API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unittest failure Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/extensions/api_test/chrome_auth_private/enable_chrome_connector/cloud_print_success_tests.js
diff --git a/chrome/test/data/extensions/api_test/chrome_auth_private/enable_chrome_connector/cloud_print_success_tests.js b/chrome/test/data/extensions/api_test/chrome_auth_private/enable_chrome_connector/cloud_print_success_tests.js
new file mode 100644
index 0000000000000000000000000000000000000000..62f92239b96aa5264ba72f683190a28b27bc7c93
--- /dev/null
+++ b/chrome/test/data/extensions/api_test/chrome_auth_private/enable_chrome_connector/cloud_print_success_tests.js
@@ -0,0 +1,22 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+
+var tests = [
+ function successfulSetCreds() {
+ var userEmail = 'foo@gmail.com';
+ var robotEmail = 'foorobot@googleusercontent.com';
+ var credentials = '1/23546efa54';
+ chrome.chromeAuthPrivate.setCloudPrintCredentials(
+ userEmail, robotEmail, credentials,
+ chrome.test.callbackPass(function(result) {
+ // In test mode, we expect the API to reflect the arguments back to
+ // us appended together.
+ chrome.test.assertNoLastError();
+ chrome.test.assertEq(result, userEmail + robotEmail + credentials);
+ }));
+ }
+];
+
+chrome.test.runTests(tests);

Powered by Google App Engine
This is Rietveld 408576698