Index: test/init_web_components_test.dart |
diff --git a/test/init_web_components_test.dart b/test/init_web_components_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..15279e5c0084834fd53fd80d5773932cd3f9c5b1 |
--- /dev/null |
+++ b/test/init_web_components_test.dart |
@@ -0,0 +1,33 @@ |
+// Copyright (c) 2015, 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. |
+@initializeTracker |
+library web_components.test.init_web_components_test; |
+ |
+import 'package:unittest/html_config.dart'; |
+import 'package:unittest/unittest.dart'; |
+import 'package:initialize/initialize.dart' show LibraryIdentifier; |
+import 'package:initialize/src/initialize_tracker.dart'; |
+import 'package:web_components/web_components.dart'; |
+ |
+const String importPath = 'my_import.html'; |
+ |
+main() { |
+ useHtmlConfiguration(); |
+ |
+ test('can initialize scripts from html imports', () { |
+ return initWebComponents().then((_) { |
+ var expectedInitializers = [ |
+ const LibraryIdentifier( |
+ #web_components.test.deps.b, null, 'deps/b.dart'), |
+ const LibraryIdentifier( |
+ #web_components.test.deps.c, null, 'deps/c.html'), |
+ const LibraryIdentifier( |
+ #web_components.test.deps.a, null, 'deps/a.dart'), |
+ const LibraryIdentifier(#web_components.test.init_web_components_test, |
+ null, 'init_web_components_test.dart'), |
+ ]; |
+ expect(InitializeTracker.seen, expectedInitializers); |
+ }); |
+ }); |
+} |