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

Side by Side Diff: chrome/browser/chromeos/arc/fileapi/arc_content_file_system_async_file_util_unittest.cc

Issue 2914433002: arc: Use the MIME type returned by the container to handle content URLs (Closed)
Patch Set: Comment drop. Created 3 years, 6 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
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <string.h> 5 #include <string.h>
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 13 matching lines...) Expand all
24 #include "url/gurl.h" 24 #include "url/gurl.h"
25 25
26 using File = arc::FakeFileSystemInstance::File; 26 using File = arc::FakeFileSystemInstance::File;
27 27
28 namespace arc { 28 namespace arc {
29 29
30 namespace { 30 namespace {
31 31
32 constexpr char kArcUrl[] = "content://org.chromium.foo/bar"; 32 constexpr char kArcUrl[] = "content://org.chromium.foo/bar";
33 constexpr char kData[] = "abcdef"; 33 constexpr char kData[] = "abcdef";
34 constexpr char kMimeType[] = "application/octet-stream";
34 35
35 class ArcContentFileSystemAsyncFileUtilTest : public testing::Test { 36 class ArcContentFileSystemAsyncFileUtilTest : public testing::Test {
36 public: 37 public:
37 ArcContentFileSystemAsyncFileUtilTest() = default; 38 ArcContentFileSystemAsyncFileUtilTest() = default;
38 ~ArcContentFileSystemAsyncFileUtilTest() override = default; 39 ~ArcContentFileSystemAsyncFileUtilTest() override = default;
39 40
40 void SetUp() override { 41 void SetUp() override {
41 fake_file_system_.AddFile(File(kArcUrl, kData, File::Seekable::NO)); 42 fake_file_system_.AddFile(
43 File(kArcUrl, kData, kMimeType, File::Seekable::NO));
42 44
43 arc_service_manager_ = base::MakeUnique<ArcServiceManager>(nullptr); 45 arc_service_manager_ = base::MakeUnique<ArcServiceManager>(nullptr);
44 arc_service_manager_->AddService( 46 arc_service_manager_->AddService(
45 ArcFileSystemOperationRunner::CreateForTesting( 47 ArcFileSystemOperationRunner::CreateForTesting(
46 arc_service_manager_->arc_bridge_service())); 48 arc_service_manager_->arc_bridge_service()));
47 arc_service_manager_->arc_bridge_service()->file_system()->SetInstance( 49 arc_service_manager_->arc_bridge_service()->file_system()->SetInstance(
48 &fake_file_system_); 50 &fake_file_system_);
49 } 51 }
50 52
51 protected: 53 protected:
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const base::File::Info& info) { 87 const base::File::Info& info) {
86 EXPECT_EQ(base::File::FILE_OK, error); 88 EXPECT_EQ(base::File::FILE_OK, error);
87 EXPECT_EQ(static_cast<int64_t>(strlen(kData)), info.size); 89 EXPECT_EQ(static_cast<int64_t>(strlen(kData)), info.size);
88 run_loop->Quit(); 90 run_loop->Quit();
89 }, 91 },
90 &run_loop)); 92 &run_loop));
91 run_loop.Run(); 93 run_loop.Run();
92 } 94 }
93 95
94 } // namespace arc 96 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/arc/fileapi/arc_content_file_system_file_stream_reader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698