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

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

Issue 317013007: Detect and wrap JS-CustomEvents if applicable. Include created_watcher and (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/polymer/pubspec.yaml ('k') | pkg/polymer/test/js_custom_event_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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 library polymer.test.web.events_test;
6
7 import 'dart:html';
8 import 'dart:js';
9 import 'package:polymer/polymer.dart';
10 import 'package:unittest/html_config.dart';
11 import 'package:unittest/unittest.dart';
12
13 @CustomTag('x-test')
14 class XTest extends PolymerElement {
15 bool called = false;
16 XTest.created() : super.created();
17
18 void myEventHandler(e, detail, t) {
19 called = true;
20 expect(detail['value'], 42);
21 }
22 }
23
24 main() => initPolymer().run(() {
25 useHtmlConfiguration();
26 setUp(() => Polymer.onReady);
27
28 test('detail on JS custom events are proxied', () {
29 var element = querySelector('x-test');
30 expect(element.called, isFalse);
31 context.callMethod('fireEvent');
32 expect(element.called, isTrue);
33 });
34 });
OLDNEW
« no previous file with comments | « pkg/polymer/pubspec.yaml ('k') | pkg/polymer/test/js_custom_event_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698