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); |
} |