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

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

Issue 10398010: Remove the SHA1 implementation used by web sockets and use the dart:crypto library one instead. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Additional changes to make all tests run 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/bin/websocket_impl.dart ('k') | tests/standalone/crypto/sha1_test.dart » ('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 <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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 ASSERT(tag == kImportTag); 76 ASSERT(tag == kImportTag);
77 // Handle imports of other built-in libraries present in the SDK. 77 // Handle imports of other built-in libraries present in the SDK.
78 if (DartUtils::IsDartIOLibURL(url_chars)) { 78 if (DartUtils::IsDartIOLibURL(url_chars)) {
79 return Builtin::LoadLibrary(Builtin::kIOLibrary); 79 return Builtin::LoadLibrary(Builtin::kIOLibrary);
80 } else if (DartUtils::IsDartJsonLibURL(url_chars)) { 80 } else if (DartUtils::IsDartJsonLibURL(url_chars)) {
81 return Builtin::LoadLibrary(Builtin::kJsonLibrary); 81 return Builtin::LoadLibrary(Builtin::kJsonLibrary);
82 } else if (DartUtils::IsDartUriLibURL(url_chars)) { 82 } else if (DartUtils::IsDartUriLibURL(url_chars)) {
83 return Builtin::LoadLibrary(Builtin::kUriLibrary); 83 return Builtin::LoadLibrary(Builtin::kUriLibrary);
84 } else if (DartUtils::IsDartUtfLibURL(url_chars)) { 84 } else if (DartUtils::IsDartUtfLibURL(url_chars)) {
85 return Builtin::LoadLibrary(Builtin::kUtfLibrary); 85 return Builtin::LoadLibrary(Builtin::kUtfLibrary);
86 } else if (DartUtils::IsDartCryptoLibURL(url_chars)) {
87 return Builtin::LoadLibrary(Builtin::kCryptoLibrary);
86 } else { 88 } else {
87 return Dart_Error("Do not know how to load '%s'", url_chars); 89 return Dart_Error("Do not know how to load '%s'", url_chars);
88 } 90 }
89 } 91 }
90 result = DartUtils::LoadSource(NULL, 92 result = DartUtils::LoadSource(NULL,
91 library, 93 library,
92 url, 94 url,
93 tag, 95 tag,
94 url_chars, 96 url_chars,
95 import_map); 97 import_map);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 217
216 bool CompilerTest::TestCompileFunction(const Function& function) { 218 bool CompilerTest::TestCompileFunction(const Function& function) {
217 Isolate* isolate = Isolate::Current(); 219 Isolate* isolate = Isolate::Current();
218 ASSERT(isolate != NULL); 220 ASSERT(isolate != NULL);
219 ASSERT(ClassFinalizer::AllClassesFinalized()); 221 ASSERT(ClassFinalizer::AllClassesFinalized());
220 const Error& error = Error::Handle(Compiler::CompileFunction(function)); 222 const Error& error = Error::Handle(Compiler::CompileFunction(function));
221 return error.IsNull(); 223 return error.IsNull();
222 } 224 }
223 225
224 } // namespace dart 226 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/websocket_impl.dart ('k') | tests/standalone/crypto/sha1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698