OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_file_value_serializer.h" | 5 #include "base/json/json_file_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/extensions/extension_settings_handler.h" | 8 #include "chrome/browser/ui/webui/extensions/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" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
| 13 using extensions::Extension; |
13 | 14 |
14 class ExtensionUITest : public testing::Test { | 15 class ExtensionUITest : public testing::Test { |
15 protected: | 16 protected: |
16 static DictionaryValue* DeserializeJSONTestData(const FilePath& path, | 17 static DictionaryValue* DeserializeJSONTestData(const FilePath& path, |
17 std::string *error) { | 18 std::string *error) { |
18 Value* value; | 19 Value* value; |
19 | 20 |
20 JSONFileValueSerializer serializer(path); | 21 JSONFileValueSerializer serializer(path); |
21 value = serializer.Deserialize(NULL, error); | 22 value = serializer.Deserialize(NULL, error); |
22 | 23 |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 scoped_ptr<DictionaryValue> extension_details( | 226 scoped_ptr<DictionaryValue> extension_details( |
226 CreateExtensionDetailViewFromPath( | 227 CreateExtensionDetailViewFromPath( |
227 extension_path, pages, Extension::LOAD)); | 228 extension_path, pages, Extension::LOAD)); |
228 | 229 |
229 FilePath::StringType ui_path; | 230 FilePath::StringType ui_path; |
230 | 231 |
231 EXPECT_TRUE(extension_details->GetString("path", &ui_path)); | 232 EXPECT_TRUE(extension_details->GetString("path", &ui_path)); |
232 EXPECT_EQ(extension_path, FilePath(ui_path)); | 233 EXPECT_EQ(extension_path, FilePath(ui_path)); |
233 } | 234 } |
234 | 235 |
OLD | NEW |