OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 | 4 |
5 function MockEventSource() { | 5 function MockEventSource() { |
6 this.listeners_ = []; | 6 this.listeners_ = []; |
7 } | 7 } |
8 | 8 |
9 /** | 9 /** |
10 * Add a listener. | 10 * Add a listener. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 FS_TYPE: window.TEMPORARY, | 61 FS_TYPE: window.TEMPORARY, |
62 | 62 |
63 /** | 63 /** |
64 * Return a normal HTML5 filesystem api, rather than the real local | 64 * Return a normal HTML5 filesystem api, rather than the real local |
65 * filesystem. | 65 * filesystem. |
66 * | 66 * |
67 * If the test harness is on file: schema you must start chrome with | 67 * If the test harness is on file: schema you must start chrome with |
68 * --allow-file-access-from-files in order for this to work. | 68 * --allow-file-access-from-files in order for this to work. |
69 */ | 69 */ |
70 requestLocalFileSystem: function(callback) { | 70 requestLocalFileSystem: function(callback) { |
71 window.webkitRequestFileSystem(this.FS_TYPE, | 71 window.webkitRequestFileSystem(chrome.fileBrowserPrivate.FS_TYPE, |
72 16 * 1024 * 1024, callback, util.ferr('Error requesting filesystem')); | 72 16 * 1024 * 1024, callback, util.ferr('Error requesting filesystem')); |
73 }, | 73 }, |
74 | 74 |
75 /** | 75 /** |
76 * View multiple files. | 76 * View multiple files. |
77 */ | 77 */ |
78 viewFiles: function(urls, actionId, callback) { | 78 viewFiles: function(urls, actionId, callback) { |
79 var success = true; | 79 var success = true; |
80 for (var i = 0; i != urls.length; i++) { | 80 for (var i = 0; i != urls.length; i++) { |
81 var url = urls[i]; | 81 var url = urls[i]; |
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
874 playAudio: function(urls, position) { | 874 playAudio: function(urls, position) { |
875 this.audioPlaylist_ = { items: urls, position: position }; | 875 this.audioPlaylist_ = { items: urls, position: position }; |
876 this.onPlaylistChanged.notify(); | 876 this.onPlaylistChanged.notify(); |
877 }, | 877 }, |
878 | 878 |
879 playVideo: function(url) { | 879 playVideo: function(url) { |
880 this.videoUrl_ = url; | 880 this.videoUrl_ = url; |
881 this.onVideoLaunched.notify(); | 881 this.onVideoLaunched.notify(); |
882 } | 882 } |
883 }; | 883 }; |
OLD | NEW |