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

Unified Diff: packages/polymer/test/event_binding_release_handler_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
Index: packages/polymer/test/event_binding_release_handler_test.dart
diff --git a/packages/polymer/test/event_binding_release_handler_test.dart b/packages/polymer/test/event_binding_release_handler_test.dart
deleted file mode 100644
index f5e81746ecd0249b4c1a08c377ddff4624c746b6..0000000000000000000000000000000000000000
--- a/packages/polymer/test/event_binding_release_handler_test.dart
+++ /dev/null
@@ -1,56 +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.event_binding_release_handler_test;
-
-import 'dart:async';
-import 'dart:html';
-import 'package:polymer/polymer.dart';
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:template_binding/template_binding.dart';
-
-@CustomTag('x-foo')
-class XFoo extends PolymerElement {
- @PublishedProperty(reflect: true)
- int count = 1;
-
- XFoo.created() : super.created();
-
- increment() {
- ++count;
- }
-}
-
-main() {
- // Do not run the test in the zone so the future does not trigger a
- // dirtyCheck. We want to verify that event bindings trigger dirty checks on
- // their own.
- initPolymer();
-
- useHtmlConfiguration();
-
- setUp(() => Polymer.onReady);
-
- test('event handlers can be released', () {
- XFoo element = querySelector('x-foo');
- expect(element, isNotNull);
- ButtonElement button = element.shadowRoot.querySelector('button');
- expect(button, isNotNull);
-
- button.click();
- return new Future(() {}).then((_) {
- expect(element.shadowRoot.querySelector('p').text, 'Count: 2');
- // Remove and detach the element so the binding is invalidated.
- element.remove();
- element.detached();
- }).then((_) => new Future(() {})).then((_) {
- // Clicks should no longer affect the elements count.
- button.click();
- // TODO(jakemac): This is flaky so its commented out, (the rest of the
- // test is not flaky). Figure out how to make this not flaky.
-// expect(element.count, 2);
- });
- });
-}
« no previous file with comments | « packages/polymer/test/entered_view_test.html ('k') | packages/polymer/test/event_binding_release_handler_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698