Cleanup several idlharness tests

Change-Id: I388e2a9605096886291fafdae428b78bfe21dea9
Reviewed-on: https://chromium-review.googlesource.com/992880
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Joshua Bell <jsbell@chromium.org>
Commit-Queue: Luke Bj <lukebjerring@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551840}
diff --git a/content-security-policy/securitypolicyviolation/idl.html b/content-security-policy/securitypolicyviolation/idl.html
index 2853b86..1849abc 100644
--- a/content-security-policy/securitypolicyviolation/idl.html
+++ b/content-security-policy/securitypolicyviolation/idl.html
@@ -40,9 +40,9 @@
 </script>
 <script>
   promise_test(async function() {
-    let dom = await fetch('/interfaces/dom.idl').then(r => r.text());
+    const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
 
-    var idl_array = new IdlArray();
+    const idl_array = new IdlArray();
     idl_array.add_untested_idls(document.querySelector('#untested').textContent);
     idl_array.add_untested_idls(dom, { only: ['Event', 'EventInit'] });
     idl_array.add_idls(document.querySelector('#tested').textContent);
diff --git a/css/cssom-view/interfaces.html b/css/cssom-view/interfaces.html
index 308c1b4..366d275 100644
--- a/css/cssom-view/interfaces.html
+++ b/css/cssom-view/interfaces.html
@@ -22,7 +22,13 @@
   var idlArray = new IdlArray();
   var svg = "interface SVGElement : Element {};";
   idlArray.add_untested_idls(html + dom + svg + cssom + geometry);
-  idlArray.add_untested_idls(uievents, { only: ['UIEvent', 'UIEventInit', 'MouseEvent', 'MouseEventInit', 'EventModifierInit'] });
+  idlArray.add_untested_idls(uievents, { only: [
+    'UIEvent',
+    'UIEventInit',
+    'MouseEvent',
+    'MouseEventInit',
+    'EventModifierInit']
+  });
   idlArray.add_idls(cssom_view);
 
   idlArray.add_objects({
diff --git a/css/cssom/interfaces.html b/css/cssom/interfaces.html
index b92da9f..08d04c07 100644
--- a/css/cssom/interfaces.html
+++ b/css/cssom/interfaces.html
@@ -39,7 +39,13 @@
   var idlArray = new IdlArray();
   var svg = "interface SVGElement : Element {};";
   idlArray.add_untested_idls(html + dom + svg);
-  idlArray.add_untested_idls(uievents, { only: ['UIEvent', 'UIEventInit', 'MouseEvent', 'MouseEventInit', 'EventModifierInit']});
+  idlArray.add_untested_idls(uievents, { only: [
+    'UIEvent',
+    'UIEventInit',
+    'MouseEvent',
+    'MouseEventInit',
+    'EventModifierInit'
+  ]});
   idlArray.add_idls(cssom);
 
   idlArray.add_objects({
diff --git a/pointerevents/extension/idlharness.html b/pointerevents/extension/idlharness.html
index 7da7fed..e2835f8 100644
--- a/pointerevents/extension/idlharness.html
+++ b/pointerevents/extension/idlharness.html
@@ -52,10 +52,15 @@
   const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
   const uievents = await fetch('/interfaces/uievents.idl').then(r => r.text());
 
-  var idl_array = new IdlArray();
+  const idl_array = new IdlArray();
   idl_array.add_untested_idls(dom, { only: ['EventInit'] });
-  idl_array.add_untested_idls(uievents, { only: ['UIEventInit', 'MouseEventInit', 'EventModifierInit'] });
-  idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
+  idl_array.add_untested_idls(uievents, { only: [
+    'UIEventInit',
+    'MouseEventInit',
+    'EventModifierInit']
+  });
+  idl_array.add_untested_idls(
+      document.getElementById("untested_idl").textContent);
   idl_array.add_idls(document.getElementById("idl").textContent);
   idl_array.test();
 }, 'pointerevents extension interfaces');
diff --git a/pointerevents/idlharness.html b/pointerevents/idlharness.html
index bdc7ad7..6afcb21 100644
--- a/pointerevents/idlharness.html
+++ b/pointerevents/idlharness.html
@@ -95,10 +95,15 @@
     const dom = await fetch('/interfaces/dom.idl').then(r => r.text());
     const uievents = await fetch('/interfaces/uievents.idl').then(r => r.text());
 
-    var idl_array = new IdlArray();
+    const idl_array = new IdlArray();
     idl_array.add_untested_idls(dom, { only: ['EventInit'] });
-    idl_array.add_untested_idls(uievents, { only: ['UIEventInit', 'MouseEventInit', 'EventModifierInit'] });
-    idl_array.add_untested_idls(document.getElementById("untested_idl").textContent);
+    idl_array.add_untested_idls(uievents, { only: [
+      'UIEventInit',
+      'MouseEventInit',
+      'EventModifierInit']
+    });
+    idl_array.add_untested_idls(
+        document.getElementById("untested_idl").textContent);
     idl_array.add_idls(document.getElementById("idl").textContent);
 
     // Note that I don't bother including Document here because there are still
diff --git a/webaudio/the-audio-api/the-delaynode-interface/idl-test.html b/webaudio/the-audio-api/the-delaynode-interface/idl-test.html
deleted file mode 100644
index eb42a4a..0000000
--- a/webaudio/the-audio-api/the-delaynode-interface/idl-test.html
+++ /dev/null
@@ -1,159 +0,0 @@
-<!DOCTYPE html>
-<html class="a">
-<head>
-<title>DelayNode IDL Test</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/idlharness.js"></script>
-<script src="/resources/WebIDLParser.js"></script>
-<script src="/webaudio/js/helpers.js"></script>
-<style type="text/css">
-    #event-target-idl,
-    #base-audio-context-idl,
-    #audio-node-idl,
-    #audio-param-idl
-    { visibility:hidden; height: 0px;}
-  </style>
-</head>
-<body class="a">
-
-   <pre id="event-target-idl">interface EventTarget {
-  void addEventListener(DOMString type, EventListener? callback, optional boolean capture = false);
-  void removeEventListener(DOMString type, EventListener? callback, optional boolean capture = false);
-  boolean dispatchEvent(Event event);
-};
-
-/*
-callback interface EventListener {
-  void handleEvent(Event event);
-};
-*/
-// Callback interfaces are not supported yet, but that's ok
-interface EventListener {};
-</pre>
-
-   <pre id="base-audio-context-idl">callback DecodeErrorCallback = void (DOMException error);
-
-callback DecodeSuccessCallback = void (AudioBuffer decodedData);
-
-interface BaseAudioContext : EventTarget {
-    readonly        attribute AudioDestinationNode destination;
-    readonly        attribute float                sampleRate;
-    readonly        attribute double               currentTime;
-    readonly        attribute AudioListener        listener;
-    readonly        attribute AudioContextState    state;
-    readonly        attribute double               baseLatency;
-    Promise<void>          resume ();
-                    attribute EventHandler         onstatechange;
-    AudioBuffer            createBuffer (unsigned long numberOfChannels, unsigned long length, float sampleRate);
-    Promise<AudioBuffer>   decodeAudioData (ArrayBuffer audioData, optional DecodeSuccessCallback successCallback, optional DecodeErrorCallback errorCallback);
-    AudioBufferSourceNode  createBufferSource ();
-    ConstantSourceNode     createConstantSource ();
-    ScriptProcessorNode    createScriptProcessor (optional unsigned long bufferSize = 0
-              , optional unsigned long numberOfInputChannels = 2
-              , optional unsigned long numberOfOutputChannels = 2
-              );
-    AnalyserNode           createAnalyser ();
-    GainNode               createGain ();
-    DelayNode              createDelay (optional double maxDelayTime);
-    BiquadFilterNode       createBiquadFilter ();
-    IIRFilterNode          createIIRFilter (sequence<double> feedforward, sequence<double> feedback);
-    WaveShaperNode         createWaveShaper ();
-    PannerNode             createPanner ();
-    StereoPannerNode       createStereoPanner ();
-    ConvolverNode          createConvolver ();
-    ChannelSplitterNode    createChannelSplitter (optional unsigned long numberOfOutputs = 6
-              );
-    ChannelMergerNode      createChannelMerger (optional unsigned long numberOfInputs = 6
-              );
-    DynamicsCompressorNode createDynamicsCompressor ();
-    OscillatorNode         createOscillator ();
-    PeriodicWave           createPeriodicWave (Float32Array real, Float32Array imag, optional PeriodicWaveConstraints constraints);
-};</pre>
-
-   <pre id="audio-node-idl">enum ChannelCountMode {
-    "max",
-    "clamped-max",
-    "explicit"
-};
-
-enum ChannelInterpretation {
-    "speakers",
-    "discrete"
-};
-
-interface AudioNode : EventTarget {
-
-    void connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
-    void connect(AudioParam destination, optional unsigned long output = 0);
-    void disconnect(optional unsigned long output = 0);
-
-    readonly attribute BaseAudioContext context;
-    readonly attribute unsigned long numberOfInputs;
-    readonly attribute unsigned long numberOfOutputs;
-
-    // Channel up-mixing and down-mixing rules for all inputs.
-    attribute unsigned long channelCount;
-    attribute ChannelCountMode channelCountMode;
-    attribute ChannelInterpretation channelInterpretation;
-
-};</pre>
-
-   <pre id="audio-param-idl">interface AudioParam {
-
-                    attribute float value;
-    readonly        attribute float defaultValue;
-    readonly        attribute float minValue;
-    readonly        attribute float maxValue;
-
-    // Parameter automation.
-    void setValueAtTime(float value, double startTime);
-    void linearRampToValueAtTime(float value, double endTime);
-    void exponentialRampToValueAtTime(float value, double endTime);
-
-    // Exponentially approach the target value with a rate having the given time constant.
-    void setTargetAtTime(float target, double startTime, double timeConstant);
-
-    // Sets an array of arbitrary parameter values starting at time for the given duration.
-    // The number of values will be scaled to fit into the desired duration.
-    void setValueCurveAtTime(Float32Array values, double startTime, double duration);
-
-    // Cancels all scheduled parameter changes with times greater than or equal to startTime.
-    void cancelScheduledValues(double startTime);
-
-};</pre>
-
-<pre id="delay-node-idl">dictionary DelayOptions : AudioNodeOptions {
-             double maxDelayTime = 1;
-             double delayTime = 0;
-};
-
-[Constructor(BaseAudioContext context, optional DelayOptions options)]
-interface DelayNode : AudioNode {
-
-    readonly attribute AudioParam delayTime;
-
-};</pre>
-
-  <div id="log"></div>
-
-  <script>
-promise_test(async function() {
-  const webAudioApi = await fetch('/interfaces/web-audio-api.idl').then(r => r.text());
-
-  var idl_array = new IdlArray();
-  idl_array.add_untested_idls(webAudioApi, { only: ['AudioNodeOptions']});
-  idl_array.add_untested_idls(document.getElementById("event-target-idl").textContent);
-  idl_array.add_untested_idls(document.getElementById("base-audio-context-idl").textContent);
-  idl_array.add_untested_idls(document.getElementById("audio-node-idl").textContent);
-  idl_array.add_untested_idls(document.getElementById("audio-param-idl").textContent);
-  idl_array.add_idls(document.getElementById("delay-node-idl").textContent);
-
-  delay_node = (new AudioContext).createDelay();
-
-  idl_array.add_objects({DelayNode: ["delay_node"]});
-  idl_array.test();
-}, 'webaudio Delay interfaces');
-  </script>
-</body>
-</html>
diff --git a/webaudio/the-audio-api/the-gainnode-interface/idl-test.html b/webaudio/the-audio-api/the-gainnode-interface/idl-test.html
deleted file mode 100644
index 69606c9..0000000
--- a/webaudio/the-audio-api/the-gainnode-interface/idl-test.html
+++ /dev/null
@@ -1,157 +0,0 @@
-<!DOCTYPE html>
-<html class="a">
-<head>
-<title>GainNode IDL Test</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/idlharness.js"></script>
-<script src="/resources/WebIDLParser.js"></script>
-<script src="/webaudio/js/helpers.js"></script>
-<style type="text/css">
-    #event-target-idl,
-    #base-audio-context-idl,
-    #audio-node-idl,
-    #audio-param-idl
-    { visibility:hidden; height: 0px;}
-  </style>
-</head>
-<body class="a">
-
-   <pre id="event-target-idl">interface EventTarget {
-  void addEventListener(DOMString type, EventListener? callback, optional boolean capture = false);
-  void removeEventListener(DOMString type, EventListener? callback, optional boolean capture = false);
-  boolean dispatchEvent(Event event);
-};
-
-/*
-callback interface EventListener {
-  void handleEvent(Event event);
-};
-*/
-// Callback interfaces are not supported yet, but that's ok
-interface EventListener {};
-</pre>
-
-   <pre id="base-audio-context-idl">callback DecodeErrorCallback = void (DOMException error);
-callback DecodeSuccessCallback = void (AudioBuffer decodedData);
-
-interface BaseAudioContext : EventTarget {
-    readonly        attribute AudioDestinationNode destination;
-    readonly        attribute float                sampleRate;
-    readonly        attribute double               currentTime;
-    readonly        attribute AudioListener        listener;
-    readonly        attribute AudioContextState    state;
-    readonly        attribute double               baseLatency;
-    Promise<void>          resume ();
-                    attribute EventHandler         onstatechange;
-    AudioBuffer            createBuffer (unsigned long numberOfChannels, unsigned long length, float sampleRate);
-    Promise<AudioBuffer>   decodeAudioData (ArrayBuffer audioData, optional DecodeSuccessCallback successCallback, optional DecodeErrorCallback errorCallback);
-    AudioBufferSourceNode  createBufferSource ();
-    ConstantSourceNode     createConstantSource ();
-    ScriptProcessorNode    createScriptProcessor (optional unsigned long bufferSize = 0
-              , optional unsigned long numberOfInputChannels = 2
-              , optional unsigned long numberOfOutputChannels = 2
-              );
-    AnalyserNode           createAnalyser ();
-    GainNode               createGain ();
-    DelayNode              createDelay (optional double maxDelayTime);
-    BiquadFilterNode       createBiquadFilter ();
-    IIRFilterNode          createIIRFilter (sequence<double> feedforward, sequence<double> feedback);
-    WaveShaperNode         createWaveShaper ();
-    PannerNode             createPanner ();
-    StereoPannerNode       createStereoPanner ();
-    ConvolverNode          createConvolver ();
-    ChannelSplitterNode    createChannelSplitter (optional unsigned long numberOfOutputs = 6
-              );
-    ChannelMergerNode      createChannelMerger (optional unsigned long numberOfInputs = 6
-              );
-    DynamicsCompressorNode createDynamicsCompressor ();
-    OscillatorNode         createOscillator ();
-    PeriodicWave           createPeriodicWave (Float32Array real, Float32Array imag, optional PeriodicWaveConstraints constraints);
-};</pre>
-
-   <pre id="audio-node-idl">enum ChannelCountMode {
-    "max",
-    "clamped-max",
-    "explicit"
-};
-
-enum ChannelInterpretation {
-    "speakers",
-    "discrete"
-};
-
-interface AudioNode : EventTarget {
-
-    void connect(AudioNode destination, optional unsigned long output = 0, optional unsigned long input = 0);
-    void connect(AudioParam destination, optional unsigned long output = 0);
-    void disconnect(optional unsigned long output = 0);
-
-    readonly attribute BaseAudioContext context;
-    readonly attribute unsigned long numberOfInputs;
-    readonly attribute unsigned long numberOfOutputs;
-
-    // Channel up-mixing and down-mixing rules for all inputs.
-    attribute unsigned long channelCount;
-    attribute ChannelCountMode channelCountMode;
-    attribute ChannelInterpretation channelInterpretation;
-
-};</pre>
-
-   <pre id="audio-param-idl">interface AudioParam {
-
-                    attribute float value;
-    readonly        attribute float defaultValue;
-    readonly        attribute float minValue;
-    readonly        attribute float maxValue;
-
-    // Parameter automation.
-    void setValueAtTime(float value, double startTime);
-    void linearRampToValueAtTime(float value, double endTime);
-    void exponentialRampToValueAtTime(float value, double endTime);
-
-    // Exponentially approach the target value with a rate having the given time constant.
-    void setTargetAtTime(float target, double startTime, double timeConstant);
-
-    // Sets an array of arbitrary parameter values starting at time for the given duration.
-    // The number of values will be scaled to fit into the desired duration.
-    void setValueCurveAtTime(Float32Array values, double startTime, double duration);
-
-    // Cancels all scheduled parameter changes with times greater than or equal to startTime.
-    void cancelScheduledValues(double startTime);
-
-};</pre>
-
-<pre id="gain-node-idl">dictionary GainOptions : AudioNodeOptions {
-             float gain = 1.0;
-};
-
-[Constructor(BaseAudioContext context, optional GainOptions options)]
-interface GainNode : AudioNode {
-
-    readonly attribute AudioParam gain;
-
-};</pre>
-
-  <div id="log"></div>
-
-  <script>
-promise_test(async function () {
-  const webAudioApi = await fetch('/interfaces/web-audio-api.idl').then(r => r.text());
-
-  var idl_array = new IdlArray();
-  idl_array.add_untested_idls(webAudioApi, { only: ['AudioNodeOptions'] });
-  idl_array.add_untested_idls(document.getElementById("event-target-idl").textContent);
-  idl_array.add_untested_idls(document.getElementById("base-audio-context-idl").textContent);
-  idl_array.add_untested_idls(document.getElementById("audio-node-idl").textContent);
-  idl_array.add_untested_idls(document.getElementById("audio-param-idl").textContent);
-  idl_array.add_idls(document.getElementById("gain-node-idl").textContent);
-
-  gain_node = (new AudioContext).createGain();
-
-  idl_array.add_objects({GainNode: ["gain_node"]});
-  idl_array.test();
-}, 'webaudio Gain interfaces');
-  </script>
-</body>
-</html>