| OLD | NEW |
| 1 'use strict'; | 1 'use strict'; |
| 2 | 2 |
| 3 if (self.importScripts) { | 3 if (self.importScripts) { |
| 4 self.importScripts('/resources/testharness.js'); | 4 self.importScripts('/resources/testharness.js'); |
| 5 } | 5 } |
| 6 | 6 |
| 7 test(() => { | 7 test(() => { |
| 8 const ws = new WritableStream({}); | 8 const ws = new WritableStream({}); |
| 9 const writer = ws.getWriter(); | 9 const writer = ws.getWriter(); |
| 10 writer.releaseLock(); | 10 writer.releaseLock(); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 return promises.start | 145 return promises.start |
| 146 .then(thisValue => assert_equals(thisValue, theSink, 'start should be call
ed as a method')) | 146 .then(thisValue => assert_equals(thisValue, theSink, 'start should be call
ed as a method')) |
| 147 .then(() => promises.write) | 147 .then(() => promises.write) |
| 148 .then(thisValue => assert_equals(thisValue, theSink, 'write should be call
ed as a method')) | 148 .then(thisValue => assert_equals(thisValue, theSink, 'write should be call
ed as a method')) |
| 149 .then(() => promises.close) | 149 .then(() => promises.close) |
| 150 .then(thisValue => assert_equals(thisValue, theSink, 'close should be call
ed as a method')) | 150 .then(thisValue => assert_equals(thisValue, theSink, 'close should be call
ed as a method')) |
| 151 .then(() => promises.abort) | 151 .then(() => promises.abort) |
| 152 .then(thisValue => assert_equals(thisValue, theSink, 'abort should be call
ed as a method')); | 152 .then(thisValue => assert_equals(thisValue, theSink, 'abort should be call
ed as a method')); |
| 153 }, 'WritableStream should call underlying sink methods as methods'); | 153 }, 'WritableStream should call underlying sink methods as methods'); |
| 154 | 154 |
| 155 promise_test(() => { |
| 156 const ws = new WritableStream(); |
| 157 const writer1 = ws.getWriter(); |
| 158 assert_equals(undefined, writer1.releaseLock(), 'releaseLock() should return u
ndefined'); |
| 159 const writer2 = ws.getWriter(); |
| 160 assert_equals(undefined, writer1.releaseLock(), 'no-op releaseLock() should re
turn undefined'); |
| 161 // Calling releaseLock() on writer1 should not interfere with writer2. If it d
id, then the ready promise would be |
| 162 // rejected. |
| 163 return writer2.ready; |
| 164 }, 'redundant releaseLock() is no-op'); |
| 165 |
| 155 done(); | 166 done(); |
| OLD | NEW |