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

Side by Side Diff: tests/html/window_nosuchmethod_test.dart

Issue 2850783002: Dart SDK Spelling b, c, and d. (Closed)
Patch Set: Created 3 years, 7 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 WindowNSMETest; 5 library WindowNSMETest;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 import 'package:unittest/html_config.dart'; 9 import 'package:unittest/html_config.dart';
10 import 'dart:html' as dom; 10 import 'dart:html' as dom;
(...skipping 23 matching lines...) Expand all
34 expect(false, isTrue, reason: 'Wrong exception: $e'); 34 expect(false, isTrue, reason: 'Wrong exception: $e');
35 } 35 }
36 }); 36 });
37 37
38 test('foo', () { 38 test('foo', () {
39 var win = things[inscrutable(0)]; 39 var win = things[inscrutable(0)];
40 String x = win.foo('bar'); 40 String x = win.foo('bar');
41 expect(x, 'not bar'); 41 expect(x, 'not bar');
42 }); 42 });
43 43
44 // Use dom.window direclty in case the compiler does type inference. 44 // Use dom.window directly in case the compiler does type inference.
45 test('windowNonMethod2', () { 45 test('windowNonMethod2', () {
46 final message = foo("Hello World"); 46 final message = foo("Hello World");
47 try { 47 try {
48 String x = dom.window.foo(message); 48 String x = dom.window.foo(message);
49 expect(false, isTrue, reason: 'Should not reach here: $x'); 49 expect(false, isTrue, reason: 'Should not reach here: $x');
50 } on NoSuchMethodError catch (e) { 50 } on NoSuchMethodError catch (e) {
51 // Expected exception. 51 // Expected exception.
52 } on Exception catch (e) { 52 } on Exception catch (e) {
53 expect(false, isTrue, reason: 'Wrong exception: $e'); 53 expect(false, isTrue, reason: 'Wrong exception: $e');
54 } 54 }
55 }); 55 });
56 } 56 }
OLDNEW
« no previous file with comments | « tests/html/js_typed_interop_anonymous_unreachable_test.dart ('k') | tests/isolate/function_send_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698