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

Unified Diff: third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-listener-should-not-crash.html

Issue 2639683002: Convert audiocontext-listener test to testharness (Closed)
Patch Set: Address review comments Created 3 years, 11 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-listener-should-not-crash-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-listener-should-not-crash.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-listener-should-not-crash.html b/third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-listener-should-not-crash.html
index 04343cbaf3f4b51633c526a46d5ab176e51b2acd..22e14b6f930df78583df264bdbb21d46c9c1d4c1 100644
--- a/third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-listener-should-not-crash.html
+++ b/third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-listener-should-not-crash.html
@@ -1,8 +1,27 @@
-<script src="../../resources/js-test.js"></script>
+<!doctype html>
+<html>
+<head>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../resources/audit.js"></script>
+</head>
+<body>
<script>
-var context = new AudioContext();
-context.listener;
-document.addEventListener(0, context);
-testPassed("document.addEventListener should not crash.");
-</script>
+let audit = new Audit.createTaskRunner();
+
+audit.define("test", function (task, should) {
+ let context = new AudioContext();
+ should(context.listener instanceof AudioListener,
+ "context.listener is AudioListener")
+ .beTrue();
+ should(function () {
+ document.addEventListener(0, context);
+ }, "document.addEventListener(0, context) should not crash")
+ .notThrow();
+ task.done();
+});
+audit.run();
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-listener-should-not-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698