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

Unified Diff: runtime/observatory/tests/service/auth_token_test.dart

Issue 2486443002: Add an environment variable toggle to control new service protocol auth token (Closed)
Patch Set: Add a test Created 4 years, 1 month 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
Index: runtime/observatory/tests/service/auth_token_test.dart
diff --git a/runtime/observatory/tests/service/developer_server_control_test.dart b/runtime/observatory/tests/service/auth_token_test.dart
similarity index 73%
copy from runtime/observatory/tests/service/developer_server_control_test.dart
copy to runtime/observatory/tests/service/auth_token_test.dart
index fc1e9405cf4fcd4e0e4cbfa7ff6a0bf5687dbb30..ce75e4f298b595e9a589d3ce7639093771d29205 100644
--- a/runtime/observatory/tests/service/developer_server_control_test.dart
+++ b/runtime/observatory/tests/service/auth_token_test.dart
@@ -14,7 +14,11 @@ Future<Null> testeeBefore() async {
print(await Service.getInfo());
// Start the web server.
ServiceProtocolInfo info = await Service.controlWebServer(enable: true);
- print(info);
+ expect(info.serverUri, isNotNull);
+ // Ensure that we have the auth token in the path segments.
+ expect(info.serverUri.pathSegments.length, greaterThan(1));
+ // Sanity check the length of the auth token.
+ expect(info.serverUri.pathSegments[0].length, greaterThan(8));
}
var tests = [
@@ -31,4 +35,5 @@ main(args) => runIsolateTests(args,
testeeBefore: testeeBefore,
// the testee is responsible for starting the
// web server.
- testeeControlsServer: true);
+ testeeControlsServer: true,
+ useAuthToken: true);

Powered by Google App Engine
This is Rietveld 408576698