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

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: Created 4 years, 9 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..98ea10ef6091b378ddc47bb35f4cdd4edeffd25e 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);
+ }
hongchan 2016/04/18 17:51:21 Can we use single quotes for the string objects? T
Raymond Toy 2016/04/18 18:31:11 Done.
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