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

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

Issue 2283053002: Fix BaseAudioContext::hasPendingActivity() to make it GCed correctly (Closed)
Patch Set: Created 4 years, 4 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: 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 5cbe92c150b07aa9938853951645f4b81ed64729..12479de0a57b597b77159a3e9a64dda3a09b0611 100644
--- a/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
+++ b/third_party/WebKit/LayoutTests/webaudio/resources/audio-testing.js
@@ -597,6 +597,20 @@ var Should = (function () {
throw failureMessage;
};
+ // Check if |target| does exist. (not undefined nor null)
+ //
+ // Example:
+ // Should('null', null).exist();
+ // Result:
+ // "FAIL null does not exist."
+ ShouldModel.prototype.exist = function () {
+ if (this.target !== null && this.target !== undefined) {
+ this._testPassed('exist');
+ } else {
+ this._testFailed('does not exist');
+ }
+ };
+
// Check if |target| is equal to |value|.
//
// Example:

Powered by Google App Engine
This is Rietveld 408576698