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

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

Issue 723393003: update to polymer js 0.5.1 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: little bit of cleanup Created 6 years, 1 month 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: pkg/polymer/test/import_test.dart
diff --git a/pkg/polymer/test/nested_binding_test.dart b/pkg/polymer/test/import_test.dart
similarity index 52%
copy from pkg/polymer/test/nested_binding_test.dart
copy to pkg/polymer/test/import_test.dart
index 9118bb1e025cb2b6edea76aec7259d673c39d325..76aa9a4e1e7c1ffe86bd40ad805bb7be86d50b5b 100644
--- a/pkg/polymer/test/nested_binding_test.dart
+++ b/pkg/polymer/test/import_test.dart
@@ -2,33 +2,26 @@
// 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.nested_binding_test;
-
import 'dart:async';
import 'dart:html';
-import 'package:polymer/polymer.dart';
import 'package:unittest/unittest.dart';
import 'package:unittest/html_config.dart';
-
-@CustomTag('my-test')
-class MyTest extends PolymerElement {
- final List fruits = toObservable(['apples', 'oranges', 'pears']);
-
- final _testDone = new Completer();
-
- MyTest.created() : super.created();
-
- ready() {
- expect($['fruit'].text.trim(), 'Short name: [pears]');
- _testDone.complete();
- }
-}
+import 'package:polymer/polymer.dart';
main() => initPolymer().run(() {
useHtmlConfiguration();
setUp(() => Polymer.onReady);
- test('ready called',
- () => (querySelector('my-test') as MyTest)._testDone.future);
+ test('Polymer.import', () {
Siggi Cherem (dart-lang) 2014/11/25 17:53:42 Maybe we should at least add a comment here to ind
jakemac 2014/12/01 18:42:51 I think its good to have the test ready, but I add
+ return Polymer.import(['element_import/import_a.html']).then((_) {
+ expect((querySelector('x-foo') as dynamic).isCustom, true);
+ var dom = document.importNode(
+ (querySelector('#myTemplate') as TemplateElement).content, true);
+ return Polymer.importElements(dom).then((_) {
+ expect((querySelector('x-bar') as dynamic).isCustom, true);
+ });
+ });
+ });
});
+

Powered by Google App Engine
This is Rietveld 408576698