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

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

Issue 10905125: Move dart:web to pkg:htmlescape. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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) 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include "vm/unit_test.h" 7 #include "vm/unit_test.h"
8 8
9 #include "bin/builtin.h" 9 #include "bin/builtin.h"
10 #include "bin/dartutils.h" 10 #include "bin/dartutils.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 if (DartUtils::IsDartIOLibURL(url_chars)) { 79 if (DartUtils::IsDartIOLibURL(url_chars)) {
80 return Builtin::LoadAndCheckLibrary(Builtin::kIOLibrary); 80 return Builtin::LoadAndCheckLibrary(Builtin::kIOLibrary);
81 } else if (DartUtils::IsDartJsonLibURL(url_chars)) { 81 } else if (DartUtils::IsDartJsonLibURL(url_chars)) {
82 return Builtin::LoadAndCheckLibrary(Builtin::kJsonLibrary); 82 return Builtin::LoadAndCheckLibrary(Builtin::kJsonLibrary);
83 } else if (DartUtils::IsDartUriLibURL(url_chars)) { 83 } else if (DartUtils::IsDartUriLibURL(url_chars)) {
84 return Builtin::LoadAndCheckLibrary(Builtin::kUriLibrary); 84 return Builtin::LoadAndCheckLibrary(Builtin::kUriLibrary);
85 } else if (DartUtils::IsDartUtfLibURL(url_chars)) { 85 } else if (DartUtils::IsDartUtfLibURL(url_chars)) {
86 return Builtin::LoadAndCheckLibrary(Builtin::kUtfLibrary); 86 return Builtin::LoadAndCheckLibrary(Builtin::kUtfLibrary);
87 } else if (DartUtils::IsDartCryptoLibURL(url_chars)) { 87 } else if (DartUtils::IsDartCryptoLibURL(url_chars)) {
88 return Builtin::LoadAndCheckLibrary(Builtin::kCryptoLibrary); 88 return Builtin::LoadAndCheckLibrary(Builtin::kCryptoLibrary);
89 } else if (DartUtils::IsDartWebLibURL(url_chars)) {
90 return Builtin::LoadAndCheckLibrary(Builtin::kWebLibrary);
91 } else { 89 } else {
92 return Dart_Error("Do not know how to load '%s'", url_chars); 90 return Dart_Error("Do not know how to load '%s'", url_chars);
93 } 91 }
94 } 92 }
95 return DartUtils::LoadSource(NULL, 93 return DartUtils::LoadSource(NULL,
96 library, 94 library,
97 url, 95 url,
98 tag, 96 tag,
99 url_chars); 97 url_chars);
100 } 98 }
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 215
218 bool CompilerTest::TestCompileFunction(const Function& function) { 216 bool CompilerTest::TestCompileFunction(const Function& function) {
219 Isolate* isolate = Isolate::Current(); 217 Isolate* isolate = Isolate::Current();
220 ASSERT(isolate != NULL); 218 ASSERT(isolate != NULL);
221 ASSERT(ClassFinalizer::AllClassesFinalized()); 219 ASSERT(ClassFinalizer::AllClassesFinalized());
222 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 220 const Error& error = Error::Handle(Compiler::CompileFunction(function));
223 return error.IsNull(); 221 return error.IsNull();
224 } 222 }
225 223
226 } // namespace dart 224 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698