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

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

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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 "components/content_settings/core/browser/content_settings_policy_provi der.h" 5 #include "components/content_settings/core/browser/content_settings_policy_provi der.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 value); 266 value);
267 GURL youtube_url("https://www.youtube.com"); 267 GURL youtube_url("https://www.youtube.com");
268 EXPECT_EQ(NULL, TestUtils::GetContentSettingValue( 268 EXPECT_EQ(NULL, TestUtils::GetContentSettingValue(
269 &provider, youtube_url, youtube_url, 269 &provider, youtube_url, youtube_url,
270 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, 270 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
271 std::string(), false)); 271 std::string(), false));
272 std::unique_ptr<base::Value> cert_filter(TestUtils::GetContentSettingValue( 272 std::unique_ptr<base::Value> cert_filter(TestUtils::GetContentSettingValue(
273 &provider, google_url, google_url, 273 &provider, google_url, google_url,
274 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, std::string(), false)); 274 CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE, std::string(), false));
275 275
276 ASSERT_EQ(base::Value::TYPE_DICTIONARY, cert_filter->GetType()); 276 ASSERT_EQ(base::Value::Type::DICTIONARY, cert_filter->GetType());
277 base::DictionaryValue* dict_value = 277 base::DictionaryValue* dict_value =
278 static_cast<base::DictionaryValue*>(cert_filter.get()); 278 static_cast<base::DictionaryValue*>(cert_filter.get());
279 std::string actual_common_name; 279 std::string actual_common_name;
280 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name)); 280 ASSERT_TRUE(dict_value->GetString("ISSUER.CN", &actual_common_name));
281 EXPECT_EQ("issuer name", actual_common_name); 281 EXPECT_EQ("issuer name", actual_common_name);
282 provider.ShutdownOnUIThread(); 282 provider.ShutdownOnUIThread();
283 } 283 }
284 284
285 } // namespace content_settings 285 } // namespace content_settings
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698