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

Unified Diff: test/init_web_components_test.dart

Issue 1026153002: add initWebComponents (Closed) Base URL: git@github.com:dart-lang/web-components.git@master
Patch Set: code review updates Created 5 years, 9 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 | « test/html_import_annotation_test.dart ('k') | test/init_web_components_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ });
+ });
+}
« no previous file with comments | « test/html_import_annotation_test.dart ('k') | test/init_web_components_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698