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

Side by Side Diff: chrome/test/data/extensions/api_test/filebrowser_component/write.js

Issue 9395077: [filebrowser] Introduce View action for supported file types (e.g. pdf). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | Annotate | Revision Log
OLDNEW
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 readFile(entry, successCallback, errorCallback) { 5 function readFile(entry, successCallback, errorCallback) {
6 var reader = new FileReader(); 6 var reader = new FileReader();
7 reader.onloadend = function(e) { 7 reader.onloadend = function(e) {
8 successCallback(reader.result); 8 successCallback(reader.result);
9 }; 9 };
10 reader.onerror = function(e) { 10 reader.onerror = function(e) {
(...skipping 23 matching lines...) Expand all
34 error = {message: 'File content not as expected. ' + 34 error = {message: 'File content not as expected. ' +
35 'Expected: "' + expectedText + '", ' + 35 'Expected: "' + expectedText + '", ' +
36 'Read: ' + text + '".'}; 36 'Read: ' + text + '".'};
37 } 37 }
38 callback(error); 38 callback(error);
39 }, 39 },
40 callback); 40 callback);
41 }; 41 };
42 42
43 chrome.test.runTests([function tab() { 43 chrome.test.runTests([function tab() {
44 var expectedTasks = {'TextAction': ['filesystem:*.txt'], 44 var expectedTasks = {'AbcAction': ['filesystem:*.abc'],
45 'BaseAction': ['filesystem:*', 'filesystem:*.*']}; 45 'BaseAction': ['filesystem:*', 'filesystem:*.*']};
46 var expectations = new TestExpectations(expectedTasks, verifyFileContent); 46 var expectations = new TestExpectations(expectedTasks, verifyFileContent);
47 47
48 var testRunner = new TestRunner(expectations); 48 var testRunner = new TestRunner(expectations);
49 testRunner.runTest(); 49 testRunner.runTest();
50 }]); 50 }]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698