| OLD | NEW |
| 1 totalTests() { | 1 totalTests() { |
| 2 test('DateUtils', () { | 2 test('DateUtils', () { |
| 3 _isDate('1/1'); | 3 _isDate('1/1'); |
| 4 _isDate('12/1'); | 4 _isDate('12/1'); |
| 5 _isDate('11/31'); | 5 _isDate('11/31'); |
| 6 _isDate('01/1'); | 6 _isDate('01/1'); |
| 7 _isDate('1/01'); | 7 _isDate('1/01'); |
| 8 _isDate('01/01'); | 8 _isDate('01/01'); |
| 9 _isDate('1-1'); | 9 _isDate('1-1'); |
| 10 _isDate('12-1'); | 10 _isDate('12-1'); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 HtmlUtils.quoteHtml("<<Hello<World<")); | 50 HtmlUtils.quoteHtml("<<Hello<World<")); |
| 51 Expect.equals("<<Hello<W<orld<", | 51 Expect.equals("<<Hello<W<orld<", |
| 52 HtmlUtils.quoteHtml("<<Hello<W<orld<")); | 52 HtmlUtils.quoteHtml("<<Hello<W<orld<")); |
| 53 | 53 |
| 54 Document doc = window.document; | 54 Document doc = window.document; |
| 55 Element body = doc.body; | 55 Element body = doc.body; |
| 56 DivElement div = new Element.tag('div'); | 56 DivElement div = new Element.tag('div'); |
| 57 body.nodes.add(div); | 57 body.nodes.add(div); |
| 58 | 58 |
| 59 HtmlUtils.setIntegerProperty(div, "left", 100, "px"); | 59 HtmlUtils.setIntegerProperty(div, "left", 100, "px"); |
| 60 div.computedStyle.then((CSSStyleDeclaration computedStyle) { | 60 window.requestMeasurementFrame(() { |
| 61 String valueAsString = computedStyle.getPropertyValue("left"); | 61 String valueAsString = div.computedStyle.left; |
| 62 // FIXME: Test fails, with valueAsString == "auto". However, | 62 // FIXME: Test fails, with valueAsString == "auto". However, |
| 63 // setIntegerProperty works when tested in practice, so there is | 63 // setIntegerProperty works when tested in practice, so there is |
| 64 // something wrong with recovering the value. | 64 // something wrong with recovering the value. |
| 65 // Expect.equals("100", valueAsString); | 65 // Expect.equals("100", valueAsString); |
| 66 | 66 |
| 67 div.remove(); | 67 div.remove(); |
| 68 callbackDone(); | 68 callbackDone(); |
| 69 }); | 69 }); |
| 70 }); | 70 }); |
| 71 | 71 |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 Expect.isFalse(DateUtils.isDate(date), "DateUtils.isDate(${date})"); | 454 Expect.isFalse(DateUtils.isDate(date), "DateUtils.isDate(${date})"); |
| 455 } | 455 } |
| 456 | 456 |
| 457 _assertNumeric(String s) { | 457 _assertNumeric(String s) { |
| 458 Expect.isTrue(StringUtils.isNumeric(s), 'StringUtils.isNumeric("{$s}")'); | 458 Expect.isTrue(StringUtils.isNumeric(s), 'StringUtils.isNumeric("{$s}")'); |
| 459 } | 459 } |
| 460 | 460 |
| 461 _assertNonNumeric(String s) { | 461 _assertNonNumeric(String s) { |
| 462 Expect.isFalse(StringUtils.isNumeric(s), '!StringUtils.isNumeric("${s}")'); | 462 Expect.isFalse(StringUtils.isNumeric(s), '!StringUtils.isNumeric("${s}")'); |
| 463 } | 463 } |
| OLD | NEW |