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

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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
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(
371 profile_, 371 profile_, extension_.get(),
372 extension_.get(), 372 extensions::UnloadedExtensionReason::REASON_DISABLE);
373 extensions::UnloadedExtensionInfo::REASON_DISABLE);
374 373
375 ASSERT_EQ(1u, observer.unmounts.size()); 374 ASSERT_EQ(1u, observer.unmounts.size());
376 EXPECT_EQ(base::File::FILE_OK, observer.unmounts[0].error()); 375 EXPECT_EQ(base::File::FILE_OK, observer.unmounts[0].error());
377 376
378 EXPECT_EQ(kExtensionId, 377 EXPECT_EQ(kExtensionId,
379 observer.unmounts[0].file_system_info().extension_id()); 378 observer.unmounts[0].file_system_info().extension_id());
380 EXPECT_EQ(kFileSystemId, 379 EXPECT_EQ(kFileSystemId,
381 observer.unmounts[0].file_system_info().file_system_id()); 380 observer.unmounts[0].file_system_info().file_system_id());
382 381
383 std::vector<ProvidedFileSystemInfo> file_system_info_list = 382 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()); 546 EXPECT_EQ(1u, observer.unmounts.size());
548 EXPECT_FALSE(registry_->file_system_info()); 547 EXPECT_FALSE(registry_->file_system_info());
549 EXPECT_FALSE(registry_->watchers()); 548 EXPECT_FALSE(registry_->watchers());
550 } 549 }
551 550
552 service_->RemoveObserver(&observer); 551 service_->RemoveObserver(&observer);
553 } 552 }
554 553
555 } // namespace file_system_provider 554 } // namespace file_system_provider
556 } // namespace chromeos 555 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698