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

Side by Side Diff: samples/tests/samples/src/lib/view/ViewTest.dart

Issue 9537001: Generate dart:html bindings for Dartium as well as Frog. All unittests now pass (or are disabled fo… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('view_tests'); 5 #library('view_tests');
6 6
7 #import('dart:html'); 7 #import('dart:html');
8 #import('../../../../../ui_lib/base/base.dart'); 8 #import('../../../../../ui_lib/base/base.dart');
9 #import('../../../../../ui_lib/view/view.dart'); 9 #import('../../../../../ui_lib/view/view.dart');
10 #import('../../../../../../client/testing/unittest/unittest.dart'); 10 #import('../../../../../../client/testing/unittest/unittest_html.dart');
11 11
12 void main() { 12 void main() {
13 test('does not render immediately', () { 13 test('does not render immediately', () {
14 final view = new TestView(); 14 final view = new TestView();
15 expect(view.isRendered).isFalse(); 15 expect(view.isRendered).isFalse();
16 16
17 view.addToDocument(document.body); 17 view.addToDocument(document.body);
18 expect(view.isRendered).isTrue(); 18 expect(view.isRendered).isTrue();
19 }); 19 });
20 20
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 afterRenderFn = (node) {}; 194 afterRenderFn = (node) {};
195 enterDocumentFn = () {}; 195 enterDocumentFn = () {};
196 exitDocumentFn = () {}; 196 exitDocumentFn = () {};
197 } 197 }
198 198
199 Element render() => renderFn(); 199 Element render() => renderFn();
200 void afterRender(Element node) { afterRenderFn(node); } 200 void afterRender(Element node) { afterRenderFn(node); }
201 void enterDocument() { enterDocumentFn(); } 201 void enterDocument() { enterDocumentFn(); }
202 void exitDocument() { exitDocumentFn(); } 202 void exitDocument() { exitDocumentFn(); }
203 } 203 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698