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

Side by Side Diff: chrome/browser/content_settings/content_settings_provider_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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/content_settings/content_settings_mock_provider.h" 8 #include "chrome/browser/content_settings/content_settings_mock_provider.h"
9 #include "chrome/browser/content_settings/content_settings_utils.h" 9 #include "chrome/browser/content_settings/content_settings_utils.h"
10 #include "googleurl/src/gurl.h" 10 #include "googleurl/src/gurl.h"
(...skipping 28 matching lines...) Expand all
39 39
40 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 40 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
41 GetContentSetting(&mock_provider, url, url, 41 GetContentSetting(&mock_provider, url, url,
42 CONTENT_SETTINGS_TYPE_PLUGINS, "flash_plugin", 42 CONTENT_SETTINGS_TYPE_PLUGINS, "flash_plugin",
43 false)); 43 false));
44 EXPECT_EQ(NULL, 44 EXPECT_EQ(NULL,
45 GetContentSettingValue(&mock_provider, url, url, 45 GetContentSettingValue(&mock_provider, url, url,
46 CONTENT_SETTINGS_TYPE_PLUGINS, 46 CONTENT_SETTINGS_TYPE_PLUGINS,
47 "flash_plugin", false)); 47 "flash_plugin", false));
48 EXPECT_EQ(CONTENT_SETTING_DEFAULT, 48 EXPECT_EQ(CONTENT_SETTING_DEFAULT,
49 GetContentSetting(&mock_provider, url, url, 49 GetContentSetting(&mock_provider,
50 CONTENT_SETTINGS_TYPE_GEOLOCATION, "", false)); 50 url,
51 url,
52 CONTENT_SETTINGS_TYPE_GEOLOCATION,
53 std::string(),
54 false));
51 EXPECT_EQ(NULL, 55 EXPECT_EQ(NULL,
52 GetContentSettingValue(&mock_provider, url, url, 56 GetContentSettingValue(&mock_provider,
53 CONTENT_SETTINGS_TYPE_GEOLOCATION, "", 57 url,
58 url,
59 CONTENT_SETTINGS_TYPE_GEOLOCATION,
60 std::string(),
54 false)); 61 false));
55 62
56 bool owned = mock_provider.SetWebsiteSetting( 63 bool owned = mock_provider.SetWebsiteSetting(
57 pattern, 64 pattern,
58 pattern, 65 pattern,
59 CONTENT_SETTINGS_TYPE_PLUGINS, 66 CONTENT_SETTINGS_TYPE_PLUGINS,
60 "java_plugin", 67 "java_plugin",
61 Value::CreateIntegerValue(CONTENT_SETTING_ALLOW)); 68 Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
62 EXPECT_TRUE(owned); 69 EXPECT_TRUE(owned);
63 EXPECT_EQ(CONTENT_SETTING_ALLOW, 70 EXPECT_EQ(CONTENT_SETTING_ALLOW,
(...skipping 26 matching lines...) Expand all
90 "java_plugin", 97 "java_plugin",
91 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK)); 98 Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
92 EXPECT_TRUE(owned); 99 EXPECT_TRUE(owned);
93 EXPECT_EQ(CONTENT_SETTING_BLOCK, 100 EXPECT_EQ(CONTENT_SETTING_BLOCK,
94 GetContentSetting(&mock_provider, url, url, 101 GetContentSetting(&mock_provider, url, url,
95 CONTENT_SETTINGS_TYPE_PLUGINS, "java_plugin", 102 CONTENT_SETTINGS_TYPE_PLUGINS, "java_plugin",
96 false)); 103 false));
97 } 104 }
98 105
99 } // namespace content_settings 106 } // namespace content_settings
OLDNEW
« no previous file with comments | « chrome/browser/content_settings/content_settings_provider.h ('k') | chrome/browser/content_settings/content_settings_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698