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

Side by Side Diff: chrome/common/extensions/manifest_tests/extension_manifests_web_unittest.cc

Issue 10375021: Move Extension into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Take 6 Created 8 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h" 5 #include "chrome/common/extensions/manifest_tests/extension_manifest_test.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/common/extensions/extension_error_utils.h" 9 #include "chrome/common/extensions/extension_error_utils.h"
10 #include "chrome/common/extensions/extension_manifest_constants.h" 10 #include "chrome/common/extensions/extension_manifest_constants.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "webkit/glue/web_intent_service_data.h" 12 #include "webkit/glue/web_intent_service_data.h"
13 13
14 using extensions::Extension;
15
14 namespace errors = extension_manifest_errors; 16 namespace errors = extension_manifest_errors;
15 17
16 TEST_F(ExtensionManifestTest, WebAccessibleResources) { 18 TEST_F(ExtensionManifestTest, WebAccessibleResources) {
17 // Manifest version 2 with web accessible resources specified. 19 // Manifest version 2 with web accessible resources specified.
18 scoped_refptr<Extension> extension1( 20 scoped_refptr<Extension> extension1(
19 LoadAndExpectSuccess("web_accessible_resources_1.json")); 21 LoadAndExpectSuccess("web_accessible_resources_1.json"));
20 22
21 // Manifest version 2 with no web accessible resources. 23 // Manifest version 2 with no web accessible resources.
22 scoped_refptr<Extension> extension2( 24 scoped_refptr<Extension> extension2(
23 LoadAndExpectSuccess("web_accessible_resources_2.json")); 25 LoadAndExpectSuccess("web_accessible_resources_2.json"));
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 EXPECT_TYPE_ERROR); 227 EXPECT_TYPE_ERROR);
226 228
227 LoadAndExpectSuccess("web_urls_has_port.json"); 229 LoadAndExpectSuccess("web_urls_has_port.json");
228 230
229 scoped_refptr<Extension> extension( 231 scoped_refptr<Extension> extension(
230 LoadAndExpectSuccess("web_urls_default.json")); 232 LoadAndExpectSuccess("web_urls_default.json"));
231 ASSERT_EQ(1u, extension->web_extent().patterns().size()); 233 ASSERT_EQ(1u, extension->web_extent().patterns().size());
232 EXPECT_EQ("*://www.google.com/*", 234 EXPECT_EQ("*://www.google.com/*",
233 extension->web_extent().patterns().begin()->GetAsString()); 235 extension->web_extent().patterns().begin()->GetAsString());
234 } 236 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698