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

Unified Diff: chrome/test/data/extensions/api_test/webstore_private/common.js

Issue 196783002: Export a private webstore API to call into the new inline sign-in flow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove a spurious diff Created 6 years, 8 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/webstore_private/common.js
diff --git a/chrome/test/data/extensions/api_test/webstore_private/common.js b/chrome/test/data/extensions/api_test/webstore_private/common.js
index 7aa92fd2dc4207020c593926d726c7c11d3b58e1..dc95b7aa285dcbe7e65e3b139084dda2f9c025b4 100644
--- a/chrome/test/data/extensions/api_test/webstore_private/common.js
+++ b/chrome/test/data/extensions/api_test/webstore_private/common.js
@@ -96,3 +96,33 @@ function installAndCleanUp(installOptions, whileInstalled) {
}));
}));
}
+
+function getContinueUrl(callback) {
+ chrome.test.getConfig(function(config) {
+ callback('http://www.example.com:PORT/continue'
+ .replace(/PORT/, config.spawnedTestServer.port));
+ });
+}
+
+function expectSignInFailure(error, forced_continue_url) {
+ getContinueUrl(function(continue_url) {
+ if (forced_continue_url !== undefined)
+ continue_url = forced_continue_url;
+
+ runTests([
+ function signIn() {
+ chrome.webstorePrivate.signIn(continue_url, callbackFail(error));
not at google - send to devlin 2014/04/21 18:04:42 i.e. this would be chrome.test.runWithUserGesture
Ilya Sherman 2014/04/22 05:02:32 Done.
+ },
+ ]);
+ });
+}
+
+function expectUserIsAlreadySignedIn() {
+ getContinueUrl(function(continue_url) {
+ runTests([
+ function signIn() {
+ chrome.webstorePrivate.signIn(continue_url, callbackPass());
+ },
+ ]);
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698