OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/chromeos/file_system_provider/fileapi/buffering_file_st
ream_writer.h" | 5 #include "chrome/browser/chromeos/file_system_provider/fileapi/buffering_file_st
ream_writer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ptr_util.h" | 12 #include "base/memory/ptr_util.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/run_loop.h" | 14 #include "base/run_loop.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
16 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
17 #include "net/base/io_buffer.h" | 17 #include "net/base/io_buffer.h" |
18 #include "net/base/net_errors.h" | 18 #include "net/base/net_errors.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 19 #include "testing/gtest/include/gtest/gtest.h" |
20 | 20 |
21 namespace chromeos { | 21 namespace chromeos { |
22 namespace file_system_provider { | 22 namespace file_system_provider { |
23 namespace { | 23 namespace { |
24 | 24 |
25 // Size of the intermediate buffer in bytes. | 25 // Size of the intermediate buffer in bytes. |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 ASSERT_EQ(1u, inner_write_log.size()); | 405 ASSERT_EQ(1u, inner_write_log.size()); |
406 EXPECT_EQ(kShortTextToWrite, inner_write_log[0]); | 406 EXPECT_EQ(kShortTextToWrite, inner_write_log[0]); |
407 | 407 |
408 // Flush of the inner file stream writer is not invoked, since a Write method | 408 // Flush of the inner file stream writer is not invoked, since a Write method |
409 // invocation fails before it. | 409 // invocation fails before it. |
410 EXPECT_EQ(0u, inner_flush_log.size()); | 410 EXPECT_EQ(0u, inner_flush_log.size()); |
411 } | 411 } |
412 | 412 |
413 } // namespace file_system_provider | 413 } // namespace file_system_provider |
414 } // namespace chromeos | 414 } // namespace chromeos |
OLD | NEW |