| 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
|
|
|