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

Unified Diff: tests/html/touchevent_test.dart

Issue 12084033: Adding supported checks for touch event. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Adding missing test file. Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: tests/html/touchevent_test.dart
diff --git a/tests/html/touchevent_test.dart b/tests/html/touchevent_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..8d90e5b4378cd8d7a7e9dd86ee4c09b3884c33ed
--- /dev/null
+++ b/tests/html/touchevent_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library touch_event_test;
+import '../../pkg/unittest/lib/unittest.dart';
+import '../../pkg/unittest/lib/html_individual_config.dart';
+import 'dart:html';
+
+main() {
+ useHtmlIndividualConfiguration();
+
+ group('supported', () {
+ test('supported', () {
+ expect(TouchEvent.supported, true);
+ });
+ });
+
+ group('functional', () {
+ test('unsupported throws', () {
+ var expectation = TouchEvent.supported ? returnsNormally : throws;
+
+ expect(() {
+ var e = new TouchEvent(null, null, null, 'touch');
+ expect(e is TouchEvent, true);
+ }, expectation);
+ });
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698