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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/OfflineAudioContext/offlineaudiocontext-thread-creation.html

Issue 2889393003: Lazy initialization of the rendering thread in OfflineAudioContext (Closed)
Patch Set: Address feedback Created 3 years, 6 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>
5 OfflineAudioContext - Thread Creation
6 </title>
7 <script src="../../resources/testharness.js"></script>
8 <script src="../../resources/testharnessreport.js"></script>
9 <script src="../resources/audit.js"></script>
10 </head>
11 <body>
12 <script id="layout-test-code">
13 const audit = Audit.createTaskRunner();
14
15 // The common sample rate.
16 const sampleRate = 48000;
17
18 // To make channel count and buffer length irrelevant to this test.
19 const numberOfChannels = 1;
20 const renderLength = 1;
21
22 // Create 2500 contexts in total.
23 const maxNumberOfContexts = 5000;
24
25 // Create multiple contexts and drop them rapidly. This should not crash
26 // the browser with out-of-threads error. The test code here is based on
27 // crbug.com/716800.
28 audit.define(
29 {
30 label: 'thread-creation',
31 description:
32 'Creating ' + maxNumberOfContexts + ' contexts without a crash.'
33 },
34 (task, should) => {
35 let i;
36 for (i = 0; i < maxNumberOfContexts; ++i) {
37 let context = new OfflineAudioContext(
38 numberOfChannels, renderLength, sampleRate);
39 delete context;
40 }
41
42 should(i, 'The number of created contexts without a crash')
Raymond Toy 2017/05/23 18:38:27 This is kind of odd because if it crashes, we'll n
hongchan 2017/05/23 20:30:19 Like you pointed out, the out-of-thread immediatel
43 .beEqualTo(maxNumberOfContexts);
44 task.done();
45 });
46
47 audit.run();
48 </script>
49 </body>
50 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/OfflineAudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698