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

Side by Side Diff: pkg/web_components/test/interop_test.dart

Issue 322023003: Make bots green. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/web_components/test/interop2_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library template_wrappers_test; 5 library template_wrappers_test;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:async'; 8 import 'dart:async';
9 import 'dart:js' show context, JsObject; 9 import 'dart:js' show context, JsObject;
10 import 'package:unittest/html_config.dart'; 10 import 'package:unittest/html_config.dart';
11 import 'package:unittest/unittest.dart'; 11 import 'package:unittest/unittest.dart';
12 import 'package:web_components/interop.dart'; 12 import 'package:web_components/interop.dart';
13 import 'package:web_components/polyfill.dart';
13 14
14 main() { 15 main() {
15 useHtmlConfiguration(); 16 useHtmlConfiguration();
16 registerDartType('x-a', XAWrapper); 17 registerDartType('x-a', XAWrapper);
17 registerDartType('x-b', XBWrapper, extendsTag: 'div'); 18 registerDartType('x-b', XBWrapper, extendsTag: 'div');
18 registerDartType('x-c', XCWrapper); 19 registerDartType('x-c', XCWrapper);
19 20
21 setUp(() => customElementsReady);
22
20 test('interop is supported', () { 23 test('interop is supported', () {
21 expect(isSupported, isTrue); 24 expect(isSupported, isTrue);
22 }); 25 });
23 26
24 test('previously created elements are not upgraded', () { 27 test('previously created elements are not upgraded', () {
25 var a = document.querySelector('x-a'); 28 var a = document.querySelector('x-a');
26 expect(a is HtmlElement, isTrue, reason: 'x-a is HtmlElement'); 29 expect(a is HtmlElement, isTrue, reason: 'x-a is HtmlElement');
27 expect(a is XAWrapper, isFalse, reason: 'x-a should not be upgraded yet'); 30 expect(a is XAWrapper, isFalse, reason: 'x-a should not be upgraded yet');
28 expect(_readX(a), 0); 31 expect(_readX(a), 0);
29 32
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 XAWrapper.created() : super.created(); 96 XAWrapper.created() : super.created();
94 } 97 }
95 98
96 class XBWrapper extends DivElement with Wrapper { 99 class XBWrapper extends DivElement with Wrapper {
97 XBWrapper.created() : super.created(); 100 XBWrapper.created() : super.created();
98 } 101 }
99 102
100 class XCWrapper extends HtmlElement with Wrapper { 103 class XCWrapper extends HtmlElement with Wrapper {
101 XCWrapper.created() : super.created(); 104 XCWrapper.created() : super.created();
102 } 105 }
OLDNEW
« no previous file with comments | « pkg/web_components/test/interop2_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698