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

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

Issue 2771453003: Format all tests. (Closed)
Patch Set: Format files Created 3 years, 8 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) 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 "native_testing.dart"; 5 import "native_testing.dart";
6 import 'dart:_js_helper' show setNativeSubclassDispatchRecord; 6 import 'dart:_js_helper' show setNativeSubclassDispatchRecord;
7 import 'dart:_interceptors' 7 import 'dart:_interceptors'
8 show findInterceptorForType, findConstructorForNativeSubclassType; 8 show findInterceptorForType, findConstructorForNativeSubclassType;
9 9
10 // Test that subclasses of native classes can be initialized by calling the 10 // Test that subclasses of native classes can be initialized by calling the
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 super.two(), 48 super.two(),
49 b3 = log(203) { 49 b3 = log(203) {
50 log('body(B.two)'); 50 log('body(B.two)');
51 } 51 }
52 52
53 B.three([x]) : super.three(205, x); 53 B.three([x]) : super.three(205, x);
54 54
55 get increment => 20; 55 get increment => 20;
56 } 56 }
57 57
58 makeB() native ; 58 makeB() native;
59 59
60 @Creates('=Object') 60 @Creates('=Object')
61 getBPrototype() native ; 61 getBPrototype() native;
62 62
63 void setup() native r""" 63 void setup() native r"""
64 function B() { this.a2 = 102; } 64 function B() { this.a2 = 102; }
65 65
66 makeB = function(){return new B;}; 66 makeB = function(){return new B;};
67 67
68 getBPrototype = function(){return B.prototype;}; 68 getBPrototype = function(){return B.prototype;};
69 """; 69 """;
70 70
71 test_one() { 71 test_one() {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 return message; 165 return message;
166 }; 166 };
167 167
168 setNativeSubclassDispatchRecord(getBPrototype(), findInterceptorForType(B)); 168 setNativeSubclassDispatchRecord(getBPrototype(), findInterceptorForType(B));
169 169
170 test_one(); 170 test_one();
171 test_two(); 171 test_two();
172 test_three(); 172 test_three();
173 test_new(); 173 test_new();
174 } 174 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698