Index: third_party/WebKit/LayoutTests/webaudio/internals/audiosource-premature-gc.html |
diff --git a/third_party/WebKit/LayoutTests/webaudio/internals/audiosource-premature-gc.html b/third_party/WebKit/LayoutTests/webaudio/internals/audiosource-premature-gc.html |
index faddf47b58f04e2294abbeeae530ca91c7779248..743b85a095b32452c1b5fcbb61ece4f13363dbf8 100644 |
--- a/third_party/WebKit/LayoutTests/webaudio/internals/audiosource-premature-gc.html |
+++ b/third_party/WebKit/LayoutTests/webaudio/internals/audiosource-premature-gc.html |
@@ -1,30 +1,30 @@ |
-<!doctype html> |
+<!DOCTYPE html> |
<html> |
<head> |
- <title>Test premature GC upon OscillatorNode and AudioBufferSourceNode</title> |
+ <title> |
+ Test premature GC upon OscillatorNode and AudioBufferSourceNode |
+ </title> |
<script src="../../resources/testharness.js"></script> |
- <script src="../../resources/testharnessreport.js"></script> |
+ <script src="../../resources/testharnessreport.js"></script> |
<script src="../resources/audit-util.js"></script> |
<script src="../resources/audit.js"></script> |
</head> |
- |
<body> |
- <script type="text/javascript"> |
- |
- var sampleRate = 44100; |
- var renderDuration = 1; |
+ <script id="layout-test-code"> |
+ let sampleRate = 44100; |
+ let renderDuration = 1; |
- var audit = Audit.createTaskRunner(); |
+ let audit = Audit.createTaskRunner(); |
// Create a graph for testing in an isolated scope. Returns |context|. |
// Create two nodes and schedule only one of them. Then check if |onended| |
// from the scheduled node is fired correctly. |
function createGraphInIsolatedScope(sourceNodeType, task, should) { |
- |
'use strict'; |
- var context = new OfflineAudioContext(1, renderDuration * sampleRate, sampleRate); |
+ let context = |
+ new OfflineAudioContext(1, renderDuration * sampleRate, sampleRate); |
{ |
let node = context['create' + sourceNodeType](); |
@@ -37,10 +37,11 @@ |
// If the node is GCed, |onended| won't be fired. Then this test |
// will be timed out because done() will not get called. |
- node.onended = function () { |
- should(true, sourceNodeType + |
- 'Node 1 survived GC and onended event fired') |
- .beEqualTo(true); |
+ node.onended = function() { |
+ should( |
+ true, |
+ sourceNodeType + 'Node 1 survived GC and onended event fired') |
+ .beEqualTo(true); |
task.done(); |
}; |
@@ -50,7 +51,7 @@ |
// Suspend and GC before the render finishes. The time position is |
// arbitrary. GC should collect |osc2| because it is not scheduled. |
- context.suspend(0.1 * renderDuration).then(function () { |
+ context.suspend(0.1 * renderDuration).then(function() { |
gc(); |
context.resume(); |
}); |