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/path_service.h" | 5 #include "base/path_service.h" |
6 #include "chrome/common/chrome_paths.h" | 6 #include "chrome/common/chrome_paths.h" |
7 #include "chrome/common/extensions/api/extension_action/action_info.h" | 7 #include "chrome/common/extensions/api/extension_action/action_info.h" |
8 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h" | 8 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h" |
9 #include "extensions/common/constants.h" | 9 #include "extensions/common/constants.h" |
10 #include "extensions/common/error_utils.h" | 10 #include "extensions/common/error_utils.h" |
11 #include "extensions/common/extension.h" | 11 #include "extensions/common/extension.h" |
12 #include "extensions/common/manifest_constants.h" | 12 #include "extensions/common/manifest_constants.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 | 14 |
15 namespace extensions { | 15 namespace extensions { |
16 | 16 |
17 namespace errors = manifest_errors; | 17 namespace errors = manifest_errors; |
18 namespace keys = manifest_keys; | 18 namespace keys = manifest_keys; |
19 | 19 |
20 class PageActionManifestTest : public ChromeManifestTest { | 20 class PageActionManifestTest : public ChromeManifestTest { |
21 protected: | 21 protected: |
22 virtual base::FilePath GetTestDataDir() OVERRIDE { | 22 virtual base::FilePath GetTestDataDir() override { |
23 base::FilePath path; | 23 base::FilePath path; |
24 PathService::Get(chrome::DIR_TEST_DATA, &path); | 24 PathService::Get(chrome::DIR_TEST_DATA, &path); |
25 return path.AppendASCII("extensions").AppendASCII("page_action"); | 25 return path.AppendASCII("extensions").AppendASCII("page_action"); |
26 } | 26 } |
27 | 27 |
28 scoped_ptr<ActionInfo> LoadAction(const std::string& manifest_filename); | 28 scoped_ptr<ActionInfo> LoadAction(const std::string& manifest_filename); |
29 }; | 29 }; |
30 | 30 |
31 scoped_ptr<ActionInfo> PageActionManifestTest::LoadAction( | 31 scoped_ptr<ActionInfo> PageActionManifestTest::LoadAction( |
32 const std::string& manifest_filename) { | 32 const std::string& manifest_filename) { |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 action = LoadAction("page_action_empty_popup.json"); | 162 action = LoadAction("page_action_empty_popup.json"); |
163 | 163 |
164 ASSERT_TRUE(action); | 164 ASSERT_TRUE(action); |
165 EXPECT_TRUE(action->default_popup_url.is_empty()); | 165 EXPECT_TRUE(action->default_popup_url.is_empty()); |
166 ASSERT_STREQ( | 166 ASSERT_STREQ( |
167 "", | 167 "", |
168 action->default_popup_url.spec().c_str()); | 168 action->default_popup_url.spec().c_str()); |
169 } | 169 } |
170 | 170 |
171 } // namespace extensions | 171 } // namespace extensions |
OLD | NEW |