| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/net/net_log_temp_file.h" | 5 #include "chrome/browser/net/net_log_temp_file.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/file_util.h" | |
| 9 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
| 13 #include "chrome/browser/net/chrome_net_log.h" | 13 #include "chrome/browser/net/chrome_net_log.h" |
| 14 #include "content/public/test/test_browser_thread.h" | 14 #include "content/public/test/test_browser_thread.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 using content::BrowserThread; | 17 using content::BrowserThread; |
| 18 | 18 |
| 19 class TestNetLogTempFile : public NetLogTempFile { | 19 class TestNetLogTempFile : public NetLogTempFile { |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // Log an event. | 307 // Log an event. |
| 308 net_log_->AddGlobalEntry(net::NetLog::TYPE_CANCELLED); | 308 net_log_->AddGlobalEntry(net::NetLog::TYPE_CANCELLED); |
| 309 | 309 |
| 310 net_log_temp_file_->ProcessCommand(NetLogTempFile::DO_STOP); | 310 net_log_temp_file_->ProcessCommand(NetLogTempFile::DO_STOP); |
| 311 VerifyFileAndStateAfterDoStop(); | 311 VerifyFileAndStateAfterDoStop(); |
| 312 | 312 |
| 313 int64 new_stop_file_size; | 313 int64 new_stop_file_size; |
| 314 EXPECT_TRUE(base::GetFileSize(net_export_log_, &new_stop_file_size)); | 314 EXPECT_TRUE(base::GetFileSize(net_export_log_, &new_stop_file_size)); |
| 315 EXPECT_GE(new_stop_file_size, stop_file_size); | 315 EXPECT_GE(new_stop_file_size, stop_file_size); |
| 316 } | 316 } |
| OLD | NEW |