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

Unified Diff: chrome/test/data/file_manager/unit_tests/file_operation_manager_unittest.js

Issue 463783002: Combine consecutive entry-changed events into one. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Simplify how to make the promises. Created 6 years, 4 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
« no previous file with comments | « no previous file | ui/file_manager/file_manager/background/js/file_operation_manager.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/file_manager/unit_tests/file_operation_manager_unittest.js
diff --git a/chrome/test/data/file_manager/unit_tests/file_operation_manager_unittest.js b/chrome/test/data/file_manager/unit_tests/file_operation_manager_unittest.js
index 23bf5e6658ce033083e42e25e883a6a4961e974f..d447c1b9cdc7a9e4f0ae07c3f74524273b6d1d06 100644
--- a/chrome/test/data/file_manager/unit_tests/file_operation_manager_unittest.js
+++ b/chrome/test/data/file_manager/unit_tests/file_operation_manager_unittest.js
@@ -120,7 +120,7 @@ function waitForEvents(fileOperationManager) {
if (event.reason === 'SUCCESS')
fulfill(events);
});
- fileOperationManager.addEventListener('entry-changed', function(event) {
+ fileOperationManager.addEventListener('entries-changed', function(event) {
events.push(event);
});
fileOperationManager.addEventListener('delete', function(event) {
@@ -277,9 +277,9 @@ function testCopy(callback) {
assertEquals(10, lastEvent.status.totalBytes);
assertTrue(events.some(function(event) {
- return event.type === 'entry-changed' &&
+ return event.type === 'entries-changed' &&
event.kind === util.EntryChangedKind.CREATED &&
- event.entry.fullPath === '/test (1).txt';
+ event.entries[0].fullPath === '/test (1).txt';
}));
assertFalse(events.some(function(event) {
@@ -326,15 +326,15 @@ function testMove(callback) {
assertEquals(1, lastEvent.status.totalBytes);
assertTrue(events.some(function(event) {
- return event.type === 'entry-changed' &&
+ return event.type === 'entries-changed' &&
event.kind === util.EntryChangedKind.DELETED &&
- event.entry.fullPath === '/test.txt';
+ event.entries[0].fullPath === '/test.txt';
}));
assertTrue(events.some(function(event) {
- return event.type === 'entry-changed' &&
+ return event.type === 'entries-changed' &&
event.kind === util.EntryChangedKind.CREATED &&
- event.entry.fullPath === '/directory/test.txt';
+ event.entries[0].fullPath === '/directory/test.txt';
}));
assertFalse(events.some(function(event) {
@@ -422,8 +422,8 @@ function testZip(callback) {
}));
assertTrue(events.some(function(event) {
- return event.type === 'entry-changed' &&
- event.entry.fullPath === '/test.zip';
+ return event.type === 'entries-changed' &&
+ event.entries[0].fullPath === '/test.zip';
}));
}), callback);
« no previous file with comments | « no previous file | ui/file_manager/file_manager/background/js/file_operation_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698