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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/audiocontext-leak.html

Issue 2283053002: Fix BaseAudioContext::hasPendingActivity() to make it GCed correctly (Closed)
Patch Set: Created 4 years, 3 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title></title>
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 <script src="resources/audio-testing.js"></script>
8 </head>
9 <body>
10 <script>
11 var audioContextObservation;
12
13 var audit = Audit.createTaskRunner();
14
15
16 // Create an instance of AudioContext without JS reference, and observe
17 // if it goes away after the forcible GC.
18 audit.defineTask('observe-leak', function (taskDone) {
19
20 // This layout test requires internal helpers from run-webkit-tests.
21 Should('window.internals', window.internals).exist();
22 Should('window.GCController', window.GCController).exist();
23
24 audioContextObservation = internals.observeGC(new AudioContext());
25 GCController.collectAll();
26
27 Should('audioContextObservation.wasCollected',
28 audioContextObservation.wasCollected).beEqualTo(true);
29
30 taskDone();
31 });
32
33
34 audit.runTasks();
35 </script>
36 </body>
37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698