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

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

Issue 11416259: fix #136, support watch exprs and two way bindings for component fields (Closed) Base URL: https://github.com/dart-lang/dart-web-components.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « test/data/input/component_field_2way_test.html ('k') | test/data/input/custom_radio_button_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/data/input/component_field_test.html
diff --git a/test/data/input/data_value_test.html b/test/data/input/component_field_test.html
similarity index 72%
rename from test/data/input/data_value_test.html
rename to test/data/input/component_field_test.html
index 3ff9d0189617dd5410b69f9c7a8395abd35b5937..08411ba45f61620430725ad40085c0767b82aa90 100644
--- a/test/data/input/data_value_test.html
+++ b/test/data/input/component_field_test.html
@@ -13,22 +13,25 @@
</head>
<body>
<element name="x-greeter" extends="div" constructor="Greeter">
- <template>{{greeting}}, {{name}}!</template>
+ <template>{{greeting}}, {{title}}{{ending}}</template>
<script type='application/dart'>
import 'common.dart';
import 'package:web_components/web_components.dart';
class Greeter extends WebComponent {
- String greeting, name;
+ String greeting, ending;
}
</script>
</element>
<p>
- This test has two loops, each over two items, for a total of four different
+ This test has three loops, each over two items, for a total of six different
greeting messages:
</p>
+ <!-- note: "title" is a DOM field on all elements. -->
<template iterate="g in greetings">
<template iterate="n in names">
- <x-greeter data-value="greeting:g, name:n"></x-greeter>
+ <template iterate="e in endings">
+ <x-greeter greeting="{{g}}" title="{{n}}" ending="{{e}}"></x-greeter>
+ </template>
</template>
</template>
<script type="application/dart">
@@ -37,9 +40,10 @@
var greetings = ['hello', 'hi'];
var names = ['world', 'universe'];
+ var endings = ['??', '!!'];
main() {
window.setTimeout(() {
- expect(query('x-greeter').attributes, equals({}));
+ expect(query('x-greeter').attributes, { 'title': 'world' });
window.postMessage('done', '*');
}, 0);
}
« no previous file with comments | « test/data/input/component_field_2way_test.html ('k') | test/data/input/custom_radio_button_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698