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

Side by Side Diff: tests/compiler/dart2js_native/browser_compat_1_unpatched_test.dart

Issue 383413003: Add @Native(...) annotation for native class names. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 5 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
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 import "dart:_js_helper";
5 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
6 //import 'dart:_foreign_helper' show JS; 7 //import 'dart:_foreign_helper' show JS;
7 //import 'dart:_js_helper' show Creates, setNativeSubclassDispatchRecord; 8 //import 'dart:_js_helper' show Creates, setNativeSubclassDispatchRecord;
8 9
9 // Test for dartNativeDispatchHooksTransformer, getTag hook. 10 // Test for dartNativeDispatchHooksTransformer, getTag hook.
10 // Same as browser_compat_1_prepatched_test but with prepatching disabled. 11 // Same as browser_compat_1_prepatched_test but with prepatching disabled.
11 12
12 class T1A native "T1A" { 13 @Native("T1A")
14 class T1A {
13 } 15 }
14 16
15 class T1B native "T1B" { 17 @Native("T1B")
18 class T1B {
16 } 19 }
17 20
18 class T1C native "T1C" { 21 @Native("T1C")
22 class T1C {
19 } 23 }
20 24
21 makeT1A() native; 25 makeT1A() native;
22 makeT1B() native; 26 makeT1B() native;
23 makeT1C() native; 27 makeT1C() native;
24 28
25 int getTagCallCount() native; 29 int getTagCallCount() native;
26 30
27 void setup() native r''' 31 void setup() native r'''
28 function T1A() { } // Normal native class. 32 function T1A() { } // Normal native class.
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 Expect.equals(true, t1c is T1C, '$t1c is T1C'); 90 Expect.equals(true, t1c is T1C, '$t1c is T1C');
87 91
88 Expect.equals(3, getTagCallCount()); 92 Expect.equals(3, getTagCallCount());
89 93
90 Expect.equals(true, inscrutable(t1a) is T1A, '$t1a is T1A'); 94 Expect.equals(true, inscrutable(t1a) is T1A, '$t1a is T1A');
91 Expect.equals(true, inscrutable(t1b) is T1B, '$t1b is T1B'); 95 Expect.equals(true, inscrutable(t1b) is T1B, '$t1b is T1B');
92 Expect.equals(true, inscrutable(t1c) is T1C, '$t1c is T1C'); 96 Expect.equals(true, inscrutable(t1c) is T1C, '$t1c is T1C');
93 97
94 Expect.equals(3, getTagCallCount()); 98 Expect.equals(3, getTagCallCount());
95 } 99 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698