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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/provided_file_system_unittest.cc

Issue 624903002: [fsp] Group arguments for mounting into a struct. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a bug. Created 6 years, 2 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/provided_file_system.h" 5 #include "chrome/browser/chromeos/file_system_provider/provided_file_system.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 186
187 class FileSystemProviderProvidedFileSystemTest : public testing::Test { 187 class FileSystemProviderProvidedFileSystemTest : public testing::Test {
188 protected: 188 protected:
189 FileSystemProviderProvidedFileSystemTest() {} 189 FileSystemProviderProvidedFileSystemTest() {}
190 virtual ~FileSystemProviderProvidedFileSystemTest() {} 190 virtual ~FileSystemProviderProvidedFileSystemTest() {}
191 191
192 virtual void SetUp() override { 192 virtual void SetUp() override {
193 profile_.reset(new TestingProfile); 193 profile_.reset(new TestingProfile);
194 const base::FilePath mount_path = 194 const base::FilePath mount_path =
195 util::GetMountPath(profile_.get(), kExtensionId, kFileSystemId); 195 util::GetMountPath(profile_.get(), kExtensionId, kFileSystemId);
196 MountOptions mount_options;
197 mount_options.file_system_id = kFileSystemId;
198 mount_options.display_name = kDisplayName;
199 mount_options.supports_notify_tag = true;
196 file_system_info_.reset( 200 file_system_info_.reset(
197 new ProvidedFileSystemInfo(kExtensionId, 201 new ProvidedFileSystemInfo(kExtensionId, mount_options, mount_path));
198 kFileSystemId,
199 kDisplayName,
200 false /* writable */,
201 true /* supports_notify_tag */,
202 mount_path));
203 provided_file_system_.reset( 202 provided_file_system_.reset(
204 new ProvidedFileSystem(profile_.get(), *file_system_info_.get())); 203 new ProvidedFileSystem(profile_.get(), *file_system_info_.get()));
205 event_router_.reset( 204 event_router_.reset(
206 new FakeEventRouter(profile_.get(), provided_file_system_.get())); 205 new FakeEventRouter(profile_.get(), provided_file_system_.get()));
207 event_router_->AddEventListener(extensions::api::file_system_provider:: 206 event_router_->AddEventListener(extensions::api::file_system_provider::
208 OnObserveDirectoryRequested::kEventName, 207 OnObserveDirectoryRequested::kEventName,
209 NULL, 208 NULL,
210 kExtensionId); 209 kExtensionId);
211 event_router_->AddEventListener(extensions::api::file_system_provider:: 210 event_router_->AddEventListener(extensions::api::file_system_provider::
212 OnUnobserveEntryRequested::kEventName, 211 OnUnobserveEntryRequested::kEventName,
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
602 EXPECT_EQ(0u, observed_entries->size()); 601 EXPECT_EQ(0u, observed_entries->size());
603 EXPECT_EQ(2, observer.list_changed_counter()); 602 EXPECT_EQ(2, observer.list_changed_counter());
604 EXPECT_EQ(2, observer.tag_updated_counter()); 603 EXPECT_EQ(2, observer.tag_updated_counter());
605 } 604 }
606 605
607 provided_file_system_->RemoveObserver(&observer); 606 provided_file_system_->RemoveObserver(&observer);
608 } 607 }
609 608
610 } // namespace file_system_provider 609 } // namespace file_system_provider
611 } // namespace chromeos 610 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698