Chromium Code Reviews| 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()); |
| + }, |
| + ]); |
| + }); |
| +} |