Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / common / extensions / manifest_tests / extension_manifests_devtools_unittest.cc
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.
4
5 #include "chrome/common/extensions/chrome_manifest_url_handlers.h"
6 #include "chrome/common/extensions/manifest_tests/chrome_manifest_test.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"
11
12 class DevToolsPageManifestTest : public ChromeManifestTest {
13 };
14
15 TEST_F(DevToolsPageManifestTest, DevToolsExtensions) {
16   LoadAndExpectError("devtools_extension_url_invalid_type.json",
17                      extensions::manifest_errors::kInvalidDevToolsPage);
18
19   scoped_refptr<extensions::Extension> extension;
20   extension = LoadAndExpectSuccess("devtools_extension.json");
21   EXPECT_EQ(extension->url().spec() + "devtools.html",
22             extensions::chrome_manifest_urls::GetDevToolsPage(extension.get())
23                 .spec());
24   EXPECT_TRUE(extension->permissions_data()->HasEffectiveAccessToAllHosts());
25 }