Revert "fix nested bindings"

This reverts r29722.

R=jmesserly@google.com
BUG=

Review URL: https://codereview.chromium.org//54603008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29728 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
kasperl@google.com
2013-11-01 08:47:49 +00:00
parent 9f5cfcee75
commit 68ff3d28cc
4 changed files with 0 additions and 87 deletions
-2
View File
@@ -51,7 +51,6 @@ polymer/test/event_path_declarative_test: Skip #uses dart:html
polymer/test/event_path_test: Skip #uses dart:html
polymer/test/events_test: Skip #uses dart:html
polymer/test/instance_attrs_test: Skip #uses dart:html
polymer/test/nested_binding_test: Skip # uses dart:html
polymer/test/noscript_test: Skip #uses dart:html
polymer/test/prop_attr_bind_reflection_test: Skip #uses dart:html
polymer/test/prop_attr_reflection_test: Skip #uses dart:html
@@ -99,7 +98,6 @@ polymer/test/event_handlers_test: Pass, Timeout # Issue 13260
polymer/test/event_path_declarative_test: Pass, Timeout # Issue 13260
polymer/test/event_path_test: Pass, Timeout # Issue 13260
polymer/test/events_test: Pass, Timeout # Issue 13260
polymer/test/nested_binding_test: Pass, Timeout # Issue 13260
polymer/test/noscript_test: Pass, Timeout # Issue 13260
polymer/test/prop_attr_reflection_test: Pass, Timeout # Issue 13260
polymer/test/prop_attr_bind_reflection_test: Pass, Timeout # Issue 13260
-43
View File
@@ -1,43 +0,0 @@
// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
library polymer.test.nested_binding_test;
import 'dart:async';
import 'dart:html';
import 'dart:mirrors'; // import mirrors so we include String.length
import 'package:polymer/polymer.dart';
import 'package:unittest/unittest.dart';
import 'package:unittest/html_config.dart';
import 'package:unittest/matcher.dart';
@CustomTag('my-test')
class MyTest extends PolymerElement {
final List fruits = toObservable(['apples', 'oranges', 'pears']);
final _testDone = new Completer();
MyTest.created() : super.created();
_runTest(_) {
expect($['fruit'].text.trim(), 'Short name: [pears]');
_testDone.complete();
}
ready() {
onMutation($['fruit']).then(_runTest);
}
}
main() {
reflectClass(String); // use the mirrors import to suppress a warning.
initPolymer();
useHtmlConfiguration();
setUp(() => Polymer.onReady);
test('ready called', () => (query('my-test') as MyTest)._testDone.future);
}
-31
View File
@@ -1,31 +0,0 @@
<!doctype html>
<!--
Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
-->
<html>
<!--polymer-test: this comment is needed for test_suite.dart-->
<head>
<title>bind simple</title>
<script src="packages/unittest/test_controller.js"></script>
</head>
<body>
<polymer-element name="my-test">
<template>
<h2>Fruits</h2>
<ul id="fruit">
<template repeat="{{fruit in fruits}}">
<template if="{{ fruit.length <= 5 }}">
<li>Short name: [{{fruit}}]</li>
</template>
</template>
</ul>
</template>
</polymer-element>
<my-test></my-test>
<script type="application/dart" src="nested_binding_test.dart"></script>
</body>
</html>
@@ -70,17 +70,6 @@ class PolymerExpressions extends BindingDelegate {
prepareBinding(String path, name, node) {
if (path == null) return null;
var expr = new Parser(path).parse();
// For template bind/repeat to an empty path, just pass through the model.
// We don't want to unwrap the Scope.
// TODO(jmesserly): a custom element extending <template> could notice this
// behavior. An alternative is to associate the Scope with the node via an
// Expando, which is what the JavaScript PolymerExpressions does.
if (isSemanticTemplate(node) && (name == 'bind' || name == 'repeat') &&
expr is EmptyExpression) {
return null;
}
return (model, node) {
if (model is! Scope) {
model = new Scope(model: model, variables: globals);