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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/internals/cycle-connection-gc.html

Issue 2895963003: Apply layout-test-tidy to LayoutTests/webaudio (Closed)
Patch Set: Created 3 years, 7 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script> 2 <html>
3 <script> 3 <head>
4 description('Cycles of AudioNode connections should be collected.'); 4 <title>
5 var context = new OfflineAudioContext(2, 44100, 44100); 5 cycle-connection-gc.html
6 gc(); 6 </title>
7 var initialCount = internals.audioHandlerCount(); 7 <script src="../../resources/js-test.js"></script>
8 createCycle(); 8 </head>
9 debug('A cycle was created:'); 9 <body>
10 shouldBeTrue('internals.audioHandlerCount() > initialCount'); 10 <script id="layout-test-code">
11 gc(); 11 description('Cycles of AudioNode connections should be collected.');
12 debug('GC happened:'); 12 let context = new OfflineAudioContext(2, 44100, 44100);
13 shouldBe('internals.audioHandlerCount()', 'initialCount'); 13 gc();
14 let initialCount = internals.audioHandlerCount();
15 createCycle();
16 debug('A cycle was created:');
17 shouldBeTrue('internals.audioHandlerCount() > initialCount');
18 gc();
19 debug('GC happened:');
20 shouldBe('internals.audioHandlerCount()', 'initialCount');
14 21
15 function createCycle() { 22 function createCycle() {
16 var source = context.createBufferSource(); 23 let source = context.createBufferSource();
17 var delay1 = context.createDelay(); 24 let delay1 = context.createDelay();
18 var delay2 = context.createDelay(); 25 let delay2 = context.createDelay();
19 source.connect(delay1); 26 source.connect(delay1);
20 delay1.connect(delay2); 27 delay1.connect(delay2);
21 delay2.connect(delay1); 28 delay2.connect(delay1);
22 delay1.connect(context.destination); 29 delay1.connect(context.destination);
23 } 30 }
24 </script> 31 </script>
32 </body>
33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698