| Index: chrome/common/extensions/api/url_parser/devtools_page_manifests_unittest.cc
|
| diff --git a/chrome/common/extensions/api/url_parser/devtools_page_manifests_unittest.cc b/chrome/common/extensions/api/url_parser/devtools_page_manifests_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f259d9588cec51481dcaba47f4190a11113a9f4d
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/api/url_parser/devtools_page_manifests_unittest.cc
|
| @@ -0,0 +1,39 @@
|
| +// 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/api/url_parser/devtools_page_handler.h"
|
| +#include "chrome/common/extensions/api/url_parser/url_info.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;
|
| +
|
| +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", extensions::URLInfo::url(
|
| + extension, extensions::URLInfo::DEVTOOLS_PAGE).spec());
|
| + EXPECT_TRUE(extension->HasEffectiveAccessToAllHosts());
|
| +}
|
| +
|
| +} // namespace
|
|
|