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

Unified Diff: ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item_unittest.js

Issue 900173002: Files.app: Do not update cached MetadataCachedItemProperty before it is invalidated. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item_unittest.js
diff --git a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item_unittest.js b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item_unittest.js
index ca30f5f1d24cdace3f9d2bd0c0ff92b99ce30af3..4a5a04acba320d14fa7d9e8c38105291640b3af5 100644
--- a/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item_unittest.js
+++ b/ui/file_manager/file_manager/foreground/js/metadata/metadata_cache_item_unittest.js
@@ -80,3 +80,11 @@ function testMetadataCacheItemHasFreshCache() {
assertFalse(item.hasFreshCache(['propertyA', 'propertyB']));
assertTrue(item.hasFreshCache(['propertyA']));
}
+
+function testMetadataCacheShouldNotUpdateBeforeInvalidation() {
+ var item = new MetadataCacheItem();
+ item.startRequests(1, item.createRequests(['property']));
+ item.storeProperties(1, {property: 'value1'});
+ item.storeProperties(2, {property: 'value2'});
+ assertEquals('value1', item.get(['property']).property);
+}

Powered by Google App Engine
This is Rietveld 408576698