| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |