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

Side by Side Diff: chrome/common/content_settings_pattern_unittest.cc

Issue 7885006: Moving ContentSettingsPattern from chrome/browser/content_settings to chrome/common. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Keeping up to date with trunk. Created 9 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/common/content_settings_pattern_parser_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "chrome/browser/content_settings/content_settings_pattern.h" 5 #include "chrome/common/content_settings_pattern.h"
6 6
7 #include "googleurl/src/gurl.h" 7 #include "googleurl/src/gurl.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace { 10 namespace {
11 11
12 ContentSettingsPattern Pattern(const std::string& str) { 12 ContentSettingsPattern Pattern(const std::string& str) {
13 return ContentSettingsPattern::FromString(str); 13 return ContentSettingsPattern::FromString(str);
14 } 14 }
15 15
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 // file:/// normalization. 573 // file:/// normalization.
574 EXPECT_STREQ("file:///tmp/test.html", 574 EXPECT_STREQ("file:///tmp/test.html",
575 Pattern("file:///tmp/bar/../test.html").ToString().c_str()); 575 Pattern("file:///tmp/bar/../test.html").ToString().c_str());
576 576
577 // Invalid patterns. 577 // Invalid patterns.
578 EXPECT_STREQ("", Pattern("*example.com").ToString().c_str()); 578 EXPECT_STREQ("", Pattern("*example.com").ToString().c_str());
579 EXPECT_STREQ("", Pattern("example.*").ToString().c_str()); 579 EXPECT_STREQ("", Pattern("example.*").ToString().c_str());
580 EXPECT_STREQ("", Pattern("*\xC4\x87ira.com").ToString().c_str()); 580 EXPECT_STREQ("", Pattern("*\xC4\x87ira.com").ToString().c_str());
581 EXPECT_STREQ("", Pattern("\xC4\x87ira.*").ToString().c_str()); 581 EXPECT_STREQ("", Pattern("\xC4\x87ira.*").ToString().c_str());
582 } 582 }
OLDNEW
« no previous file with comments | « chrome/common/content_settings_pattern_parser_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698