From 9a9f4771de354bb87718743b51aac3eeede46aeb Mon Sep 17 00:00:00 2001
From: Fabrice de Gans-Riberi <fdegans@chromium.org>
Date: Tue, 14 May 2019 17:52:15 +0000
Subject: [PATCH] [fuchsia] Disable
 CacheStorageManagerTest.GetAllOriginsUsageWithOldIndex

The test is still flaky but the extra bot output has allowed to find a
way to reproduce the failure locally.

Bug: 760687
Change-Id: I8ee78da2a174937bd6b668f94efb48a8b87290b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1611205
Commit-Queue: Ben Kelly <wanderview@chromium.org>
Auto-Submit: Fabrice de Gans-Riberi <fdegans@chromium.org>
Reviewed-by: Ben Kelly <wanderview@chromium.org>
Cr-Commit-Position: refs/heads/master@{#659570}
---
 .../cache_storage_manager_unittest.cc          | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/content/browser/cache_storage/cache_storage_manager_unittest.cc b/content/browser/cache_storage/cache_storage_manager_unittest.cc
index 6d5a91bf02d81..1ee61943d62cc 100644
--- a/content/browser/cache_storage/cache_storage_manager_unittest.cc
+++ b/content/browser/cache_storage/cache_storage_manager_unittest.cc
@@ -163,14 +163,8 @@ bool IsIndexFileCurrent(const base::FilePath& cache_dir) {
        file_path = enumerator.Next()) {
     if (!GetFileInfo(file_path, &info))
       return false;
-    if (index_last_modified < info.last_modified) {
-#if defined(OS_FUCHSIA)
-      // TODO(crbug.com/760687): Extra logging for bot debugging.
-      LOG(ERROR) << "index_last_modified: " << index_last_modified
-                 << " info.last_modified: " << info.last_modified;
-#endif  // OS_FUCHSIA
+    if (index_last_modified < info.last_modified)
       return false;
-    }
   }
 
   return true;
@@ -1576,9 +1570,13 @@ TEST_P(CacheStorageManagerTestP, GetAllOriginsUsageDifferentOwners) {
   }
 }
 
-// TODO(crbug.com/760687): Flaky on Fuchsia. Temporarily enabled with extra
-// logging to help debug.
-TEST_F(CacheStorageManagerTest, GetAllOriginsUsageWithOldIndex) {
+// TODO(crbug.com/760687): Flaky on Fuchsia.
+#if defined(OS_FUCHSIA)
+#define MAYBE_GetAllOriginsUsageWithOldIndex DISABLED_GetAllOriginsUsageWithOldIndex
+#else
+#define MAYBE_GetAllOriginsUsageWithOldIndex GetAllOriginsUsageWithOldIndex
+#endif
+TEST_F(CacheStorageManagerTest, MAYBE_GetAllOriginsUsageWithOldIndex) {
   // Write a single value (V1) to the cache.
   const GURL kFooURL = origin1_.GetURL().Resolve("foo");
   const std::string kCacheName = "foo";