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

Unified Diff: chrome/common/extensions/api/extension_urls/devtools_manifest_unittest.cc

Issue 11742005: Move [Homepage,Options,Update,DevTools]URL out of Extension (Closed) Base URL: http://git.chromium.org/chromium/src.git@dc_unref_browser_action
Patch Set: Created 7 years, 12 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/extensions/api/extension_urls/extension_urls_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/api/extension_urls/devtools_manifest_unittest.cc
diff --git a/chrome/common/extensions/api/extension_urls/devtools_manifest_unittest.cc b/chrome/common/extensions/api/extension_urls/devtools_manifest_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..013c48f9e71e256053433c7cb9dbd0e4109f530b
--- /dev/null
+++ b/chrome/common/extensions/api/extension_urls/devtools_manifest_unittest.cc
@@ -0,0 +1,35 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// 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/extension_urls/extension_urls_handler.h"
+#include "chrome/common/extensions/extension.h"
+#include "chrome/common/extensions/extension_manifest_constants.h"
+#include "chrome/common/extensions/manifest_handler.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace extensions {
+
+class DevToolsManifestTest : public ExtensionManifestTest {
+ protected:
+ virtual void SetUp() OVERRIDE {
+ ExtensionManifestTest::SetUp();
+ ManifestHandler::Register(extension_manifest_keys::kDevToolsPage,
+ new DevToolsPageHandler);
+ }
+};
+
+TEST_F(DevToolsManifestTest, DevToolsExtensions) {
+ LoadAndExpectError("devtools_extension_url_invalid_type.json",
+ extension_manifest_errors::kInvalidDevToolsPage);
+
+ scoped_refptr<Extension> extension;
+ extension = LoadAndExpectSuccess("devtools_extension.json");
+ EXPECT_EQ(extension->url().spec() + "devtools.html",
+ ExtensionURL::GetDevToolsURL(extension).spec());
+ EXPECT_TRUE(extension->HasEffectiveAccessToAllHosts());
+}
+
+} // namespace extensions
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | chrome/common/extensions/api/extension_urls/extension_urls_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698