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

Side by Side Diff: chrome/test/data/extensions/api_test/filebrowser_component/read.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 // Verifies that the filesystem_handler extension returned the content of the 5 // Verifies that the filesystem_handler extension returned the content of the
6 // file. 6 // file.
7 function verifyFileContent(file, originalText, receivedText, callback) { 7 function verifyFileContent(file, originalText, receivedText, callback) {
8 var error = undefined; 8 var error = undefined;
9 if (receivedText != originalText) 9 if (receivedText != originalText)
10 error = {message: 'Received content does not match. ' + 10 error = {message: 'Received content does not match. ' +
11 'Expected "' + originalText + '", ' + 11 'Expected "' + originalText + '", ' +
12 'Got "' + receivedText + '".'}; 12 'Got "' + receivedText + '".'};
13 callback(error); 13 callback(error);
14 }; 14 };
15 15
16 chrome.test.runTests([function tab() { 16 chrome.test.runTests([function tab() {
17 var expectedTasks = {'TextAction': ['filesystem:*.txt'], 17 var expectedTasks = {'AbcAction': ['filesystem:*.abc'],
18 'BaseAction': ['filesystem:*', 'filesystem:*.*']}; 18 'BaseAction': ['filesystem:*', 'filesystem:*.*']};
19 var expectations = new TestExpectations(expectedTasks, verifyFileContent); 19 var expectations = new TestExpectations(expectedTasks, verifyFileContent);
20 20
21 var testRunner = new TestRunner(expectations); 21 var testRunner = new TestRunner(expectations);
22 testRunner.runTest(); 22 testRunner.runTest();
23 }]); 23 }]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698