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

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

Issue 588373003: Update to polymer js version 0.4.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: review updates Created 6 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 | « pkg/polymer/test/computed_properties_test.html ('k') | pkg/polymer/test/force_ready_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/polymer/test/force_ready_test.dart
diff --git a/samples/searchable_list/test/demo_app_test.dart b/pkg/polymer/test/force_ready_test.dart
similarity index 50%
copy from samples/searchable_list/test/demo_app_test.dart
copy to pkg/polymer/test/force_ready_test.dart
index 564cef3f72ac0b6949245ceab4809c95d84a3cd6..309ba7157967372bed4c56dc3a18d0265a1193d9 100644
--- a/samples/searchable_list/test/demo_app_test.dart
+++ b/pkg/polymer/test/force_ready_test.dart
@@ -2,29 +2,23 @@
// 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 todomvc.test.markdone_test;
-
import 'dart:async';
import 'dart:html';
-import 'package:polymer/polymer.dart';
import 'package:unittest/unittest.dart';
import 'package:unittest/html_config.dart';
-import '../web/elements/demo_app.dart';
+import 'package:polymer/polymer.dart';
-/**
- * A trivial test to get the analyzer plugged into this sample. See
- * searchable_list_test.dart.
- */
-main() {
- initPolymer();
+main() => initPolymer().run(() {
useHtmlConfiguration();
- setUp(() => Polymer.onReady);
+ setUp(() => window.on['HTMLImportsLoaded']);
- test('loading the element', () {
- return new Future(() {
- var demoApp = querySelector('demo-app');
- expect(demoApp is DemoApp, isTrue);
- });
+ /// We do not port the full test, since this just proxies through to the
+ /// polymer js implementation.
+ test('can force ready', () {
+ expect(Polymer.waitingFor.length, 1);
+ expect(Polymer.waitingFor[0], querySelector('polymer-element'));
+ Polymer.forceReady();
+ return Polymer.onReady;
});
-}
+});
« no previous file with comments | « pkg/polymer/test/computed_properties_test.html ('k') | pkg/polymer/test/force_ready_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698