| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 void TearDown() override { | 47 void TearDown() override { |
| 48 Verify(); | 48 Verify(); |
| 49 | 49 |
| 50 // Reset ExtensionPrefs, and re-verify. | 50 // Reset ExtensionPrefs, and re-verify. |
| 51 prefs_.ResetPrefRegistry(); | 51 prefs_.ResetPrefRegistry(); |
| 52 RegisterPreferences(prefs_.pref_registry().get()); | 52 RegisterPreferences(prefs_.pref_registry().get()); |
| 53 prefs_.RecreateExtensionPrefs(); | 53 prefs_.RecreateExtensionPrefs(); |
| 54 gallery_prefs_->SetExtensionPrefsForTesting(prefs()); | 54 gallery_prefs_->SetExtensionPrefsForTesting(prefs()); |
| 55 Verify(); | 55 Verify(); |
| 56 prefs_.pref_service()->CommitPendingWrite(); | 56 prefs_.pref_service()->CommitPendingWrite(); |
| 57 message_loop_.RunUntilIdle(); | 57 base::RunLoop().RunUntilIdle(); |
| 58 | 58 |
| 59 storage_monitor::TestStorageMonitor::Destroy(); | 59 storage_monitor::TestStorageMonitor::Destroy(); |
| 60 | 60 |
| 61 testing::Test::TearDown(); | 61 testing::Test::TearDown(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 void Initialize() override { | 64 void Initialize() override { |
| 65 file_thread_.Start(); | 65 file_thread_.Start(); |
| 66 | 66 |
| 67 ASSERT_TRUE(storage_monitor::TestStorageMonitor::CreateAndInstall()); | 67 ASSERT_TRUE(storage_monitor::TestStorageMonitor::CreateAndInstall()); |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 152 |
| 153 // Needed for |gallery_prefs_| to initialize correctly. | 153 // Needed for |gallery_prefs_| to initialize correctly. |
| 154 EnsureMediaDirectoriesExists ensure_media_directories_exists_; | 154 EnsureMediaDirectoriesExists ensure_media_directories_exists_; |
| 155 content::TestBrowserThread file_thread_; | 155 content::TestBrowserThread file_thread_; |
| 156 | 156 |
| 157 std::unique_ptr<TestingProfile> profile_; | 157 std::unique_ptr<TestingProfile> profile_; |
| 158 std::unique_ptr<MediaGalleriesPreferences> gallery_prefs_; | 158 std::unique_ptr<MediaGalleriesPreferences> gallery_prefs_; |
| 159 }; | 159 }; |
| 160 | 160 |
| 161 TEST_F(MediaGalleriesPermissionsTest, MediaGalleries) {} | 161 TEST_F(MediaGalleriesPermissionsTest, MediaGalleries) {} |
| OLD | NEW |