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

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

Issue 2312183003: Removed Polymer from Observatory deps (Closed)
Patch Set: Created 4 years, 3 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
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().then((zone) => zone.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 | « packages/polymer/test/instance_attrs_test.html ('k') | packages/polymer/test/js_custom_event_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698