OLD | NEW |
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 #endif | 59 #endif |
60 } | 60 } |
61 | 61 |
62 const Extension* ExtensionBrowserTest::LoadExtensionWithOptions( | 62 const Extension* ExtensionBrowserTest::LoadExtensionWithOptions( |
63 const FilePath& path, bool incognito_enabled, bool fileaccess_enabled) { | 63 const FilePath& path, bool incognito_enabled, bool fileaccess_enabled) { |
64 ExtensionService* service = browser()->profile()->GetExtensionService(); | 64 ExtensionService* service = browser()->profile()->GetExtensionService(); |
65 { | 65 { |
66 NotificationRegistrar registrar; | 66 NotificationRegistrar registrar; |
67 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, | 67 registrar.Add(this, chrome::NOTIFICATION_EXTENSION_LOADED, |
68 NotificationService::AllSources()); | 68 NotificationService::AllSources()); |
69 service->LoadExtension(path); | 69 service->LoadExtension(path, false); |
70 ui_test_utils::RunMessageLoop(); | 70 ui_test_utils::RunMessageLoop(); |
71 } | 71 } |
72 | 72 |
73 // Find the extension by iterating backwards since it is likely last. | 73 // Find the extension by iterating backwards since it is likely last. |
74 FilePath extension_path = path; | 74 FilePath extension_path = path; |
75 file_util::AbsolutePath(&extension_path); | 75 file_util::AbsolutePath(&extension_path); |
76 const Extension* extension = NULL; | 76 const Extension* extension = NULL; |
77 for (ExtensionList::const_reverse_iterator iter = | 77 for (ExtensionList::const_reverse_iterator iter = |
78 service->extensions()->rbegin(); | 78 service->extensions()->rbegin(); |
79 iter != service->extensions()->rend(); ++iter) { | 79 iter != service->extensions()->rend(); ++iter) { |
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 MessageLoopForUI::current()->Quit(); | 474 MessageLoopForUI::current()->Quit(); |
475 } | 475 } |
476 break; | 476 break; |
477 } | 477 } |
478 | 478 |
479 default: | 479 default: |
480 NOTREACHED(); | 480 NOTREACHED(); |
481 break; | 481 break; |
482 } | 482 } |
483 } | 483 } |
OLD | NEW |