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

Unified Diff: chrome/browser/browsing_data/browsing_data_channel_id_helper_unittest.cc

Issue 1076063002: Remove certificates from Channel ID (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Udpate KeysEqual to fail if preconditions fail Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/browsing_data/browsing_data_channel_id_helper_unittest.cc
diff --git a/chrome/browser/browsing_data/browsing_data_channel_id_helper_unittest.cc b/chrome/browser/browsing_data/browsing_data_channel_id_helper_unittest.cc
index 13c1a7856fc26c2769ab18032d444d60c8eb7206..ca5c8da31af5a7baa7adf5c54476948d5f3c0c1a 100644
--- a/chrome/browser/browsing_data/browsing_data_channel_id_helper_unittest.cc
+++ b/chrome/browser/browsing_data/browsing_data_channel_id_helper_unittest.cc
@@ -5,10 +5,12 @@
#include "chrome/browser/browsing_data/browsing_data_channel_id_helper.h"
#include "base/bind.h"
+#include "base/memory/scoped_ptr.h"
#include "base/run_loop.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_browser_thread_bundle.h"
+#include "crypto/ec_private_key.h"
#include "net/ssl/channel_id_service.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
@@ -38,12 +40,14 @@ class BrowsingDataChannelIDHelperTest
testing_profile_->GetRequestContext()->GetURLRequestContext();
net::ChannelIDStore* channel_id_store =
context->channel_id_service()->GetChannelIDStore();
- channel_id_store->SetChannelID("https://www.google.com:443",
- base::Time(), base::Time(),
- "key", "cert");
- channel_id_store->SetChannelID("https://www.youtube.com:443",
- base::Time(), base::Time(),
- "key", "cert");
+ channel_id_store->SetChannelID(
+ make_scoped_ptr(new net::ChannelIDStore::ChannelID(
+ "https://www.google.com:443", base::Time(),
+ make_scoped_ptr(crypto::ECPrivateKey::Create()))));
+ channel_id_store->SetChannelID(
+ make_scoped_ptr(new net::ChannelIDStore::ChannelID(
+ "https://www.youtube.com:443", base::Time(),
+ make_scoped_ptr(crypto::ECPrivateKey::Create()))));
}
void FetchCallback(
@@ -137,7 +141,7 @@ TEST_F(BrowsingDataChannelIDHelperTest, CannedEmpty) {
ASSERT_TRUE(helper->empty());
helper->AddChannelID(net::ChannelIDStore::ChannelID(
- origin, base::Time(), base::Time(), "key", "cert"));
+ origin, base::Time(), make_scoped_ptr(crypto::ECPrivateKey::Create())));
ASSERT_FALSE(helper->empty());
helper->Reset();
ASSERT_TRUE(helper->empty());
« no previous file with comments | « no previous file | chrome/browser/browsing_data/browsing_data_remover_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698