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

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

Issue 2839373003: struct UnloadedExtensionInfo -> enum UnloadedExtensionInfoReason (Closed)
Patch Set: Rebase Created 3 years, 7 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/service.h" 5 #include "chrome/browser/chromeos/file_system_provider/service.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 TEST_F(FileSystemProviderServiceTest, UnmountFileSystem_OnExtensionUnload) { 360 TEST_F(FileSystemProviderServiceTest, UnmountFileSystem_OnExtensionUnload) {
361 LoggingObserver observer; 361 LoggingObserver observer;
362 service_->AddObserver(&observer); 362 service_->AddObserver(&observer);
363 363
364 EXPECT_EQ(base::File::FILE_OK, 364 EXPECT_EQ(base::File::FILE_OK,
365 service_->MountFileSystem( 365 service_->MountFileSystem(
366 kExtensionId, MountOptions(kFileSystemId, kDisplayName))); 366 kExtensionId, MountOptions(kFileSystemId, kDisplayName)));
367 ASSERT_EQ(1u, observer.mounts.size()); 367 ASSERT_EQ(1u, observer.mounts.size());
368 368
369 // Directly call the observer's method. 369 // Directly call the observer's method.
370 service_->OnExtensionUnloaded( 370 service_->OnExtensionUnloaded(profile_, extension_.get(),
371 profile_, 371 extensions::UnloadedExtensionReason::DISABLE);
372 extension_.get(),
373 extensions::UnloadedExtensionInfo::REASON_DISABLE);
374 372
375 ASSERT_EQ(1u, observer.unmounts.size()); 373 ASSERT_EQ(1u, observer.unmounts.size());
376 EXPECT_EQ(base::File::FILE_OK, observer.unmounts[0].error()); 374 EXPECT_EQ(base::File::FILE_OK, observer.unmounts[0].error());
377 375
378 EXPECT_EQ(kExtensionId, 376 EXPECT_EQ(kExtensionId,
379 observer.unmounts[0].file_system_info().extension_id()); 377 observer.unmounts[0].file_system_info().extension_id());
380 EXPECT_EQ(kFileSystemId, 378 EXPECT_EQ(kFileSystemId,
381 observer.unmounts[0].file_system_info().file_system_id()); 379 observer.unmounts[0].file_system_info().file_system_id());
382 380
383 std::vector<ProvidedFileSystemInfo> file_system_info_list = 381 std::vector<ProvidedFileSystemInfo> file_system_info_list =
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 EXPECT_EQ(1u, observer.unmounts.size()); 545 EXPECT_EQ(1u, observer.unmounts.size());
548 EXPECT_FALSE(registry_->file_system_info()); 546 EXPECT_FALSE(registry_->file_system_info());
549 EXPECT_FALSE(registry_->watchers()); 547 EXPECT_FALSE(registry_->watchers());
550 } 548 }
551 549
552 service_->RemoveObserver(&observer); 550 service_->RemoveObserver(&observer);
553 } 551 }
554 552
555 } // namespace file_system_provider 553 } // namespace file_system_provider
556 } // namespace chromeos 554 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698