| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/upload_file_element_reader.h" | 5 #include "net/base/upload_file_element_reader.h" | 
| 6 | 6 | 
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" | 
| 8 #include "base/files/scoped_temp_dir.h" | 8 #include "base/files/scoped_temp_dir.h" | 
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop/message_loop_proxy.h" | 
| 10 #include "net/base/io_buffer.h" | 10 #include "net/base/io_buffer.h" | 
| 11 #include "net/base/net_errors.h" | 11 #include "net/base/net_errors.h" | 
| 12 #include "net/base/test_completion_callback.h" | 12 #include "net/base/test_completion_callback.h" | 
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" | 
| 14 #include "testing/platform_test.h" | 14 #include "testing/platform_test.h" | 
| 15 | 15 | 
| 16 namespace net { | 16 namespace net { | 
| 17 | 17 | 
| 18 class UploadFileElementReaderTest : public PlatformTest { | 18 class UploadFileElementReaderTest : public PlatformTest { | 
| 19  protected: | 19  protected: | 
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 346 TEST_F(UploadFileElementReaderSyncTest, WrongPath) { | 346 TEST_F(UploadFileElementReaderSyncTest, WrongPath) { | 
| 347   const base::FilePath wrong_path(FILE_PATH_LITERAL("wrong_path")); | 347   const base::FilePath wrong_path(FILE_PATH_LITERAL("wrong_path")); | 
| 348   reader_.reset(new UploadFileElementReaderSync( | 348   reader_.reset(new UploadFileElementReaderSync( | 
| 349       wrong_path, 0, kuint64max, base::Time())); | 349       wrong_path, 0, kuint64max, base::Time())); | 
| 350   ASSERT_EQ(OK, reader_->Init(CompletionCallback())); | 350   ASSERT_EQ(OK, reader_->Init(CompletionCallback())); | 
| 351   EXPECT_EQ(0U, reader_->GetContentLength()); | 351   EXPECT_EQ(0U, reader_->GetContentLength()); | 
| 352   EXPECT_EQ(0U, reader_->BytesRemaining()); | 352   EXPECT_EQ(0U, reader_->BytesRemaining()); | 
| 353 } | 353 } | 
| 354 | 354 | 
| 355 }  // namespace net | 355 }  // namespace net | 
| OLD | NEW | 
|---|