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

Unified Diff: pkg/polymer/test/property_observe_test.dart

Issue 794473002: Delete polymer from the Dart repo (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years 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 | « pkg/polymer/test/property_change_test.html ('k') | pkg/polymer/test/property_observe_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/property_observe_test.dart
diff --git a/pkg/polymer/test/property_observe_test.dart b/pkg/polymer/test/property_observe_test.dart
deleted file mode 100644
index b79fa341981afb0ce94aecc6c38ceec4819463c2..0000000000000000000000000000000000000000
--- a/pkg/polymer/test/property_observe_test.dart
+++ /dev/null
@@ -1,90 +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.property_change_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-
-var _changes = 0;
-final _done = new Completer();
-
-checkDone() {
- if (6 == ++_changes) {
- _done.complete();
- }
-}
-
-@CustomTag('x-test')
-class XTest extends PolymerElement {
- @observable String bar = '';
- @observable String pie;
- @observable Map a;
-
- XTest.created() : super.created();
-
- ready() {
- bar = 'bar';
- pie = 'pie';
- a = {'b': {'c': 'exists'}};
- }
-
- barChanged() {
- // Dart note: unlike polymer-js we support multiple observers, due to how
- // our @ObserveProperty metadata translated.
- // _done.completeError('barChanged should not be called.');
- expect('bar', 'bar', reason: 'barChanged called');
- checkDone();
- }
-
- @ObserveProperty('bar pie')
- validate() {
- window.console.log('validate');
- expect('bar', 'bar', reason: 'custom change observer called');
- expect('pie', 'pie', reason: 'custom change observer called');
- checkDone();
- }
-
- // Dart note: test that we can observe "pie" twice.
- @ObserveProperty('pie')
- validateYummyPie() {
- window.console.log('validateYummyPie');
- expect('pie', 'pie', reason: 'validateYummyPie called');
- checkDone();
- }
-
-
- @ObserveProperty('a.b.c')
- validateSubPath(oldValue, newValue) {
- window.console.log('validateSubPath $oldValue $newValue');
- expect(newValue, 'exists', reason: 'subpath change observer called');
- checkDone();
- }
-}
-
-@CustomTag('x-test2')
-class XTest2 extends XTest {
- @observable String noogle;
-
- XTest2.created() : super.created();
-
- @ObserveProperty('noogle')
- validate() => super.validate();
-
- ready() {
- super.ready();
- noogle = 'noogle';
- }
-}
-
-main() => initPolymer().run(() {
- useHtmlConfiguration();
-
- setUp(() => Polymer.onReady);
-
- test('changes detected', () => _done.future);
-});
« no previous file with comments | « pkg/polymer/test/property_change_test.html ('k') | pkg/polymer/test/property_observe_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698