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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/AudioContext/audiocontext-suspend-resume.html

Issue 2798973002: Resume() should return if context is already running (Closed)
Patch Set: Created 3 years, 8 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/Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Test AudioContext.suspend() and AudioContext.resume()</title> 4 <title>Test AudioContext.suspend() and AudioContext.resume()</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../resources/audit-util.js"></script> 7 <script src="../resources/audit-util.js"></script>
8 <script src="../resources/audit.js"></script> 8 <script src="../resources/audit.js"></script>
9 </head> 9 </head>
10 10
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 .then(() => { 110 .then(() => {
111 // resume() should be rejected on closed context. 111 // resume() should be rejected on closed context.
112 should(offlineContext.resume(), 112 should(offlineContext.resume(),
113 "offlineContext.resume()") 113 "offlineContext.resume()")
114 .beRejected() 114 .beRejected()
115 .then(task.done.bind(task)); 115 .then(task.done.bind(task));
116 }) 116 })
117 }); 117 });
118 }); 118 });
119 119
120 audit.define({
121 label: 'resume-running-context',
122 description: 'Test resuming a running context'
123 }, (task, should) => {
124 let context;
125 should(() => context = new AudioContext(),
126 "Create online context")
hongchan 2017/04/05 21:44:42 Let's not mix single and double quote. We should u
Raymond Toy 2017/04/05 21:53:48 Too much c++.
127 .notThrow();
128
129 should(context.state, "context.state")
130 .beEqualTo("running");
131 should(context.resume(), "context.resume")
132 .beResolved()
133 .then(() => {
134 should(context.state, "context.state after resume")
135 .beEqualTo("running");
136 })
137 .then(() => task.done());
138 });
139
120 audit.run(); 140 audit.run();
121 </script> 141 </script>
122 </body> 142 </body>
123 </html> 143 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/webaudio/AudioContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698