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

Unified Diff: packages/usage/test/usage_impl_test.dart

Issue 2990843002: Removed fixed dependencies (Closed)
Patch Set: Created 3 years, 5 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 | « packages/usage/test/usage_impl_io_test.dart ('k') | packages/usage/test/usage_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/usage/test/usage_impl_test.dart
diff --git a/packages/usage/test/usage_impl_test.dart b/packages/usage/test/usage_impl_test.dart
index a4ca3ac99baeed9148d079bc23ca41bfd679a201..b8c0f052cdb41cf43da482f806178d6f73817599 100644
--- a/packages/usage/test/usage_impl_test.dart
+++ b/packages/usage/test/usage_impl_test.dart
@@ -28,34 +28,19 @@ void defineTests() {
});
group('AnalyticsImpl', () {
- test('trackingId', () {
- AnalyticsImplMock mock = createMock();
- expect(mock.trackingId, isNotNull);
- });
-
- test('applicationName', () {
- AnalyticsImplMock mock = createMock();
- expect(mock.applicationName, isNotNull);
- });
-
- test('applicationVersion', () {
- AnalyticsImplMock mock = createMock();
- expect(mock.applicationVersion, isNotNull);
- });
-
test('respects disabled', () {
AnalyticsImplMock mock = createMock();
- mock.enabled = false;
+ mock.optIn = false;
mock.sendException('FooBar exception');
- expect(mock.enabled, false);
+ expect(mock.optIn, false);
expect(mock.mockPostHandler.sentValues, isEmpty);
});
- test('firstRun', () {
- AnalyticsImplMock mock = createMock();
- expect(mock.firstRun, true);
- mock = createMock(props: {'firstRun': false});
- expect(mock.firstRun, false);
+ test('hasSetOptIn', () {
+ AnalyticsImplMock mock = createMock(setOptIn: false);
+ expect(mock.hasSetOptIn, false);
+ mock.optIn = false;
+ expect(mock.hasSetOptIn, true);
});
test('setSessionValue', () {
@@ -77,28 +62,6 @@ void defineTests() {
mock.sendScreenView('baz');
return mock.waitForLastPing(timeout: new Duration(milliseconds: 100));
});
-
- group('clientId', () {
- test('is available immediately', () {
- AnalyticsImplMock mock = createMock();
- expect(mock.clientId, isNotEmpty);
- });
-
- test('is memoized', () {
- AnalyticsImplMock mock = createMock();
- final value1 = mock.clientId;
- final value2 = mock.clientId;
- expect(value1, isNotEmpty);
- expect(value1, value2);
- });
-
- test('is stored in properties', () {
- AnalyticsImplMock mock = createMock();
- expect(mock.properties['clientId'], isNull);
- final value = mock.clientId;
- expect(mock.properties['clientId'], value);
- });
- });
});
group('postEncode', () {
« no previous file with comments | « packages/usage/test/usage_impl_io_test.dart ('k') | packages/usage/test/usage_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698