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

Unified Diff: test/data/input/table_test.html

Issue 12225039: Support for observable models, fixes #259 (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Created 7 years, 10 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: test/data/input/table_test.html
diff --git a/test/data/input/table_test.html b/test/data/input/table_test.html
index a44a50e4e3445d5063d27875a40d9a7d9b443a80..944471227328a0c8e01eb7a9eaacc0b12fbf3628 100644
--- a/test/data/input/table_test.html
+++ b/test/data/input/table_test.html
@@ -22,9 +22,17 @@ BSD-style license that can be found in the LICENSE file.
<script type="application/dart">
import 'dart:html';
import 'package:unittest/unittest.dart';
- import 'package:web_ui/watcher.dart';
+ import 'package:web_ui/observe.dart';
+
+ _obs(list) => new ObservableList.from(list);
+
+ @observable
+ List<List> table = _obs([
+ _obs([1, 2, 3]),
+ _obs(['a', 'b', 'c']),
+ _obs(['A', 'B', 'C'])]
+ );
- List<List> table = [[1, 2, 3], ['a', 'b', 'c'], ['A', 'B', 'C']];
main() {
window.setTimeout(() {
expect(document.query("#test").innerHtml, equalsIgnoringWhitespace(
@@ -34,14 +42,14 @@ BSD-style license that can be found in the LICENSE file.
table[0][2] = 'X';
table[1][1] = 'Y';
table.add(['_', '__', '___']);
- dispatch();
+ deliverChangesSync();
window.setTimeout(() {
expect(document.query("#test").innerHtml, equalsIgnoringWhitespace(
'<tr> <td>1</td> <td>2</td> <td>X</td> </tr> '
'<tr> <td>a</td> <td>Y</td> <td>c</td> </tr> '
'<tr> <td>A</td> <td>B</td> <td>C</td> </tr> '
'<tr> <td>_</td> <td>__</td> <td>___</td> </tr>'));
- window.setTimeout(() => window.postMessage('done', '*'), 0);
+ window.setImmediate(() => window.postMessage('done', '*'));
}, 0);
}, 0);
}

Powered by Google App Engine
This is Rietveld 408576698