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

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

Issue 579033002: [Clean-up] Remove some dead code for handling Webstore sign-in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore incorrectly deleted code Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // The id of an extension we're using for install tests. 5 // The id of an extension we're using for install tests.
6 var extensionId = "enfkhcelefdadlmkffamgdlgplcionje"; 6 var extensionId = "enfkhcelefdadlmkffamgdlgplcionje";
7 7
8 // The id of an app we're using for install tests. 8 // The id of an app we're using for install tests.
9 var appId = "iladmdjkfniedhfhcfoefgojhgaiaccc"; 9 var appId = "iladmdjkfniedhfhcfoefgojhgaiaccc";
10 10
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 assertEq(undefined, result); 89 assertEq(undefined, result);
90 90
91 whileInstalled(); 91 whileInstalled();
92 92
93 chrome.test.runWithUserGesture(callbackPass(function() { 93 chrome.test.runWithUserGesture(callbackPass(function() {
94 chrome.management.uninstall(extensionId, {}, callbackPass()); 94 chrome.management.uninstall(extensionId, {}, callbackPass());
95 })); 95 }));
96 })); 96 }));
97 })); 97 }));
98 } 98 }
99
100 function getContinueUrl(callback) {
101 chrome.test.getConfig(function(config) {
102 callback('http://www.example.com:PORT/continue'
103 .replace(/PORT/, config.spawnedTestServer.port));
104 });
105 }
106
107 function expectSignInFailure(error, forced_continue_url) {
108 getContinueUrl(function(continue_url) {
109 if (forced_continue_url !== undefined)
110 continue_url = forced_continue_url;
111
112 chrome.test.runWithUserGesture(function() {
113 chrome.webstorePrivate.signIn(continue_url, callbackFail(error));
114 });
115 });
116 }
117
118 function expectUserIsAlreadySignedIn() {
119 getContinueUrl(function(continue_url) {
120 chrome.test.runWithUserGesture(function() {
121 chrome.webstorePrivate.signIn(continue_url, callbackPass());
122 });
123 });
124 }
OLDNEW
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/test/data/extensions/api_test/webstore_private/sign_in_already_signed_in.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698