| Index: third_party/WebKit/LayoutTests/webaudio/audiocontext-leak.html
|
| diff --git a/third_party/WebKit/LayoutTests/webaudio/audiocontext-leak.html b/third_party/WebKit/LayoutTests/webaudio/audiocontext-leak.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..4d76874a75b240ff97b0bb1281e5f9fafb2c650c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/webaudio/audiocontext-leak.html
|
| @@ -0,0 +1,37 @@
|
| +<!DOCTYPE html>
|
| +<html>
|
| +<head>
|
| + <title></title>
|
| + <script src="../resources/testharness.js"></script>
|
| + <script src="../resources/testharnessreport.js"></script>
|
| + <script src="resources/audio-testing.js"></script>
|
| +</head>
|
| +<body>
|
| + <script>
|
| + var audioContextObservation;
|
| +
|
| + var audit = Audit.createTaskRunner();
|
| +
|
| +
|
| + // Create an instance of AudioContext without JS reference, and observe
|
| + // if it goes away after the forcible GC.
|
| + audit.defineTask('observe-leak', function (taskDone) {
|
| +
|
| + // This layout test requires internal helpers from run-webkit-tests.
|
| + Should('window.internals', window.internals).exist();
|
| + Should('window.GCController', window.GCController).exist();
|
| +
|
| + audioContextObservation = internals.observeGC(new AudioContext());
|
| + GCController.collectAll();
|
| +
|
| + Should('audioContextObservation.wasCollected',
|
| + audioContextObservation.wasCollected).beEqualTo(true);
|
| +
|
| + taskDone();
|
| + });
|
| +
|
| +
|
| + audit.runTasks();
|
| + </script>
|
| +</body>
|
| +</html>
|
|
|