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

Unified Diff: LayoutTests/webaudio/resources/compatibility.js

Issue 208943004: Update WebAudio layout tests to use unprefixed AudioContext. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add console.log to compatibility.js Created 6 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
Index: LayoutTests/webaudio/resources/compatibility.js
diff --git a/LayoutTests/webaudio/resources/compatibility.js b/LayoutTests/webaudio/resources/compatibility.js
new file mode 100644
index 0000000000000000000000000000000000000000..7b400a134411326cc4b30040047ae26b778a12a4
--- /dev/null
+++ b/LayoutTests/webaudio/resources/compatibility.js
@@ -0,0 +1,9 @@
+// We want to be able to run these tests with chrome that only supports the prefixed
+// AudioContext. This is useful in case a regression has occurred.
+
+if (window.hasOwnProperty('webkitAudioContext') &&
+ !window.hasOwnProperty('AudioContext')) {
+ window.AudioContext = webkitAudioContext;
+ window.OfflineAudioContext = webkitOfflineAudioContext;
+ console.log("Using deprecated prefixed AudioContext or OfflineAudioContext");
+}
« no previous file with comments | « LayoutTests/webaudio/resources/audioparam-testing.js ('k') | LayoutTests/webaudio/resources/oscillator-testing.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698