Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-gc.html |
| diff --git a/third_party/WebKit/LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-gc.html b/third_party/WebKit/LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-gc.html |
| index d5da1966ef38ce138ae4dd32c4ca88e8a229eb5a..e1b576961fe21e4a3f66fae6cb8965374b360c88 100644 |
| --- a/third_party/WebKit/LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-gc.html |
| +++ b/third_party/WebKit/LayoutTests/webaudio/MediaElementAudioSource/mediaelementaudiosourcenode-gc.html |
| @@ -2,38 +2,40 @@ |
| <html> |
| <head> |
| -<script src="../../resources/js-test.js"></script> |
| +<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> |
| +<script src="../resources/audit.js"></script> |
| </head> |
| <body> |
| -<div id="description"></div> |
| -<div id="console"></div> |
| - |
| <script> |
| -description("Tests garbage collection of MediaElementAudioSourceNode."); |
| - |
| -function runTest() { |
| - if (window.testRunner) { |
| - testRunner.dumpAsText(); |
| - } |
| - |
| - audioElement = document.createElement("audio"); |
| - context = new OfflineAudioContext(1, 1000, 44100); |
| - source = context.createMediaElementSource(audioElement); |
| - audioElement = null; |
| - context = null; |
| - source = null; |
| - gc(); |
| - |
| - testPassed("MediaElementAudioSourceNode survived garbage collection."); |
| - |
| - finishJSTest(); |
| -} |
| - |
| -runTest(); |
| - |
| +let audit = Audit.createTaskRunner(); |
| + |
| +// See commit f9ee75e05745abb299dd8a336d8aa28afd2f5c26 for an explanation of |
| +// what this is testing. |
| +audit.define( |
| + { |
| + label: 'test', |
| + description: 'Garbage collection of MediaElementAudioSourceNode' |
| + }, |
| + (task, should) => { |
| + |
| + audioElement = document.createElement('audio'); |
| + context = new OfflineAudioContext(1, 1000, 44100); |
| + source = context.createMediaElementSource(audioElement); |
| + audioElement = null; |
| + context = null; |
| + source = null; |
| + gc(); |
|
hongchan
2017/02/24 23:32:26
It will cause 'undefined' if this test runs on the
Raymond Toy
2017/02/24 23:36:58
The original did the same, so I didn't change that
hongchan
2017/02/24 23:45:21
Clarifying somehow the test is not designed for th
|
| + |
| + should(true, 'MediaElementAudioSourceNode garbage collected') |
| + .message('with no ASSERTS', ''); |
| + |
| + task.done(); |
| + }); |
| + |
| +audit.run(); |
| </script> |
| </body> |