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

Unified Diff: chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js

Issue 2939273002: DO NOT SUBMIT: what chrome/browser/resources/ could eventually look like with clang-format (Closed)
Patch Set: Created 3 years, 6 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/browser/resources/chromeos/chromevox/testing/assert_additions.js
diff --git a/chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js b/chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js
index 6838dfa38a064308f1a7b4300139bef000acbac7..9e7a59784cf8938f3fc1e3d87e42849a5a05e3a6 100644
--- a/chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js
+++ b/chrome/browser/resources/chromeos/chromevox/testing/assert_additions.js
@@ -19,8 +19,9 @@ function assertUndefined(a) {
*/
function assertNotNullNorUndefined(obj, opt_message) {
if (obj === undefined || obj === null) {
- throw new Error('Can\'t be null or undefined: ' + (opt_message || '') +
- '\n' + 'Actual: ' + obj);
+ throw new Error(
+ 'Can\'t be null or undefined: ' + (opt_message || '') + '\n' +
+ 'Actual: ' + obj);
}
}
@@ -36,8 +37,8 @@ function assertException(msg, fn, error) {
fn();
} catch (e) {
if (error && e.name != error) {
- throw new Error('Expected to throw ' + error + ' but threw ' + e.name +
- ' - ' + msg);
+ throw new Error(
+ 'Expected to throw ' + error + ' but threw ' + e.name + ' - ' + msg);
}
return;
}
@@ -61,8 +62,9 @@ function assertEqualStringArrays(array1, array2) {
}
}
if (!same) {
- throw new Error('Expected ' + JSON.stringify(array1) +
- ', got ' + JSON.stringify(array2));
+ throw new Error(
+ 'Expected ' + JSON.stringify(array1) + ', got ' +
+ JSON.stringify(array2));
}
}
@@ -74,8 +76,9 @@ function assertEqualStringArrays(array1, array2) {
*/
function assertEqualsJSON(expected, actual, opt_message) {
if (JSON.stringify(actual) !== JSON.stringify(expected)) {
- throw new Error((opt_message ? opt_message + '\n' : '') +
- 'Expected ' + JSON.stringify(expected) + '\n' +
+ throw new Error(
+ (opt_message ? opt_message + '\n' : '') + 'Expected ' +
+ JSON.stringify(expected) + '\n' +
'Got ' + JSON.stringify(actual));
}
}

Powered by Google App Engine
This is Rietveld 408576698