OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 'use strict'; | 4 'use strict'; |
5 | 5 |
6 /** | 6 /** |
7 * Mock of chrome.runtime. | 7 * Mock of chrome.runtime. |
8 * @type {Object} | 8 * @type {Object} |
9 * @const | 9 * @const |
10 */ | 10 */ |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 assertEquals('BEGIN', firstEvent.reason); | 230 assertEquals('BEGIN', firstEvent.reason); |
231 assertEquals(1, firstEvent.status.numRemainingItems); | 231 assertEquals(1, firstEvent.status.numRemainingItems); |
232 assertEquals(0, firstEvent.status.processedBytes); | 232 assertEquals(0, firstEvent.status.processedBytes); |
233 assertEquals(1, firstEvent.status.totalBytes); | 233 assertEquals(1, firstEvent.status.totalBytes); |
234 | 234 |
235 var lastEvent = events[events.length - 1]; | 235 var lastEvent = events[events.length - 1]; |
236 assertEquals('SUCCESS', lastEvent.reason); | 236 assertEquals('SUCCESS', lastEvent.reason); |
237 assertEquals(0, lastEvent.status.numRemainingItems); | 237 assertEquals(0, lastEvent.status.numRemainingItems); |
238 assertEquals(10, lastEvent.status.processedBytes); | 238 assertEquals(10, lastEvent.status.processedBytes); |
239 assertEquals(10, lastEvent.status.totalBytes); | 239 assertEquals(10, lastEvent.status.totalBytes); |
240 | |
241 assertTrue(events.some(function(event) { | |
242 return event.type === 'entry-changed' && | |
243 event.entry === targetEntry; | |
244 })); | |
245 }), callback); | 240 }), callback); |
246 | 241 |
247 fileOperationManager.paste(sourceEntries, targetEntry, false); | 242 fileOperationManager.paste(sourceEntries, targetEntry, false); |
248 } | 243 } |
OLD | NEW |