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

Side by Side Diff: tests/html/xmlelement_test.dart

Issue 10412015: aChange all asyncTest/callbackDone style tests to use the new expectAsync/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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('XMLElementTest'); 5 #library('XMLElementTest');
6 #import('../../lib/unittest/unittest.dart'); 6 #import('../../lib/unittest/unittest.dart');
7 #import('../../lib/unittest/html_config.dart'); 7 #import('../../lib/unittest/html_config.dart');
8 #import('dart:html'); 8 #import('dart:html');
9 9
10 main() { 10 main() {
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 Expect.equals("foo<b></b><foo></foo><bar></bar>", el.innerHTML); 556 Expect.equals("foo<b></b><foo></foo><bar></bar>", el.innerHTML);
557 }); 557 });
558 558
559 test('beforeEnd inserts the HTML', () { 559 test('beforeEnd inserts the HTML', () {
560 final el = makeElement(); 560 final el = makeElement();
561 el.insertAdjacentHTML("beforeEnd", "<b/>foo"); 561 el.insertAdjacentHTML("beforeEnd", "<b/>foo");
562 Expect.equals("<foo></foo><bar></bar><b></b>foo", el.innerHTML); 562 Expect.equals("<foo></foo><bar></bar><b></b>foo", el.innerHTML);
563 }); 563 });
564 }); 564 });
565 565
566 asyncTest('default rect values', 1, () { 566 test('default rect values', () {
567 makeElement().rect.then((ElementRect rect) { 567 makeElement().rect.then(
568 expectEmptyRect(rect.client); 568 expectAsync1(ElementRect rect) {
569 expectEmptyRect(rect.offset); 569 expectEmptyRect(rect.client);
570 expectEmptyRect(rect.scroll); 570 expectEmptyRect(rect.offset);
571 expectEmptyRect(rect.bounding); 571 expectEmptyRect(rect.scroll);
572 Expect.isTrue(rect.clientRects.isEmpty()); 572 expectEmptyRect(rect.bounding);
573 callbackDone(); 573 Expect.isTrue(rect.clientRects.isEmpty());
574 }); 574 }));
575 }); 575 });
576 } 576 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698