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

Side by Side Diff: pkg/web_components/test/interop2_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/pkg.status ('k') | pkg/web_components/test/interop_test.dart » ('j') | 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 // TODO(sigmund): delete this file after issue 19322 is resolved. 5 // TODO(sigmund): delete this file after issue 19322 is resolved.
6 // This test is a trimmed down version of interop_test. interop_test is 6 // This test is a trimmed down version of interop_test. interop_test is
7 // currently failing in dart2js because of bug/19322, so we have this copy 7 // currently failing in dart2js because of bug/19322, so we have this copy
8 // that excludes the causes of failure to get some test coverage in .js. 8 // that excludes the causes of failure to get some test coverage in .js.
9 library web_components.interop2_test; 9 library web_components.interop2_test;
10 10
11 import 'dart:html'; 11 import 'dart:html';
12 import 'dart:async'; 12 import 'dart:async';
13 import 'dart:js' show context, JsObject; 13 import 'dart:js' show context, JsObject;
14 import 'package:unittest/html_config.dart'; 14 import 'package:unittest/html_config.dart';
15 import 'package:unittest/unittest.dart'; 15 import 'package:unittest/unittest.dart';
16 import 'package:web_components/interop.dart'; 16 import 'package:web_components/interop.dart';
17 import 'package:web_components/polyfill.dart';
17 18
18 main() { 19 main() {
19 useHtmlConfiguration(); 20 useHtmlConfiguration();
20 registerDartType('x-a', XAWrapper); 21 registerDartType('x-a', XAWrapper);
21 registerDartType('x-b', XBWrapper, extendsTag: 'div'); 22 registerDartType('x-b', XBWrapper, extendsTag: 'div');
22 registerDartType('x-c', XCWrapper); 23 registerDartType('x-c', XCWrapper);
23 24
25 setUp(() => customElementsReady);
26
24 test('interop is supported', () { 27 test('interop is supported', () {
25 expect(isSupported, isTrue); 28 expect(isSupported, isTrue);
26 }); 29 });
27 30
28 test('previously created elements are not upgraded', () { 31 test('previously created elements are not upgraded', () {
29 var a = document.querySelector('x-a'); 32 var a = document.querySelector('x-a');
30 expect(a is HtmlElement, isTrue, reason: 'x-a is HtmlElement'); 33 expect(a is HtmlElement, isTrue, reason: 'x-a is HtmlElement');
31 expect(a is XAWrapper, isFalse, reason: 'x-a should not be upgraded yet'); 34 expect(a is XAWrapper, isFalse, reason: 'x-a should not be upgraded yet');
32 expect(_readX(a), 0); 35 expect(_readX(a), 0);
33 36
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 XAWrapper.created() : super.created(); 86 XAWrapper.created() : super.created();
84 } 87 }
85 88
86 class XBWrapper extends DivElement with Wrapper { 89 class XBWrapper extends DivElement with Wrapper {
87 XBWrapper.created() : super.created(); 90 XBWrapper.created() : super.created();
88 } 91 }
89 92
90 class XCWrapper extends HtmlElement with Wrapper { 93 class XCWrapper extends HtmlElement with Wrapper {
91 XCWrapper.created() : super.created(); 94 XCWrapper.created() : super.created();
92 } 95 }
OLDNEW
« no previous file with comments | « pkg/pkg.status ('k') | pkg/web_components/test/interop_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698