| 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 "base/json/json_value_serializer.h" | 5 #include "base/json/json_value_serializer.h" |
| 6 #include "base/path_service.h" | 6 #include "base/path_service.h" |
| 7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
| 8 #include "chrome/browser/ui/webui/options/extension_settings_handler.h" | 8 #include "chrome/browser/ui/webui/options/extension_settings_handler.h" |
| 9 #include "chrome/common/chrome_paths.h" | 9 #include "chrome/common/chrome_paths.h" |
| 10 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 manifest_path, &error)); | 33 manifest_path, &error)); |
| 34 EXPECT_EQ("", error); | 34 EXPECT_EQ("", error); |
| 35 | 35 |
| 36 scoped_refptr<Extension> extension(Extension::Create( | 36 scoped_refptr<Extension> extension(Extension::Create( |
| 37 extension_path, location, *extension_data, | 37 extension_path, location, *extension_data, |
| 38 Extension::REQUIRE_KEY | Extension::STRICT_ERROR_CHECKS, &error)); | 38 Extension::REQUIRE_KEY | Extension::STRICT_ERROR_CHECKS, &error)); |
| 39 EXPECT_TRUE(extension.get()); | 39 EXPECT_TRUE(extension.get()); |
| 40 EXPECT_EQ("", error); | 40 EXPECT_EQ("", error); |
| 41 | 41 |
| 42 return ExtensionSettingsHandler::CreateExtensionDetailValue( | 42 return ExtensionSettingsHandler::CreateExtensionDetailValue( |
| 43 NULL, extension.get(), pages, true, false); | 43 NULL, extension.get(), pages, NULL, true, false); |
| 44 } | 44 } |
| 45 | 45 |
| 46 | 46 |
| 47 static void CompareExpectedAndActualOutput( | 47 static void CompareExpectedAndActualOutput( |
| 48 const FilePath& extension_path, | 48 const FilePath& extension_path, |
| 49 const std::vector<ExtensionPage>& pages, | 49 const std::vector<ExtensionPage>& pages, |
| 50 const FilePath& expected_output_path) { | 50 const FilePath& expected_output_path) { |
| 51 std::string error; | 51 std::string error; |
| 52 | 52 |
| 53 scoped_ptr<DictionaryValue> expected_output_data(DeserializeJSONTestData( | 53 scoped_ptr<DictionaryValue> expected_output_data(DeserializeJSONTestData( |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 scoped_ptr<DictionaryValue> extension_details( | 223 scoped_ptr<DictionaryValue> extension_details( |
| 224 CreateExtensionDetailViewFromPath( | 224 CreateExtensionDetailViewFromPath( |
| 225 extension_path, pages, Extension::LOAD)); | 225 extension_path, pages, Extension::LOAD)); |
| 226 | 226 |
| 227 FilePath::StringType ui_path; | 227 FilePath::StringType ui_path; |
| 228 | 228 |
| 229 EXPECT_TRUE(extension_details->GetString("path", &ui_path)); | 229 EXPECT_TRUE(extension_details->GetString("path", &ui_path)); |
| 230 EXPECT_EQ(extension_path, FilePath(ui_path)); | 230 EXPECT_EQ(extension_path, FilePath(ui_path)); |
| 231 } | 231 } |
| 232 | 232 |
| OLD | NEW |