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

Side by Side Diff: chrome/browser/content_settings/extension_content_settings_unittest.cc

Issue 10381097: Move content settings extension API to content_settings dir. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "chrome/browser/extensions/extension_content_settings_helpers.h" 7 #include "chrome/browser/content_settings/extension_content_settings_helpers.h"
8 8
9 namespace helpers = extension_content_settings_helpers; 9 namespace helpers = extension_content_settings_helpers;
10 10
11 TEST(ExtensionContentSettingsHelpersTest, ParseExtensionPattern) { 11 TEST(ExtensionContentSettingsHelpersTest, ParseExtensionPattern) {
12 const struct { 12 const struct {
13 const char* extension_pattern; 13 const char* extension_pattern;
14 const char* content_settings_pattern; 14 const char* content_settings_pattern;
15 } kTestPatterns[] = { 15 } kTestPatterns[] = {
16 { "<all_urls>", "*" }, 16 { "<all_urls>", "*" },
17 { "*://*.google.com/*", "[*.]google.com" }, 17 { "*://*.google.com/*", "[*.]google.com" },
(...skipping 24 matching lines...) Expand all
42 std::string error; 42 std::string error;
43 ContentSettingsPattern pattern = helpers::ParseExtensionPattern( 43 ContentSettingsPattern pattern = helpers::ParseExtensionPattern(
44 kInvalidTestPatterns[i].extension_pattern, &error); 44 kInvalidTestPatterns[i].extension_pattern, &error);
45 EXPECT_FALSE(pattern.IsValid()); 45 EXPECT_FALSE(pattern.IsValid());
46 EXPECT_EQ(kInvalidTestPatterns[i].expected_error, error) 46 EXPECT_EQ(kInvalidTestPatterns[i].expected_error, error)
47 << "Unexpected error parsing " 47 << "Unexpected error parsing "
48 << kInvalidTestPatterns[i].extension_pattern; 48 << kInvalidTestPatterns[i].extension_pattern;
49 } 49 }
50 50
51 } 51 }
52
chebert 2012/05/10 22:57:41 remove newline.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698