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

Side by Side Diff: chrome/common/extensions/api/extension_action/page_action_manifest_unittest.cc

Issue 578653005: Revert "Refactor ExtensionManifestTest to allow usage in src/extensions" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
OLDNEW
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"
6 #include "chrome/common/chrome_paths.h"
7 #include "chrome/common/extensions/api/extension_action/action_info.h" 5 #include "chrome/common/extensions/api/extension_action/action_info.h"
8 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.h" 6 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
9 #include "extensions/common/constants.h" 7 #include "extensions/common/constants.h"
10 #include "extensions/common/error_utils.h" 8 #include "extensions/common/error_utils.h"
11 #include "extensions/common/extension.h" 9 #include "extensions/common/extension.h"
12 #include "extensions/common/manifest_constants.h" 10 #include "extensions/common/manifest_constants.h"
13 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
14 12
15 namespace extensions { 13 namespace extensions {
16 14
17 namespace errors = manifest_errors; 15 namespace errors = manifest_errors;
18 namespace keys = manifest_keys; 16 namespace keys = manifest_keys;
19 17
20 class PageActionManifestTest : public ChromeManifestTest { 18 class PageActionManifestTest : public ExtensionManifestTest {
21 protected: 19 protected:
22 virtual base::FilePath GetTestDataDir() OVERRIDE { 20 virtual const char* test_data_dir() OVERRIDE {
23 base::FilePath path; 21 return "page_action";
24 PathService::Get(chrome::DIR_TEST_DATA, &path);
25 return path.AppendASCII("extensions").AppendASCII("page_action");
26 } 22 }
27 23
28 scoped_ptr<ActionInfo> LoadAction(const std::string& manifest_filename); 24 scoped_ptr<ActionInfo> LoadAction(const std::string& manifest_filename);
29 }; 25 };
30 26
31 scoped_ptr<ActionInfo> PageActionManifestTest::LoadAction( 27 scoped_ptr<ActionInfo> PageActionManifestTest::LoadAction(
32 const std::string& manifest_filename) { 28 const std::string& manifest_filename) {
33 scoped_refptr<Extension> extension = LoadAndExpectSuccess( 29 scoped_refptr<Extension> extension = LoadAndExpectSuccess(
34 manifest_filename.c_str()); 30 manifest_filename.c_str());
35 const ActionInfo* page_action_info = 31 const ActionInfo* page_action_info =
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 action = LoadAction("page_action_empty_popup.json"); 158 action = LoadAction("page_action_empty_popup.json");
163 159
164 ASSERT_TRUE(action); 160 ASSERT_TRUE(action);
165 EXPECT_TRUE(action->default_popup_url.is_empty()); 161 EXPECT_TRUE(action->default_popup_url.is_empty());
166 ASSERT_STREQ( 162 ASSERT_STREQ(
167 "", 163 "",
168 action->default_popup_url.spec().c_str()); 164 action->default_popup_url.spec().c_str());
169 } 165 }
170 166
171 } // namespace extensions 167 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698