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..c1e50e75e1920d0f25dd0c5e9a6669484751d046 |
--- /dev/null |
+++ b/LayoutTests/webaudio/resources/compatibility.js |
@@ -0,0 +1,8 @@ |
+// 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; |
+} |
abarth-chromium
2014/03/24 21:24:44
Can we console.log inside this if statement? That
Raymond Toy
2014/03/25 02:42:49
Ah, good point. I will do that before committing t
Raymond Toy
2014/03/25 16:27:43
Done.
|