| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "apps/app_restore_service.h" | 5 #include "apps/app_restore_service.h" |
| 6 #include "apps/app_restore_service_factory.h" | 6 #include "apps/app_restore_service_factory.h" |
| 7 #include "apps/saved_files_service.h" | 7 #include "apps/saved_files_service.h" |
| 8 #include "chrome/browser/apps/app_browsertest_util.h" | 8 #include "chrome/browser/apps/app_browsertest_util.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/extensions/api/file_system/file_system_api.h" | 10 #include "chrome/browser/extensions/api/file_system/file_system_api.h" |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 // One for the read-only file entry and one for the writable file entry. | 86 // One for the read-only file entry and one for the writable file entry. |
| 87 ASSERT_EQ(2u, file_entries.size()); | 87 ASSERT_EQ(2u, file_entries.size()); |
| 88 | 88 |
| 89 extension_suspended.Wait(); | 89 extension_suspended.Wait(); |
| 90 file_entries = saved_files_service->GetAllFileEntries(extension->id()); | 90 file_entries = saved_files_service->GetAllFileEntries(extension->id()); |
| 91 // File entries should be cleared when the extension is suspended. | 91 // File entries should be cleared when the extension is suspended. |
| 92 ASSERT_TRUE(file_entries.empty()); | 92 ASSERT_TRUE(file_entries.empty()); |
| 93 } | 93 } |
| 94 | 94 |
| 95 // Flaky: crbug.com/269613 | 95 // Flaky: crbug.com/269613 |
| 96 #if defined(OS_LINUX) | 96 #if defined(OS_LINUX) || defined(OS_WIN) |
| 97 #define MAYBE_FileAccessIsRestored DISABLED_FileAccessIsRestored | 97 #define MAYBE_FileAccessIsRestored DISABLED_FileAccessIsRestored |
| 98 #else | 98 #else |
| 99 #define MAYBE_FileAccessIsRestored FileAccessIsRestored | 99 #define MAYBE_FileAccessIsRestored FileAccessIsRestored |
| 100 #endif | 100 #endif |
| 101 | 101 |
| 102 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_FileAccessIsRestored) { | 102 IN_PROC_BROWSER_TEST_F(PlatformAppBrowserTest, MAYBE_FileAccessIsRestored) { |
| 103 content::WindowedNotificationObserver extension_suspended( | 103 content::WindowedNotificationObserver extension_suspended( |
| 104 chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED, | 104 chrome::NOTIFICATION_EXTENSION_HOST_DESTROYED, |
| 105 content::NotificationService::AllSources()); | 105 content::NotificationService::AllSources()); |
| 106 | 106 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 extension->id(), it->id, it->path, it->is_directory); | 140 extension->id(), it->id, it->path, it->is_directory); |
| 141 } | 141 } |
| 142 | 142 |
| 143 apps::AppRestoreServiceFactory::GetForProfile(browser()->profile())-> | 143 apps::AppRestoreServiceFactory::GetForProfile(browser()->profile())-> |
| 144 HandleStartup(true); | 144 HandleStartup(true); |
| 145 | 145 |
| 146 access_ok_listener.WaitUntilSatisfied(); | 146 access_ok_listener.WaitUntilSatisfied(); |
| 147 } | 147 } |
| 148 | 148 |
| 149 } // namespace apps | 149 } // namespace apps |
| OLD | NEW |