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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/Gain/gain-basic.html

Issue 2671883002: Convert GainNode tests to testharness (Closed)
Patch Set: Address review comments. 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/Gain/gain-basic.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/Gain/gain-basic.html b/third_party/WebKit/LayoutTests/webaudio/Gain/gain-basic.html
index 14b4275f2b4134f55621ca453ac86b74fb3df925..de22de19818306e4a15a92a4f533a2362a3b6a33 100644
--- a/third_party/WebKit/LayoutTests/webaudio/Gain/gain-basic.html
+++ b/third_party/WebKit/LayoutTests/webaudio/Gain/gain-basic.html
@@ -6,34 +6,33 @@ Verifies GainNode attributes and their type.
<html>
<head>
-<script src="../../resources/js-test.js"></script>
+<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>
</head>
<body>
<script>
-description("Tests GainNode attributes in IDL.");
+let audit = Audit.createTaskRunner();
-function runTest() {
- if (window.testRunner) {
- testRunner.dumpAsText();
- }
+audit.define('test', function(task, should) {
+ // Create audio context.
+ let context = new AudioContext();
- // Create audio context.
- var context = new AudioContext();
+ // Create gain node.
+ let gainNode = context.createGain();
- // Create gain node.
- var gainNode = context.createGain();
+ should(
+ gainNode.gain instanceof AudioParam,
+ 'gainNode.gain instanceof AudioParam')
+ .beTrue();
- if (gainNode.gain.toString().indexOf("AudioParam") > -1)
- testPassed("gain is of AudioParam type.");
- else
- testFailed("gain is not of AudioParam type.");
-}
+ task.done();
+});
-runTest();
+audit.run();
</script>
</body>

Powered by Google App Engine
This is Rietveld 408576698