diff options
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r-- | chrome/browser/ui/panels/base_panel_browser_test.cc | 10 | ||||
-rw-r--r-- | chrome/browser/ui/panels/panel_browsertest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/ui/panels/stacked_panel_browsertest.cc | 4 |
3 files changed, 8 insertions, 10 deletions
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc index 5c4da16..4cce306 100644 --- a/chrome/browser/ui/panels/base_panel_browser_test.cc +++ b/chrome/browser/ui/panels/base_panel_browser_test.cc @@ -10,6 +10,7 @@ #include "base/message_loop.h" #include "base/path_service.h" #include "base/strings/string_number_conversions.h" +#include "chrome/browser/extensions/extension_prefs.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/browser.h" @@ -456,12 +457,9 @@ scoped_refptr<Extension> BasePanelBrowserTest::CreateExtension( const base::FilePath::StringType& path, extensions::Manifest::Location location, const DictionaryValue& extra_value) { -#if defined(OS_WIN) - base::FilePath full_path(FILE_PATH_LITERAL("c:\\")); -#else - base::FilePath full_path(FILE_PATH_LITERAL("/")); -#endif - full_path = full_path.Append(path); + extensions::ExtensionPrefs* extension_prefs = + extensions::ExtensionPrefs::Get(browser()->profile()); + base::FilePath full_path = extension_prefs->install_directory().Append(path); scoped_ptr<DictionaryValue> input_value(extra_value.DeepCopy()); input_value->SetString(extension_manifest_keys::kVersion, "1.0.0.0"); diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc index d0ee3db..dd39bf1 100644 --- a/chrome/browser/ui/panels/panel_browsertest.cc +++ b/chrome/browser/ui/panels/panel_browsertest.cc @@ -1454,7 +1454,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DictionaryValue empty_value; scoped_refptr<extensions::Extension> extension = CreateExtension(FILE_PATH_LITERAL("TestExtension"), - extensions::Manifest::INVALID_LOCATION, empty_value); + extensions::Manifest::INTERNAL, empty_value); std::string extension_app_name = web_app::GenerateApplicationNameFromExtensionId(extension->id()); @@ -1480,7 +1480,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, // Create another extension and a panel from that extension. scoped_refptr<extensions::Extension> extension_other = CreateExtension(FILE_PATH_LITERAL("TestExtensionOther"), - extensions::Manifest::INVALID_LOCATION, empty_value); + extensions::Manifest::INTERNAL, empty_value); std::string extension_app_name_other = web_app::GenerateApplicationNameFromExtensionId(extension_other->id()); Panel* panel_other = CreatePanel(extension_app_name_other); diff --git a/chrome/browser/ui/panels/stacked_panel_browsertest.cc b/chrome/browser/ui/panels/stacked_panel_browsertest.cc index f1eebe2..e019ee2 100644 --- a/chrome/browser/ui/panels/stacked_panel_browsertest.cc +++ b/chrome/browser/ui/panels/stacked_panel_browsertest.cc @@ -988,12 +988,12 @@ IN_PROC_BROWSER_TEST_F(StackedPanelBrowserTest, DictionaryValue empty_value; scoped_refptr<extensions::Extension> extension1 = CreateExtension(FILE_PATH_LITERAL("TestExtension1"), - extensions::Manifest::INVALID_LOCATION, empty_value); + extensions::Manifest::INTERNAL, empty_value); std::string extension1_app_name = web_app::GenerateApplicationNameFromExtensionId(extension1->id()); scoped_refptr<extensions::Extension> extension2 = CreateExtension(FILE_PATH_LITERAL("TestExtension2"), - extensions::Manifest::INVALID_LOCATION, empty_value); + extensions::Manifest::INTERNAL, empty_value); std::string extension2_app_name = web_app::GenerateApplicationNameFromExtensionId(extension2->id()); |