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

Unified Diff: tests/standalone/io/web_socket_ping_test.dart

Issue 2911903002: Use relative URIs for core library part-of statements. (Closed)
Patch Set: Fix warnings in web-sockets tests, typo in fasta. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/standalone/io/web_socket_error_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/web_socket_ping_test.dart
diff --git a/tests/standalone/io/web_socket_ping_test.dart b/tests/standalone/io/web_socket_ping_test.dart
index 8d16c0134871511497999f4b82f9f444e56c0365..5d7339065de975df4f9f632d48c3962f44c01241 100644
--- a/tests/standalone/io/web_socket_ping_test.dart
+++ b/tests/standalone/io/web_socket_ping_test.dart
@@ -11,10 +11,11 @@ library dart.io;
import "package:expect/expect.dart";
import "dart:async";
+import "dart:convert" show BASE64;
import "dart:io";
import "dart:math";
-part "../../../sdk/lib/io/crypto.dart";
+import "hash_utils.dart";
const String webSocketGUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
@@ -27,9 +28,9 @@ void testPing(int totalConnections) {
response.headers.set(HttpHeaders.CONNECTION, "upgrade");
response.headers.set(HttpHeaders.UPGRADE, "websocket");
String key = request.headers.value("Sec-WebSocket-Key");
- _SHA1 sha1 = new _SHA1();
+ var sha1 = new SHA1();
sha1.add("$key$webSocketGUID".codeUnits);
- String accept = _CryptoUtils.bytesToBase64(sha1.close());
+ String accept = BASE64.encode(sha1.close());
response.headers.add("Sec-WebSocket-Accept", accept);
response.headers.contentLength = 0;
response.detachSocket().then((socket) {
« no previous file with comments | « tests/standalone/io/web_socket_error_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698