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

Unified Diff: ui/file_manager/file_manager/background/js/import_history_unittest.js

Issue 2856533003: Add background-wide file metadata cache. (Closed)
Patch Set: Rename global_metadata_cache to metadata_proxy. 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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/file_manager/background/js/import_history_unittest.js
diff --git a/ui/file_manager/file_manager/background/js/import_history_unittest.js b/ui/file_manager/file_manager/background/js/import_history_unittest.js
index 0cde2e479b366cfc8ae059ad45701af69f5db318..8d6fdded82e216304228711b2de4c480cef7a4b9 100644
--- a/ui/file_manager/file_manager/background/js/import_history_unittest.js
+++ b/ui/file_manager/file_manager/background/js/import_history_unittest.js
@@ -321,6 +321,21 @@ function testRecordStorage_SerializingOperations(callback) {
reportPromise(testPromise, callback);
}
+function testCreateMetadataHashcode(callback) {
+ var promise =
+ importer.createMetadataHashcode(testFileEntry).then(function(hashcode) {
+ // Note that the expression matches at least 4 numbers
+ // in the last segment, since we hard code the byte
+ // size in our test file to a four digit size.
+ // In reality it will vary.
+ assertEquals(
+ 0, hashcode.search(/[\-0-9]{9,}_[0-9]{4,}/),
+ 'Hashcode (' + hashcode + ') does not match next pattern.');
+ });
+
+ reportPromise(promise, callback);
+}
+
/**
* Installs stub APIs.
*/

Powered by Google App Engine
This is Rietveld 408576698