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

Unified Diff: chrome/test/data/extensions/api_test/media_galleries/common/common_injected.js

Issue 254943002: Revert of Stop passing chrome.test.fail as ErrorCallback (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/media_galleries/common/common_injected.js
diff --git a/chrome/test/data/extensions/api_test/media_galleries/common/common_injected.js b/chrome/test/data/extensions/api_test/media_galleries/common/common_injected.js
index 17db28187fde40f235016b2d98641463f9978254..8f5de725fa24925215d27e5310c34f4f0774d816 100644
--- a/chrome/test/data/extensions/api_test/media_galleries/common/common_injected.js
+++ b/chrome/test/data/extensions/api_test/media_galleries/common/common_injected.js
@@ -202,7 +202,7 @@
function verifyJPEG(parentDirectoryEntry, filename, expectedFileLength,
doneCallback) {
function verifyFileEntry(fileEntry) {
- fileEntry.file(verifyFile, chrome.test.fail);
+ fileEntry.file(verifyFile, chrome.test.fail)
}
function verifyFile(file) {
@@ -212,11 +212,10 @@
var arraybuffer = e.target.result;
chrome.test.assertEq(expectedFileLength, arraybuffer.byteLength);
doneCallback();
- };
-
- reader.onerror = function(e) {
- chrome.test.fail("Unable to read test image: " + filename);
- };
+ }
+
+ reader.onerror =
+ chrome.test.fail.bind(null, "Unable to read test image: " + filename);
reader.readAsArrayBuffer(file);
}
« no previous file with comments | « chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698