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

Side by Side Diff: chrome/test/data/file_manager/unit_tests/device_handler_unittest.js

Issue 612303005: Files.app: Remove navigationVolumeMap from the background page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/test/data/file_manager/unit_tests/mocks/mock_volume_manager.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 * Test target. 7 * Test target.
8 * @type {DeviceHandler} 8 * @type {DeviceHandler}
9 */ 9 */
10 var handler; 10 var handler;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 create: function(id, params, callback) { 59 create: function(id, params, callback) {
60 this.items[id] = params; 60 this.items[id] = params;
61 callback(); 61 callback();
62 }, 62 },
63 clear: function(id, callback) { delete this.items[id]; callback(); }, 63 clear: function(id, callback) { delete this.items[id]; callback(); },
64 items: {}, 64 items: {},
65 onButtonClicked: { 65 onButtonClicked: {
66 addListener: function(listener) { 66 addListener: function(listener) {
67 this.dispatch = listener; 67 this.dispatch = listener;
68 } 68 }
69 },
70 getAll: function(callback) {
71 callback([]);
69 } 72 }
70 }, 73 },
71 runtime: { 74 runtime: {
72 getURL: function(path) { return path; }, 75 getURL: function(path) { return path; },
73 onStartup: { 76 onStartup: {
74 addListener: function() {} 77 addListener: function() {}
75 } 78 }
76 } 79 }
77 }; 80 };
78 81
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 function testDeviceHardUnplugged() { 416 function testDeviceHardUnplugged() {
414 chrome.fileManagerPrivate.onDeviceChanged.dispatch({ 417 chrome.fileManagerPrivate.onDeviceChanged.dispatch({
415 type: 'hard_unplugged', 418 type: 'hard_unplugged',
416 devicePath: '/device/path' 419 devicePath: '/device/path'
417 }); 420 });
418 assertEquals(1, Object.keys(chrome.notifications.items).length); 421 assertEquals(1, Object.keys(chrome.notifications.items).length);
419 assertEquals('DEVICE_HARD_UNPLUGGED_MESSAGE', 422 assertEquals('DEVICE_HARD_UNPLUGGED_MESSAGE',
420 chrome.notifications.items[ 423 chrome.notifications.items[
421 'hardUnplugged:/device/path'].message); 424 'hardUnplugged:/device/path'].message);
422 } 425 }
OLDNEW
« no previous file with comments | « no previous file | chrome/test/data/file_manager/unit_tests/mocks/mock_volume_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698