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

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

Powered by Google App Engine
This is Rietveld 408576698