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

Side by Side Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 8890086: Issue 71980: Extensions code should use UTF-16 for user-visible Unicode strings (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/extensions/extension_browsertest.h" 5 #include "chrome/browser/extensions/extension_browsertest.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 MockAbortExtensionInstallUI() : ExtensionInstallUI(NULL) {} 208 MockAbortExtensionInstallUI() : ExtensionInstallUI(NULL) {}
209 209
210 // Simulate a user abort on an extension installation. 210 // Simulate a user abort on an extension installation.
211 virtual void ConfirmInstall(Delegate* delegate, const Extension* extension) { 211 virtual void ConfirmInstall(Delegate* delegate, const Extension* extension) {
212 delegate->InstallUIAbort(true); 212 delegate->InstallUIAbort(true);
213 MessageLoopForUI::current()->Quit(); 213 MessageLoopForUI::current()->Quit();
214 } 214 }
215 215
216 virtual void OnInstallSuccess(const Extension* extension, SkBitmap* icon) {} 216 virtual void OnInstallSuccess(const Extension* extension, SkBitmap* icon) {}
217 217
218 virtual void OnInstallFailure(const std::string& error) {} 218 virtual void OnInstallFailure(const string16& error) {}
219 }; 219 };
220 220
221 class MockAutoConfirmExtensionInstallUI : public ExtensionInstallUI { 221 class MockAutoConfirmExtensionInstallUI : public ExtensionInstallUI {
222 public: 222 public:
223 explicit MockAutoConfirmExtensionInstallUI(Profile* profile) : 223 explicit MockAutoConfirmExtensionInstallUI(Profile* profile) :
224 ExtensionInstallUI(profile) {} 224 ExtensionInstallUI(profile) {}
225 225
226 // Proceed without confirmation prompt. 226 // Proceed without confirmation prompt.
227 virtual void ConfirmInstall(Delegate* delegate, const Extension* extension) { 227 virtual void ConfirmInstall(Delegate* delegate, const Extension* extension) {
228 delegate->InstallUIProceed(); 228 delegate->InstallUIProceed();
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 if (num_before + expected_change != num_after) { 294 if (num_before + expected_change != num_after) {
295 VLOG(1) << "Num extensions before: " << base::IntToString(num_before) 295 VLOG(1) << "Num extensions before: " << base::IntToString(num_before)
296 << " num after: " << base::IntToString(num_after) 296 << " num after: " << base::IntToString(num_after)
297 << " Installed extensions follow:"; 297 << " Installed extensions follow:";
298 298
299 for (ExtensionSet::const_iterator it = service->extensions()->begin(); 299 for (ExtensionSet::const_iterator it = service->extensions()->begin();
300 it != service->extensions()->end(); ++it) 300 it != service->extensions()->end(); ++it)
301 VLOG(1) << " " << (*it)->id(); 301 VLOG(1) << " " << (*it)->id();
302 302
303 VLOG(1) << "Errors follow:"; 303 VLOG(1) << "Errors follow:";
304 const std::vector<std::string>* errors = 304 const std::vector<string16>* errors =
305 ExtensionErrorReporter::GetInstance()->GetErrors(); 305 ExtensionErrorReporter::GetInstance()->GetErrors();
306 for (std::vector<std::string>::const_iterator iter = errors->begin(); 306 for (std::vector<string16>::const_iterator iter = errors->begin();
307 iter != errors->end(); ++iter) 307 iter != errors->end(); ++iter)
308 VLOG(1) << *iter; 308 VLOG(1) << *iter;
309 309
310 return NULL; 310 return NULL;
311 } 311 }
312 312
313 if (!WaitForExtensionHostsToLoad()) 313 if (!WaitForExtensionHostsToLoad())
314 return NULL; 314 return NULL;
315 return service->GetExtensionById(last_loaded_extension_id_, false); 315 return service->GetExtensionById(last_loaded_extension_id_, false);
316 } 316 }
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 MessageLoopForUI::current()->Quit(); 498 MessageLoopForUI::current()->Quit();
499 } 499 }
500 break; 500 break;
501 } 501 }
502 502
503 default: 503 default:
504 NOTREACHED(); 504 NOTREACHED();
505 break; 505 break;
506 } 506 }
507 } 507 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698