OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |