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

Side by Side Diff: net/log/write_to_file_net_log_observer_unittest.cc

Issue 2319513003: //[chrome/browser/]net: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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
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/log/write_to_file_net_log_observer.h" 5 #include "net/log/write_to_file_net_log_observer.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 12 matching lines...) Expand all
23 #include "testing/gtest/include/gtest/gtest.h" 23 #include "testing/gtest/include/gtest/gtest.h"
24 24
25 namespace net { 25 namespace net {
26 26
27 namespace { 27 namespace {
28 28
29 class WriteToFileNetLogObserverTest : public testing::Test { 29 class WriteToFileNetLogObserverTest : public testing::Test {
30 public: 30 public:
31 void SetUp() override { 31 void SetUp() override {
32 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 32 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
33 log_path_ = temp_dir_.path().AppendASCII("NetLogFile"); 33 log_path_ = temp_dir_.GetPath().AppendASCII("NetLogFile");
34 } 34 }
35 35
36 protected: 36 protected:
37 base::ScopedTempDir temp_dir_; 37 base::ScopedTempDir temp_dir_;
38 base::FilePath log_path_; 38 base::FilePath log_path_;
39 NetLog net_log_; 39 NetLog net_log_;
40 }; 40 };
41 41
42 TEST_F(WriteToFileNetLogObserverTest, GeneratesValidJSONForNoEvents) { 42 TEST_F(WriteToFileNetLogObserverTest, GeneratesValidJSONForNoEvents) {
43 // Create and destroy a logger. 43 // Create and destroy a logger.
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 ASSERT_EQ(1u, events->GetSize()); 243 ASSERT_EQ(1u, events->GetSize());
244 244
245 // Make sure additional information is present, but don't validate it. 245 // Make sure additional information is present, but don't validate it.
246 base::DictionaryValue* tab_info; 246 base::DictionaryValue* tab_info;
247 ASSERT_TRUE(dict->GetDictionary("tabInfo", &tab_info)); 247 ASSERT_TRUE(dict->GetDictionary("tabInfo", &tab_info));
248 } 248 }
249 249
250 } // namespace 250 } // namespace
251 251
252 } // namespace net 252 } // namespace net
OLDNEW
« no previous file with comments | « net/log/bounded_file_net_log_observer_unittest.cc ('k') | net/socket/unix_domain_client_socket_posix_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698