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

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

Issue 16138003: Write an extension-upgrade browsertest to verify the fix for http://crbug.com/178542. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_loading_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #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_util.h" 10 #include "base/file_util.h"
(...skipping 393 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 crx_path = PackExtension(path); 404 crx_path = PackExtension(path);
405 } 405 }
406 if (crx_path.empty()) 406 if (crx_path.empty())
407 return NULL; 407 return NULL;
408 408
409 scoped_refptr<extensions::CrxInstaller> installer( 409 scoped_refptr<extensions::CrxInstaller> installer(
410 extensions::CrxInstaller::Create(service, install_ui)); 410 extensions::CrxInstaller::Create(service, install_ui));
411 installer->set_expected_id(id); 411 installer->set_expected_id(id);
412 installer->set_is_gallery_install(from_webstore); 412 installer->set_is_gallery_install(from_webstore);
413 installer->set_install_source(install_source); 413 installer->set_install_source(install_source);
414 installer->set_install_wait_for_idle(false);
414 if (!from_webstore) { 415 if (!from_webstore) {
415 installer->set_off_store_install_allow_reason( 416 installer->set_off_store_install_allow_reason(
416 extensions::CrxInstaller::OffStoreInstallAllowedInTest); 417 extensions::CrxInstaller::OffStoreInstallAllowedInTest);
417 } 418 }
418 419
419 content::NotificationRegistrar registrar; 420 content::NotificationRegistrar registrar;
420 registrar.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE, 421 registrar.Add(this, chrome::NOTIFICATION_CRX_INSTALLER_DONE,
421 content::Source<extensions::CrxInstaller>(installer.get())); 422 content::Source<extensions::CrxInstaller>(installer.get()));
422 423
423 installer->InstallCrx(crx_path); 424 installer->InstallCrx(crx_path);
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 case content::NOTIFICATION_LOAD_STOP: 733 case content::NOTIFICATION_LOAD_STOP:
733 VLOG(1) << "Got LOAD_STOP notification."; 734 VLOG(1) << "Got LOAD_STOP notification.";
734 MessageLoopForUI::current()->Quit(); 735 MessageLoopForUI::current()->Quit();
735 break; 736 break;
736 737
737 default: 738 default:
738 NOTREACHED(); 739 NOTREACHED();
739 break; 740 break;
740 } 741 }
741 } 742 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_loading_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698