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

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

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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
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_utils.h" 5 #include "chrome/browser/content_settings/content_settings_utils.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
11 TEST(ContentSettingsUtilsTest, ParsePatternString) { 11 TEST(ContentSettingsUtilsTest, ParsePatternString) {
12 content_settings::PatternPair pattern_pair; 12 content_settings::PatternPair pattern_pair;
13 13
14 pattern_pair = content_settings::ParsePatternString(""); 14 pattern_pair = content_settings::ParsePatternString(std::string());
15 EXPECT_FALSE(pattern_pair.first.IsValid()); 15 EXPECT_FALSE(pattern_pair.first.IsValid());
16 EXPECT_FALSE(pattern_pair.second.IsValid()); 16 EXPECT_FALSE(pattern_pair.second.IsValid());
17 17
18 pattern_pair = content_settings::ParsePatternString(","); 18 pattern_pair = content_settings::ParsePatternString(",");
19 EXPECT_FALSE(pattern_pair.first.IsValid()); 19 EXPECT_FALSE(pattern_pair.first.IsValid());
20 EXPECT_FALSE(pattern_pair.second.IsValid()); 20 EXPECT_FALSE(pattern_pair.second.IsValid());
21 21
22 pattern_pair = content_settings::ParsePatternString("http://www.foo.com"); 22 pattern_pair = content_settings::ParsePatternString("http://www.foo.com");
23 EXPECT_TRUE(pattern_pair.first.IsValid()); 23 EXPECT_TRUE(pattern_pair.first.IsValid());
24 EXPECT_EQ(pattern_pair.second, ContentSettingsPattern::Wildcard()); 24 EXPECT_EQ(pattern_pair.second, ContentSettingsPattern::Wildcard());
(...skipping 11 matching lines...) Expand all
36 pattern_pair = content_settings::ParsePatternString( 36 pattern_pair = content_settings::ParsePatternString(
37 "http://www.foo.com,http://www.bar.com,"); 37 "http://www.foo.com,http://www.bar.com,");
38 EXPECT_FALSE(pattern_pair.first.IsValid()); 38 EXPECT_FALSE(pattern_pair.first.IsValid());
39 EXPECT_FALSE(pattern_pair.second.IsValid()); 39 EXPECT_FALSE(pattern_pair.second.IsValid());
40 40
41 pattern_pair = content_settings::ParsePatternString( 41 pattern_pair = content_settings::ParsePatternString(
42 "http://www.foo.com,http://www.bar.com,http://www.error.com"); 42 "http://www.foo.com,http://www.bar.com,http://www.error.com");
43 EXPECT_FALSE(pattern_pair.first.IsValid()); 43 EXPECT_FALSE(pattern_pair.first.IsValid());
44 EXPECT_FALSE(pattern_pair.second.IsValid()); 44 EXPECT_FALSE(pattern_pair.second.IsValid());
45 } 45 }
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/content_settings_utils.cc ('k') | chrome/browser/content_settings/cookie_settings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698