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

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

Issue 167493002: Make sure isolate library is initialized before using isolate natives. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 // Test of IsolateNatives.computeThisScript(). 5 // Test of IsolateNatives.computeThisScript().
6 6
7 import 'dart:_isolate_helper'; 7 import 'dart:_isolate_helper';
8 // The isolate helper library is not correctly set up if the dart:isolate
9 // library hasn't been loaded.
10 import 'dart:isolate';
8 11
9 main() { 12 main() {
13 // Need to use the isolate-library so dart2js correctly initializes the
14 // library.
15 Capability cab = new Capability();
10 String script = IsolateNatives.computeThisScript(); 16 String script = IsolateNatives.computeThisScript();
11 17
12 // This is somewhat brittle and relies on an implementation detail 18 // This is somewhat brittle and relies on an implementation detail
13 // of our test runner, but I can think of no other way to test this. 19 // of our test runner, but I can think of no other way to test this.
14 // -- ahe 20 // -- ahe
15 if (!script.endsWith('/out.js')) { 21 if (!script.endsWith('/out.js')) {
16 throw 'Unexpected script: "$script"'; 22 throw 'Unexpected script: "$script"';
17 } 23 }
18 } 24 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/lib/isolate_helper.dart ('k') | tests/compiler/dart2js_native/dart2js_native.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698