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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/constructor/mediastreamaudiodestination.html

Issue 2578243002: Add constructor for MediaStreamAudioDestinationNode (Closed)
Patch Set: Rebase and add Measure Created 4 years 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 | « no previous file | third_party/WebKit/LayoutTests/webaudio/mediastreamaudiodestinationnode.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/constructor/mediastreamaudiodestination.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/constructor/mediastreamaudiodestination.html b/third_party/WebKit/LayoutTests/webaudio/constructor/mediastreamaudiodestination.html
new file mode 100644
index 0000000000000000000000000000000000000000..adec749ab5d0ce1872abdaa43607faafeaf1572e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/webaudio/constructor/mediastreamaudiodestination.html
@@ -0,0 +1,72 @@
+<!doctype html>
+<html>
+ <head>
+ <title>Test Constructor: MediaStreamAudioDestinationNode</title>
+ <script src="../../resources/testharness.js"></script>
+ <script src="../../resources/testharnessreport.js"></script>
+ <script src="../resources/audit-util.js"></script>
+ <script src="../resources/audio-testing.js"></script>
hongchan 2016/12/19 18:29:55 Why do we need this?
Raymond Toy 2016/12/19 18:33:38 You mean instead of audit.js? audionodeoptions.js
hongchan 2016/12/19 23:40:37 Acknowledged.
+ <script src="audionodeoptions.js"></script>
+ </head>
+
+ <body>
+ <script>
+ var context = new AudioContext();
+
+ var audit = Audit.createTaskRunner();
+
+ audit.defineTask("invalid constructor", function (taskDone) {
+ var node;
+ var success = true;
+
+ success = Should("new MediaStreamAudioDestinationNode()",
+ function () {
+ node = new MediaStreamAudioDestinationNode();
+ })
+ .throw("TypeError");
+ success = Should("new MediaStreamAudioDestinationNode(1)",
+ function () {
+ node = new MediaStreamAudioDestinationNode(1)
+ })
+ .throw("TypeError") && success;;
+ success = Should("new MediaStreamAudioDestinationNode(context, 42)",
+ function () {
+ node = new MediaStreamAudioDestinationNode(context, 42)
+ })
+ .throw("TypeError") && success;;
+
+ taskDone();
+ });
+
+ audit.defineTask("default constructor", function (taskDone) {
+ var node;
+ var success;
+
+ success = Should("new MediaStreamAudioDestinationNode(context)",
+ function () {
+ node = new MediaStreamAudioDestinationNode(context);
+ }).notThrow() && success;
+
+ success = Should("node instanceof MediaStreamAudioDestinationNode",
+ node instanceof MediaStreamAudioDestinationNode)
+ .beEqualTo(true) && success;
+ success = Should("node.channelCount", node.channelCount)
+ .beEqualTo(2) && success;
+
+ taskDone();
+ });
+
+ audit.defineTask("test AudioNodeOptions", function (taskDone) {
+ testAudioNodeOptions(context, "MediaStreamAudioDestinationNode", {
+ expectedChannelCount: {
+ // An arbitrary but valid, non-default count for this node.
+ value: 7
+ }
+ });
+ taskDone();
+ });
+
+ audit.runTasks();
+ </script>
+ </body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/mediastreamaudiodestinationnode.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698