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

Unified Diff: packages/polymer/test/bind_properties_test.dart

Issue 2312183003: Removed Polymer from Observatory deps (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « packages/polymer/test/bind_mdv_test.html ('k') | packages/polymer/test/bind_properties_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: packages/polymer/test/bind_properties_test.dart
diff --git a/packages/polymer/test/bind_properties_test.dart b/packages/polymer/test/bind_properties_test.dart
deleted file mode 100644
index 65b2d91e7d75849154e148d3e1d88cbcf6586809..0000000000000000000000000000000000000000
--- a/packages/polymer/test/bind_properties_test.dart
+++ /dev/null
@@ -1,109 +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.
-
-import 'dart:async';
-import 'dart:html';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:polymer/polymer.dart';
-
-export 'package:polymer/init.dart';
-
-class XBaz extends PolymerElement {
- @published
- int get val => readValue(#val);
- set val(v) => writeValue(#val, v);
-
- XBaz.created() : super.created();
-}
-
-class XBar extends PolymerElement {
- @published
- int get val => readValue(#val);
- set val(v) => writeValue(#val, v);
-
- XBar.created() : super.created();
-}
-
-class XBat extends PolymerElement {
- @published
- int get val => readValue(#val);
- set val(v) => writeValue(#val, v);
-
- XBat.created() : super.created();
-}
-
-class XFoo extends PolymerElement {
- @published
- int get val => readValue(#val);
- set val(v) => writeValue(#val, v);
-
- XFoo.created() : super.created();
-}
-
-@CustomTag('bind-properties-test')
-class XTest extends PolymerElement {
- XTest.created() : super.created();
-
- @published var obj;
-
- ready() {
- obj = toObservable({'path': {'to': {'value': 3}}});
- readyCalled();
- }
-}
-
-var completer = new Completer();
-waitForElementReady(_) => completer.future;
-readyCalled() {
- completer.complete(null);
-}
-
-@initMethod
-init() {
- // TODO(sigmund): investigate why are we still seeing failures due to the
- // order of registrations, then use @CustomTag instead of this.
- Polymer.register('x-foo', XFoo);
- Polymer.register('x-bar', XBar);
- Polymer.register('x-baz', XBaz);
- Polymer.register('x-bat', XBat);
-
- useHtmlConfiguration();
-
- setUp(() => Polymer.onReady.then(waitForElementReady));
-
- test('bind properties test', () {
- var e = document.querySelector('bind-properties-test');
- var foo = e.shadowRoot.querySelector('#foo');
- var bar = foo.shadowRoot.querySelector('#bar');
- var bat = foo.shadowRoot.querySelector('#bat');
- var baz = bar.shadowRoot.querySelector('#baz');
-
- expect(foo.val, 3);
- expect(bar.val, 3);
- expect(bat.val, 3);
- expect(baz.val, 3);
-
- foo.val = 4;
-
- expect(foo.val, 4);
- expect(bar.val, 4);
- expect(bat.val, 4);
- expect(baz.val, 4);
-
- baz.val = 5;
-
- expect(foo.val, 5);
- expect(bar.val, 5);
- expect(bat.val, 5);
- expect(baz.val, 5);
-
- e.obj['path']['to']['value'] = 6;
-
- expect(foo.val, 6);
- expect(bar.val, 6);
- expect(bat.val, 6);
- expect(baz.val, 6);
- });
-}
« no previous file with comments | « packages/polymer/test/bind_mdv_test.html ('k') | packages/polymer/test/bind_properties_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698