| Index: editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/ByteRequestSinkTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/ByteRequestSinkTest.java b/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/ByteRequestSinkTest.java
|
| index df4715017d969cbb7a0be4d35b90a085becd168b..288f69b7f52e3ea1c3005e883b05ad1641ca303a 100644
|
| --- a/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/ByteRequestSinkTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.server_test/src/com/google/dart/server/internal/remote/ByteRequestSinkTest.java
|
| @@ -57,6 +57,20 @@ public class ByteRequestSinkTest extends TestCase {
|
| verify(debugStream).println(anyString());
|
| }
|
|
|
| + public void test_close() throws Exception {
|
| + ByteRequestSink requestSink = new ByteRequestSink(byteStream, null);
|
| + JsonObject originalJsonObject = parseJson(//
|
| + "{",
|
| + " 'id': '0',",
|
| + " 'method': 'server.shutdown'",
|
| + "}");
|
| + // assert write after close is ignored
|
| + requestSink.close();
|
| + requestSink.add(originalJsonObject);
|
| + byte[] bytes = byteStream.toByteArray();
|
| + assertEquals(0, bytes.length);
|
| + }
|
| +
|
| /**
|
| * Builds a JSON string from the given lines. Replaces single quotes with double quotes. Then
|
| * parses this string as a {@link JsonObject}.
|
|
|