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

Unified Diff: chrome/common/extensions/api/devtools/devtools_page_manifests_unittest.cc

Issue 11624036: Move the parsing of homepage_url" and "devtools_page" out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/devtools/devtools_page_manifests_unittest.cc
diff --git a/chrome/common/extensions/manifest_tests/extension_manifests_devtools_unittest.cc b/chrome/common/extensions/api/devtools/devtools_page_manifests_unittest.cc
similarity index 55%
rename from chrome/common/extensions/manifest_tests/extension_manifests_devtools_unittest.cc
rename to chrome/common/extensions/api/devtools/devtools_page_manifests_unittest.cc
index 4ee81e7a2d307d5059fe6c58f2c05bdfa0910012..f5e26baa0ef579feae84a5d2afcbf5d3c4d868a5 100644
--- a/chrome/common/extensions/manifest_tests/extension_manifests_devtools_unittest.cc
+++ b/chrome/common/extensions/api/devtools/devtools_page_manifests_unittest.cc
@@ -2,21 +2,37 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
-
+#include "chrome/common/extensions/api/devtools/devtools_page_handler.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "chrome/common/extensions/manifest_handler.h"
+#include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
#include "testing/gtest/include/gtest/gtest.h"
+namespace keys = extension_manifest_keys;
namespace errors = extension_manifest_errors;
-TEST_F(ExtensionManifestTest, DevToolsExtensions) {
+using extensions::Extension;
+
+namespace {
+
+class DevtoolsPageManifestTest : public ExtensionManifestTest {
+ virtual void SetUp() OVERRIDE {
+ ExtensionManifestTest::SetUp();
+ extensions::ManifestHandler::Register(keys::kDevToolsPage,
+ new extensions::DevtoolsPageHandler);
+ }
+};
+
+TEST_F(DevtoolsPageManifestTest, DevToolsExtensions) {
LoadAndExpectError("devtools_extension_url_invalid_type.json",
errors::kInvalidDevToolsPage);
scoped_refptr<extensions::Extension> extension;
extension = LoadAndExpectSuccess("devtools_extension.json");
EXPECT_EQ(extension->url().spec() + "devtools.html",
- extension->devtools_url().spec());
+ extensions::DevtoolsPageInfo::devtools_url(extension).spec());
EXPECT_TRUE(extension->HasEffectiveAccessToAllHosts());
}
+
+} // namespace

Powered by Google App Engine
This is Rietveld 408576698