| 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;
|
| });
|
| -}
|
| +});
|
|
|