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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reader_unittest.cc

Issue 2815743002: Move a couple of blob tests next to the files they cover. (Closed)
Patch Set: Fix gn check, take 2. Created 3 years, 8 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 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/file_stream_reade r.h" 5 #include "chrome/browser/chromeos/file_system_provider/fileapi/file_stream_reade r.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/files/file.h" 14 #include "base/files/file.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/files/scoped_temp_dir.h" 16 #include "base/files/scoped_temp_dir.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/weak_ptr.h" 18 #include "base/memory/weak_ptr.h"
19 #include "base/numerics/safe_math.h" 19 #include "base/numerics/safe_math.h"
20 #include "base/run_loop.h" 20 #include "base/run_loop.h"
21 #include "chrome/browser/chromeos/file_system_provider/fake_provided_file_system .h" 21 #include "chrome/browser/chromeos/file_system_provider/fake_provided_file_system .h"
22 #include "chrome/browser/chromeos/file_system_provider/service.h" 22 #include "chrome/browser/chromeos/file_system_provider/service.h"
23 #include "chrome/browser/chromeos/file_system_provider/service_factory.h" 23 #include "chrome/browser/chromeos/file_system_provider/service_factory.h"
24 #include "chrome/test/base/testing_browser_process.h" 24 #include "chrome/test/base/testing_browser_process.h"
25 #include "chrome/test/base/testing_profile.h" 25 #include "chrome/test/base/testing_profile.h"
26 #include "chrome/test/base/testing_profile_manager.h" 26 #include "chrome/test/base/testing_profile_manager.h"
27 #include "content/public/test/test_browser_thread_bundle.h" 27 #include "content/public/test/test_browser_thread_bundle.h"
28 #include "content/public/test/test_file_system_context.h"
29 #include "extensions/browser/extension_registry.h" 28 #include "extensions/browser/extension_registry.h"
30 #include "net/base/io_buffer.h" 29 #include "net/base/io_buffer.h"
31 #include "net/base/net_errors.h" 30 #include "net/base/net_errors.h"
32 #include "storage/browser/fileapi/async_file_util.h" 31 #include "storage/browser/fileapi/async_file_util.h"
33 #include "storage/browser/fileapi/external_mount_points.h" 32 #include "storage/browser/fileapi/external_mount_points.h"
34 #include "storage/browser/fileapi/file_system_url.h" 33 #include "storage/browser/fileapi/file_system_url.h"
34 #include "storage/browser/test/test_file_system_context.h"
35 #include "testing/gtest/include/gtest/gtest.h" 35 #include "testing/gtest/include/gtest/gtest.h"
36 36
37 namespace chromeos { 37 namespace chromeos {
38 namespace file_system_provider { 38 namespace file_system_provider {
39 namespace { 39 namespace {
40 40
41 const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj"; 41 const char kExtensionId[] = "mbflcebpggnecokmikipoihdbecnjfoj";
42 const char kFileSystemId[] = "testing-file-system"; 42 const char kFileSystemId[] = "testing-file-system";
43 43
44 // Logs callbacks invocations on the file stream reader. 44 // Logs callbacks invocations on the file stream reader.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 EXPECT_EQ(net::ERR_IO_PENDING, result); 344 EXPECT_EQ(net::ERR_IO_PENDING, result);
345 base::RunLoop().RunUntilIdle(); 345 base::RunLoop().RunUntilIdle();
346 346
347 ASSERT_EQ(1u, logger.results().size()); 347 ASSERT_EQ(1u, logger.results().size());
348 EXPECT_LT(0, logger.results()[0]); 348 EXPECT_LT(0, logger.results()[0]);
349 EXPECT_EQ(*fake_file_->metadata->size, logger.results()[0]); 349 EXPECT_EQ(*fake_file_->metadata->size, logger.results()[0]);
350 } 350 }
351 351
352 } // namespace file_system_provider 352 } // namespace file_system_provider
353 } // namespace chromeos 353 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698