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
3 // found in the LICENSE file.
5 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
6 #include "chrome/common/extensions/manifest_url_handler.h"
7 #include "extensions/common/extension.h"
8 #include "extensions/common/manifest_constants.h"
9 #include "extensions/common/permissions/permissions_data.h"
10 #include "testing/gtest/include/gtest/gtest.h"
12 class DevToolsPageManifestTest
: public ExtensionManifestTest
{
15 TEST_F(DevToolsPageManifestTest
, DevToolsExtensions
) {
16 LoadAndExpectError("devtools_extension_url_invalid_type.json",
17 extensions::manifest_errors::kInvalidDevToolsPage
);
19 scoped_refptr
<extensions::Extension
> extension
;
20 extension
= LoadAndExpectSuccess("devtools_extension.json");
21 EXPECT_EQ(extension
->url().spec() + "devtools.html",
22 extensions::ManifestURL::GetDevToolsPage(extension
.get()).spec());
23 EXPECT_TRUE(extensions::PermissionsData::HasEffectiveAccessToAllHosts(