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

Unified Diff: chrome/browser/extensions/extension_browsertest.cc

Issue 9195018: Disable modal JavaScript dialogs for platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_browsertest.cc
diff --git a/chrome/browser/extensions/extension_browsertest.cc b/chrome/browser/extensions/extension_browsertest.cc
index 101e5241b24465e2c02dcd37bb51d8c8d3c83f98..5e493596095355d901755fa0549b3ea070bd1917 100644
--- a/chrome/browser/extensions/extension_browsertest.cc
+++ b/chrome/browser/extensions/extension_browsertest.cc
@@ -142,17 +142,21 @@ const Extension* ExtensionBrowserTest::LoadExtensionIncognito(
return LoadExtensionWithOptions(path, true, true);
}
-bool ExtensionBrowserTest::LoadExtensionAsComponent(const FilePath& path) {
+const Extension* ExtensionBrowserTest::LoadExtensionAsComponent(
+ const FilePath& path) {
ExtensionService* service = browser()->profile()->GetExtensionService();
std::string manifest;
if (!file_util::ReadFileToString(path.Append(Extension::kManifestFilename),
&manifest))
- return false;
-
- service->component_loader()->Add(manifest, path);
+ return NULL;
- return true;
+ const Extension* extension =
+ service->component_loader()->Add(manifest, path);
+ if (!extension)
+ return NULL;
+ last_loaded_extension_id_ = extension->id();
+ return extension;
}
FilePath ExtensionBrowserTest::PackExtension(const FilePath& dir_path) {
« no previous file with comments | « chrome/browser/extensions/extension_browsertest.h ('k') | chrome/browser/extensions/extension_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698