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

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: Rebase 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..c37af26a5b475a7336355f6cf7d9fbb58dcddfbe 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,29 @@ 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;
+
+ chrome.test.runWithUserGesture(function() {
+ chrome.webstorePrivate.signIn(continue_url, callbackFail(error));
+ });
+ });
+}
+
+function expectUserIsAlreadySignedIn() {
+ getContinueUrl(function(continue_url) {
+ chrome.test.runWithUserGesture(function() {
+ chrome.webstorePrivate.signIn(continue_url, callbackPass());
+ });
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698