Index: tests/standalone/io/web_socket_protocol_processor_test.dart |
diff --git a/tests/standalone/io/web_socket_protocol_processor_test.dart b/tests/standalone/io/web_socket_protocol_processor_test.dart |
index 36eeeed404c78307c37d110cc402e125b5ceba7b..54a7c129781efa6366a78401edeaec7d2867397f 100644 |
--- a/tests/standalone/io/web_socket_protocol_processor_test.dart |
+++ b/tests/standalone/io/web_socket_protocol_processor_test.dart |
@@ -8,6 +8,7 @@ import "dart:math"; |
import "dart:async"; |
import "dart:collection"; |
import "dart:typeddata"; |
+import "dart:isolate"; |
part "../../../sdk/lib/io/http.dart"; |
part "../../../sdk/lib/io/buffer_list.dart"; |
@@ -226,7 +227,22 @@ void testFragmentedMessages() { |
Expect.equals(0, mc.closeCount); |
} |
+void testUnmaskedMessage() { |
+ var transformer = new _WebSocketProtocolTransformer(true); |
+ var controller = new StreamController(); |
+ var port = new ReceivePort(); |
+ controller.stream.transform(transformer).listen((_) {}, onError: (e) { |
+ port.close(); |
+ }); |
+ var message = new Uint8List(10); |
+ List<int> frame = createFrame( |
+ true, FRAME_OPCODE_BINARY, null, message, 0, message.length); |
+ controller.add(frame); |
+} |
+ |
+ |
void main() { |
testFullMessages(); |
testFragmentedMessages(); |
+ testUnmaskedMessage(); |
} |