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

Side by Side Diff: pkg/polymer/test/events_test.dart

Issue 27518006: Practically remove boot.js, adds the initialization from the Dart side of (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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/polymer/test/event_path_test.html ('k') | pkg/polymer/test/events_test.html » ('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 library polymer.test.web.events_test; 5 library polymer.test.web.events_test;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'package:polymer/polymer.dart'; 8 import 'package:polymer/polymer.dart';
9 import 'package:unittest/html_config.dart'; 9 import 'package:unittest/html_config.dart';
10 import 'package:unittest/unittest.dart'; 10 import 'package:unittest/unittest.dart';
11 11
12 main() { 12 @initMethod _main() {
13 useHtmlConfiguration(); 13 useHtmlConfiguration();
14 14
15 setUp(() => Polymer.onReady); 15 setUp(() => Polymer.onReady);
16 16
17 test('host event', () { 17 test('host event', () {
18 // Note: this test is currently the only event in 18 // Note: this test is currently the only event in
19 // polymer/test/js/events.js at commit #7936ff8 19 // polymer/test/js/events.js at commit #7936ff8
20 var testA = query('#a'); 20 var testA = query('#a');
21 expect(testA.xtag.clicks, isEmpty); 21 expect(testA.xtag.clicks, isEmpty);
22 testA.click(); 22 testA.click();
23 expect(testA.xtag.clicks, ['host click on: test-a (id a)']); 23 expect(testA.xtag.clicks, ['host click on: test-a (id a)']);
24 }); 24 });
25 25
26 test('local event', () { 26 test('local event', () {
27 var testB = query('#b'); 27 var testB = query('#b');
28 expect(testB.xtag.clicks, isEmpty); 28 expect(testB.xtag.clicks, isEmpty);
29 testB.click(); 29 testB.click();
30 expect(testB.xtag.clicks, []); 30 expect(testB.xtag.clicks, []);
31 var b1 = testB.shadowRoot.query('#b-1'); 31 var b1 = testB.shadowRoot.query('#b-1');
32 b1.click(); 32 b1.click();
33 expect(testB.xtag.clicks, []); 33 expect(testB.xtag.clicks, []);
34 var b2 = testB.shadowRoot.query('#b-2'); 34 var b2 = testB.shadowRoot.query('#b-2');
35 b2.click(); 35 b2.click();
36 expect(testB.xtag.clicks, ['local click under test-b (id b) on b-2']); 36 expect(testB.xtag.clicks, ['local click under test-b (id b) on b-2']);
37 }); 37 });
38 } 38 }
OLDNEW
« no previous file with comments | « pkg/polymer/test/event_path_test.html ('k') | pkg/polymer/test/events_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698