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

Unified Diff: chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/test.js

Issue 258523004: 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
Index: chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/test.js
diff --git a/chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/test.js b/chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/test.js
index 0f1c58ad0a07e93293b0672bfd0ef5ecd6719a62..2c75186481324d3aa1c34d4172a87c3a46bc0981 100644
--- a/chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/test.js
+++ b/chrome/test/data/extensions/api_test/file_browser/filesystem_operations_test/test.js
@@ -103,10 +103,13 @@ function readFileAndExpectContent(
reader.onload = function() {
assertEqAndRunCallback(expectedContent, reader.result, message, callback);
};
- reader.onerror = chrome.test.fail.bind(null, 'Reading file.');
-
+ reader.onerror = function(event) {
+ chrome.test.fail('Failed to read: ' + reader.error.name);
+ };
entry.file(reader.readAsText.bind(reader),
- chrome.test.fail.bind(null, 'Getting file.'));
+ function(error) {
+ chrome.test.fail('Failed to get file: ' + error.name);
+ });
});
}
@@ -149,8 +152,9 @@ function abortWriteFile(volumeId, entry, path, callback) {
}
writer.write(new Blob(['xxxxx'], {'type': 'text/plain'}));
- },
- chrome.test.fail.bind(null, 'Error creating writer.'));
+ }, function(error) {
+ chrome.test.fail('Error creating writer: ' + error.name);
+ });
});
}
@@ -190,8 +194,9 @@ function abortTruncateFile(volumeId, entry, path, callback) {
}
writer.truncate(10);
- },
- chrome.test.fail.bind(null, 'Error creating writer.'));
+ }, function(error) {
+ chrome.test.fail('Error creating writer: ' + error.name);
+ });
});
}

Powered by Google App Engine
This is Rietveld 408576698