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

Unified Diff: pkg/microlytics/test/dart_microlytics_test.dart

Issue 2770573002: Run dartfmt on microlytics package. (Closed)
Patch Set: Created 3 years, 9 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/microlytics/lib/microlytics.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/microlytics/test/dart_microlytics_test.dart
diff --git a/pkg/microlytics/test/dart_microlytics_test.dart b/pkg/microlytics/test/dart_microlytics_test.dart
index eab10025ee3e907368ef218c4994802becd06625..ca76b7592f6ab4bbd1432bb46fc168294e534cb3 100644
--- a/pkg/microlytics/test/dart_microlytics_test.dart
+++ b/pkg/microlytics/test/dart_microlytics_test.dart
@@ -17,16 +17,15 @@ void main() {
}
void testBasicEventRead() {
- TestChannel c = new TestChannel();
- AnalyticsLogger logger = new AnalyticsLogger(
+ TestChannel c = new TestChannel();
+ AnalyticsLogger logger = new AnalyticsLogger(
c,
"2cfac780-31e2-11e4-8c21-0800200c9a66",
"UA-53895644-1",
"TestApp",
"0.42");
- logger.logAnonymousEvent("video", "play");
- Expect.isTrue(c.contains(
- "v=1"
+ logger.logAnonymousEvent("video", "play");
+ Expect.isTrue(c.contains("v=1"
"&tid=UA-53895644-1"
"&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
"&an=TestApp"
@@ -37,84 +36,79 @@ void testBasicEventRead() {
}
void testBasicNegativeEventRead() {
- TestChannel c = new TestChannel();
- AnalyticsLogger logger = new AnalyticsLogger(
- c,
- "2cfac780-31e2-11e4-8c21-0800200c9a66",
- "UA-53895644-1",
- "TestApp",
- "0.42");
- logger.logAnonymousEvent("video", "play");
- Expect.isFalse(c.contains(
- "v=1"
- "&tid=UA-53895644-1"
- "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
- "&an=TestApp"
- "&av=XXX"
- "&t=event"
- "&ec=video"
- "&ea=play"));
+ TestChannel c = new TestChannel();
+ AnalyticsLogger logger = new AnalyticsLogger(
+ c,
+ "2cfac780-31e2-11e4-8c21-0800200c9a66",
+ "UA-53895644-1",
+ "TestApp",
+ "0.42");
+ logger.logAnonymousEvent("video", "play");
+ Expect.isFalse(c.contains("v=1"
+ "&tid=UA-53895644-1"
+ "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
+ "&an=TestApp"
+ "&av=XXX"
+ "&t=event"
+ "&ec=video"
+ "&ea=play"));
}
void testBasicTimingRead() {
- TestChannel c = new TestChannel();
- AnalyticsLogger logger = new AnalyticsLogger(
- c,
- "2cfac780-31e2-11e4-8c21-0800200c9a66",
- "UA-53895644-1",
- "TestApp",
- "0.42");
- logger.logAnonymousTiming("video", "delay", 157);
- Expect.isTrue(c.contains(
- "v=1"
- "&tid=UA-53895644-1"
- "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
- "&an=TestApp"
- "&av=0.42"
- "&t=timing"
- "&utc=video"
- "&utv=delay"
- "&utt=157"));
+ TestChannel c = new TestChannel();
+ AnalyticsLogger logger = new AnalyticsLogger(
+ c,
+ "2cfac780-31e2-11e4-8c21-0800200c9a66",
+ "UA-53895644-1",
+ "TestApp",
+ "0.42");
+ logger.logAnonymousTiming("video", "delay", 157);
+ Expect.isTrue(c.contains("v=1"
+ "&tid=UA-53895644-1"
+ "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
+ "&an=TestApp"
+ "&av=0.42"
+ "&t=timing"
+ "&utc=video"
+ "&utv=delay"
+ "&utt=157"));
}
void testBasicTimingMultiread() {
- TestChannel c = new TestChannel();
- AnalyticsLogger logger = new AnalyticsLogger(
- c,
- "2cfac780-31e2-11e4-8c21-0800200c9a66",
- "UA-53895644-1",
- "TestApp",
- "0.42");
- logger.logAnonymousTiming("video", "delay", 159);
- logger.logAnonymousTiming("video", "delay", 152);
- Expect.isTrue(c.contains(
- "v=1"
- "&tid=UA-53895644-1"
- "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
- "&an=TestApp"
- "&av=0.42"
- "&t=timing"
- "&utc=video"
- "&utv=delay"
- "&utt=152"));
- Expect.isTrue(c.contains(
- "v=1"
- "&tid=UA-53895644-1"
- "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
- "&an=TestApp"
- "&av=0.42"
- "&t=timing"
- "&utc=video"
- "&utv=delay"
- "&utt=159"));
- Expect.isFalse(c.contains(
- "v=1"
- "&tid=UA-53895644-1"
- "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
- "&an=TestApp"
- "&av=0.42"
- "&t=timing"
- "&utc=video"
- "&utv=delay"
- "&utt=19"));
-}
+ TestChannel c = new TestChannel();
+ AnalyticsLogger logger = new AnalyticsLogger(
+ c,
+ "2cfac780-31e2-11e4-8c21-0800200c9a66",
+ "UA-53895644-1",
+ "TestApp",
+ "0.42");
+ logger.logAnonymousTiming("video", "delay", 159);
+ logger.logAnonymousTiming("video", "delay", 152);
+ Expect.isTrue(c.contains("v=1"
+ "&tid=UA-53895644-1"
+ "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
+ "&an=TestApp"
+ "&av=0.42"
+ "&t=timing"
+ "&utc=video"
+ "&utv=delay"
+ "&utt=152"));
+ Expect.isTrue(c.contains("v=1"
+ "&tid=UA-53895644-1"
+ "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
+ "&an=TestApp"
+ "&av=0.42"
+ "&t=timing"
+ "&utc=video"
+ "&utv=delay"
+ "&utt=159"));
+ Expect.isFalse(c.contains("v=1"
+ "&tid=UA-53895644-1"
+ "&cid=2cfac780-31e2-11e4-8c21-0800200c9a66"
+ "&an=TestApp"
+ "&av=0.42"
+ "&t=timing"
+ "&utc=video"
+ "&utv=delay"
+ "&utt=19"));
+}
« no previous file with comments | « pkg/microlytics/lib/microlytics.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698