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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/audioworklet/window-audioworklet.html

Issue 2711593004: Convert window-audioworklet.html with new Audit (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/webaudio/audioworklet/window-audioworklet.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/audioworklet/window-audioworklet.html b/third_party/WebKit/LayoutTests/webaudio/audioworklet/window-audioworklet.html
index 9efda23aa5d31d3779fc00f72736845a66293efe..181e6ba571ce934aa2366c9c76ef0f6f2f97b835 100644
--- a/third_party/WebKit/LayoutTests/webaudio/audioworklet/window-audioworklet.html
+++ b/third_party/WebKit/LayoutTests/webaudio/audioworklet/window-audioworklet.html
@@ -4,28 +4,35 @@
<title>Checking window.audioWorklet</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
- <script src="../resources/audit-util.js"></script>
- <script src="../resources/audio-testing.js"></script>
+ <script src="../resources/audit.js"></script>
<script src="audioworklet-testing.js"></script>
</head>
<body>
<script>
- var audit = Audit.createTaskRunner();
+ // This test requires AudioWorklet.
+ let audioWorkletStatus = isAudioWorkletEnabled();
- audit.defineTask('window-audioworklet', function (taskDone) {
+ let audit = Audit.createTaskRunner();
- // TODO: remove this check if AudioWorklet ships to the stable.
- if (!checkInternalsAndAudioWorkletRuntimeFlag(taskDone))
- return;
+ // Test if AudioWorklet exists.
+ audit.define({
+ label: 'window-audioworklet',
+ description: 'Test if AudioWorklet exists.',
+ }, (task, should) => {
+ // TODO(hongchan): remove this assertion when AudioWorklet is shipped.
+ should(audioWorkletStatus.onContentShell ||
+ audioWorkletStatus.onBrowser,
+ 'AudioWorklet is available on ContentShell or Browser')
+ .beTrue();
- Should('window.audioWorklet is an instance of Worklet',
- window.audioWorklet instanceof Worklet).beEqualTo(true);
+ should(window.audioWorklet instanceof Worklet,
+ 'window.audioWorklet is an instance of Worklet')
+ .beTrue();
- taskDone();
+ task.done();
});
-
- audit.runTasks();
+ audit.run();
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698