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

Unified Diff: pkg/telemetry/test/telemetry_test.dart

Issue 2954733002: Add initial version of analytics and crash reporting package. (Closed)
Patch Set: updates from review comments 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 | « pkg/telemetry/test/crash_reporting_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/telemetry/test/telemetry_test.dart
diff --git a/pkg/telemetry/test/telemetry_test.dart b/pkg/telemetry/test/telemetry_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..7a9b70a46689d4b78b86e0f6b1aa73f2f38c8676
--- /dev/null
+++ b/pkg/telemetry/test/telemetry_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:telemetry/telemetry.dart';
+import 'package:test/test.dart';
+import 'package:usage/usage.dart';
+
+void main() {
+ group('telemetry', () {
+ test('getDartStorageDirectory', () {
+ Directory dir = getDartStorageDirectory();
+ expect(dir, isNotNull);
+ });
+
+ test('getDartVersion', () {
+ expect(getDartVersion(), isNotNull);
+ });
+
+ test('createAnalyticsInstance', () {
+ Analytics analytics = createAnalyticsInstance('UA-0', 'test-app');
+ expect(analytics, isNotNull);
+ expect(analytics.trackingId, 'UA-0');
+ expect(analytics.getSessionValue('an'), 'test-app');
+ expect(analytics.getSessionValue('av'), isNotNull);
+ expect(analytics.clientId, isNotNull);
+ });
+ });
+}
« no previous file with comments | « pkg/telemetry/test/crash_reporting_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698