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

Unified Diff: client/tests/client/samples/swarm/swarm_tests.dart

Issue 8363040: Implement measurement using futures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove duplicated imports from html.dart Created 9 years, 2 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
Index: client/tests/client/samples/swarm/swarm_tests.dart
diff --git a/client/tests/client/samples/swarm/swarm_tests.dart b/client/tests/client/samples/swarm/swarm_tests.dart
index 6c4fe8a7ce5173eda6acae78646db0658cc23b95..1eb16379f2fefdbd7d6e03602decd1cdab877ff9 100644
--- a/client/tests/client/samples/swarm/swarm_tests.dart
+++ b/client/tests/client/samples/swarm/swarm_tests.dart
@@ -20,7 +20,6 @@ void main() {
UIStateProxy state = new UIStateProxy(swarm.sections);
swarm.state = state;
swarm.run();
-
// TODO(jmesserly): should be adding the full stylesheet here
Dom.addStyle('''
.story-content {
@@ -45,26 +44,30 @@ void main() {
};
}
- test('BackButton', () {
- Expect.equals(null, swarm.frontView.storyView); // verify initial state
-
- // Make sure we've transitioned to the section
- // In the real app, this isn't needed because ConveyorView fires the
- // transition end event before we can click a story.
- SectionView section = getView(swarm.sections[0]);
- section.showSources();
+ asyncTest('BackButton', 1, () {
+ serialInvokeAsync([() {
+ Expect.equals(null, swarm.frontView.storyView); // verify initial state
- final item = swarm.sections[0].feeds[2].articles[1];
- state.loadFromHistory(getHistory(item));
+ // Make sure we've transitioned to the section
+ // In the real app, this isn't needed because ConveyorView fires the
+ // transition end event before we can click a story.
+ SectionView section = getView(swarm.sections[0]);
+ section.showSources();
+ },
+ () {
+ final item = swarm.sections[0].feeds[2].articles[1];
+ state.loadFromHistory(getHistory(item));
- Expect.equals(item, state.currentArticle.value);
+ Expect.equals(item, state.currentArticle.value);
- Expect.isFalse(getStoryNode().classes.contains(CSS.HIDDEN_STORY));
+ Expect.isFalse(getStoryNode().classes.contains(CSS.HIDDEN_STORY));
- state.loadFromHistory({});
+ state.loadFromHistory({});
- Expect.equals(null, state.currentArticle.value);
- Expect.isTrue(getStoryNode().classes.contains(CSS.HIDDEN_STORY));
+ Expect.equals(null, state.currentArticle.value);
+ Expect.isTrue(getStoryNode().classes.contains(CSS.HIDDEN_STORY));
+ callbackDone();
+ }]);
});
test('StoryView', () {
« no previous file with comments | « client/tests/client/samples/dartcombat/dartcombat_tests.dart ('k') | client/tests/client/samples/total/total_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698