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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworklet-testing.js

Issue 2711593004: Convert window-audioworklet.html with new Audit (Closed)
Patch Set: Created 3 years, 9 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/LayoutTests/webaudio/audioworklet/window-audioworklet.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* @global internals, Should */ 1 /**
2 2 * Check if |window.internals| and |window.internals.runtimeFlags.AudioWorklet|
3 // Check if |internals| and its |runtimeFlags.AudioWorklet| are available. 3 * are available.
4 // 4 *
5 // The content_shell driven by run-webkit-tests.py is supposed to enable 5 * The content_shell driven by run-webkit-tests.py is supposed to enable all the
6 // all the experimental web platform features. The flags are exposed via 6 * experimental web platform features. The flags are exposed via
7 // |internals.runtimeFlag|. 7 * |internals.runtimeFlag|.
8 // 8 *
9 // See: https://www.chromium.org/blink/runtime-enabled-features 9 * See: https://www.chromium.org/blink/runtime-enabled-features
10 function checkInternalsAndAudioWorkletRuntimeFlag(taskDone) { 10 *
11 11 * @return {Boolean}
12 var isInternals = Should('window.internals', window.internals).exist(); 12 */
13 13 function isAudioWorkletEnabled() {
14 if (!isInternals) { 14 return {
15 taskDone(); 15 onContentShell: Boolean(window.internals) &&
16 return false; 16 Boolean(window.internals.runtimeFlags.audioWorkletEnabled),
17 } 17 onBrowser: Boolean(window.Worklet) && Boolean(window.audioWorklet)
18 18 };
Raymond Toy 2017/02/22 19:16:22 Do we care if we're running with content shell or
hongchan 2017/02/22 19:23:38 When a test relies on some experimental features,
Raymond Toy 2017/02/22 19:31:29 YAGNI?
19 var isFlag = Should('window.internals.runtimeFlags.audioWorkletEnabled',
20 window.internals.runtimeFlags.audioWorkletEnabled).beEqualTo(true);
21
22 if (!isFlag) {
23 taskDone();
24 }
25
26 return isFlag;
27 } 19 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/audioworklet/window-audioworklet.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698