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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js

Issue 1855573002: Include quotes when printing out strings from beEqualTo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use specified quotes Created 4 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 | « third_party/WebKit/LayoutTests/webaudio/oscillator-basic-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
diff --git a/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js b/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
index ba04d973852e7e1c32217e2e87284c789babd454..608d16a19e62260132a05dc4623e0649e968cc59 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
@@ -509,10 +509,18 @@ var Should = (function () {
this._checkNaN(value, 'EXPECTED');
- if (this.target === value)
- this._testPassed('is equal to ' + value);
- else
- this._testFailed('was ' + this.target + ' instead of ' + value);
+ var outputValue = value;
+ if (type === 'string')
+ outputValue = '"' + outputValue + '"';
+ if (this.target === value) {
+ var outputValue = (type === 'string') ? '"' + value + '"' : value;
+ this._testPassed('is equal to ' + outputValue);
+ } else {
+ var targetValue = this.target;
+ if (typeof this.target === 'string')
+ targetValue = '"' + targetValue + '"';
+ this._testFailed('was ' + targetValue + ' instead of ' + outputValue);
+ }
return this._success;
};
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/oscillator-basic-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698