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

Side by Side Diff: runtime/vm/snapshot_test.cc

Issue 10386107: Implement spawnUri from dart:isolate. This function allows us to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/unit_test.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "include/dart_debugger_api.h" 5 #include "include/dart_debugger_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_api_message.h" 10 #include "vm/dart_api_message.h"
(...skipping 945 matching lines...) Expand 10 before | Expand all | Expand 10 after
956 Dart_ExitScope(); 956 Dart_ExitScope();
957 } 957 }
958 958
959 { 959 {
960 // Create an Isolate using the full snapshot, load a script and create 960 // Create an Isolate using the full snapshot, load a script and create
961 // a script snapshot of the script. 961 // a script snapshot of the script.
962 TestCase::CreateTestIsolateFromSnapshot(full_snapshot); 962 TestCase::CreateTestIsolateFromSnapshot(full_snapshot);
963 Dart_EnterScope(); // Start a Dart API scope for invoking API functions. 963 Dart_EnterScope(); // Start a Dart API scope for invoking API functions.
964 964
965 // Load the library. 965 // Load the library.
966 Dart_Handle import_map = Dart_NewList(0);
967 Dart_Handle import_lib = Dart_LoadLibrary(Dart_NewString("dart:import-lib"), 966 Dart_Handle import_lib = Dart_LoadLibrary(Dart_NewString("dart:import-lib"),
968 Dart_NewString(kLibScriptChars), 967 Dart_NewString(kLibScriptChars));
969 import_map);
970 EXPECT_VALID(import_lib); 968 EXPECT_VALID(import_lib);
971 969
972 // Create a test library and Load up a test script in it. 970 // Create a test library and Load up a test script in it.
973 TestCase::LoadTestScript(kScriptChars, NULL); 971 TestCase::LoadTestScript(kScriptChars, NULL);
974 972
975 EXPECT_VALID(Dart_LibraryImportLibrary(TestCase::lib(), import_lib)); 973 EXPECT_VALID(Dart_LibraryImportLibrary(TestCase::lib(), import_lib));
976 974
977 // Get list of library URLs loaded and save the count. 975 // Get list of library URLs loaded and save the count.
978 Dart_Handle libs = Dart_GetLibraryURLs(); 976 Dart_Handle libs = Dart_GetLibraryURLs();
979 EXPECT(Dart_IsList(libs)); 977 EXPECT(Dart_IsList(libs));
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
1528 EXPECT(Dart_ErrorHasException(result)); 1526 EXPECT(Dart_ErrorHasException(result));
1529 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", 1527 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n",
1530 Dart_GetError(result)); 1528 Dart_GetError(result));
1531 1529
1532 Dart_ExitScope(); 1530 Dart_ExitScope();
1533 } 1531 }
1534 1532
1535 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 1533 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
1536 1534
1537 } // namespace dart 1535 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/raw_object.h ('k') | runtime/vm/unit_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698