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

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

Issue 8138004: Fix issues related to <all_urls> in extensions. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: make the plugin.dll empty so it loads everywhere Created 9 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 | 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 MessageLoopForUI::current()->Quit(); 481 MessageLoopForUI::current()->Quit();
482 } 482 }
483 break; 483 break;
484 } 484 }
485 485
486 default: 486 default:
487 NOTREACHED(); 487 NOTREACHED();
488 break; 488 break;
489 } 489 }
490 } 490 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/cross_origin_xhr_apitest.cc ('k') | chrome/common/extensions/extension_permission_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698