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

Side by Side Diff: net/base/net_log_logger_unittest.cc

Issue 1003953008: Remove prerender cookie store, part 4. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-revert-cookie-store-3
Patch Set: rebase (just in case since this is so huge) Created 5 years, 9 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
« no previous file with comments | « net/base/layered_network_delegate_unittest.cc ('k') | net/base/net_log_util_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "net/base/net_log_logger.h" 5 #include "net/base/net_log_logger.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/files/scoped_file.h" 9 #include "base/files/scoped_file.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 204
205 TEST_F(NetLogLoggerTest, GeneratesValidJSONWithContextWithActiveRequest) { 205 TEST_F(NetLogLoggerTest, GeneratesValidJSONWithContextWithActiveRequest) {
206 // Create context, start a request. 206 // Create context, start a request.
207 TestURLRequestContext context(true); 207 TestURLRequestContext context(true);
208 context.set_net_log(&net_log_); 208 context.set_net_log(&net_log_);
209 context.Init(); 209 context.Init();
210 TestDelegate delegate; 210 TestDelegate delegate;
211 211
212 // URL doesn't matter. Requests can't fail synchronously. 212 // URL doesn't matter. Requests can't fail synchronously.
213 scoped_ptr<URLRequest> request( 213 scoped_ptr<URLRequest> request(
214 context.CreateRequest(GURL("blah:blah"), IDLE, &delegate, nullptr)); 214 context.CreateRequest(GURL("blah:blah"), IDLE, &delegate));
215 request->Start(); 215 request->Start();
216 216
217 // Create and destroy a logger. 217 // Create and destroy a logger.
218 base::ScopedFILE file(base::OpenFile(log_path_, "w")); 218 base::ScopedFILE file(base::OpenFile(log_path_, "w"));
219 ASSERT_TRUE(file); 219 ASSERT_TRUE(file);
220 scoped_ptr<NetLogLogger> logger(new NetLogLogger()); 220 scoped_ptr<NetLogLogger> logger(new NetLogLogger());
221 logger->StartObserving(&net_log_, file.Pass(), nullptr, &context); 221 logger->StartObserving(&net_log_, file.Pass(), nullptr, &context);
222 logger->StopObserving(&context); 222 logger->StopObserving(&context);
223 logger.reset(); 223 logger.reset();
224 224
(...skipping 11 matching lines...) Expand all
236 ASSERT_EQ(1u, events->GetSize()); 236 ASSERT_EQ(1u, events->GetSize());
237 237
238 // Make sure additional information is present, but don't validate it. 238 // Make sure additional information is present, but don't validate it.
239 base::DictionaryValue* tab_info; 239 base::DictionaryValue* tab_info;
240 ASSERT_TRUE(dict->GetDictionary("tabInfo", &tab_info)); 240 ASSERT_TRUE(dict->GetDictionary("tabInfo", &tab_info));
241 } 241 }
242 242
243 } // namespace 243 } // namespace
244 244
245 } // namespace net 245 } // namespace net
OLDNEW
« no previous file with comments | « net/base/layered_network_delegate_unittest.cc ('k') | net/base/net_log_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698