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

Side by Side Diff: mojo/dart/embedder/test/run_dart_tests.cc

Issue 1132063007: Rationalize Dart mojo and sky package structure (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/file_util.h" 7 #include "base/files/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "crypto/random.h" 10 #include "crypto/random.h"
(...skipping 29 matching lines...) Expand all
40 .AppendASCII(test); 40 .AppendASCII(test);
41 41
42 // Read in the source. 42 // Read in the source.
43 std::string source; 43 std::string source;
44 EXPECT_TRUE(ReadFileToString(path, &source)) << "Failed to read test file"; 44 EXPECT_TRUE(ReadFileToString(path, &source)) << "Failed to read test file";
45 45
46 // Setup the package root. 46 // Setup the package root.
47 base::FilePath package_root; 47 base::FilePath package_root;
48 PathService::Get(base::DIR_EXE, &package_root); 48 PathService::Get(base::DIR_EXE, &package_root);
49 package_root = package_root.AppendASCII("gen") 49 package_root = package_root.AppendASCII("gen")
50 .AppendASCII("dart-gen"); 50 .AppendASCII("dart-pkg")
51 .AppendASCII("packages");
51 52
52 char* error = NULL; 53 char* error = NULL;
53 bool unhandled_exception = false; 54 bool unhandled_exception = false;
54 DartControllerConfig config; 55 DartControllerConfig config;
55 // Run with strict compilation even in Release mode so that ASAN testing gets 56 // Run with strict compilation even in Release mode so that ASAN testing gets
56 // coverage of Dart asserts, type-checking, etc. 57 // coverage of Dart asserts, type-checking, etc.
57 config.strict_compilation = true; 58 config.strict_compilation = true;
58 config.script = source; 59 config.script = source;
59 config.script_uri = path.AsUTF8Unsafe(); 60 config.script_uri = path.AsUTF8Unsafe();
60 config.package_root = package_root.AsUTF8Unsafe(); 61 config.package_root = package_root.AsUTF8Unsafe();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 const int kNumArgs = 2; 149 const int kNumArgs = 2;
149 const char* args[kNumArgs]; 150 const char* args[kNumArgs];
150 args[0] = "--new-gen-semi-max-size=1"; 151 args[0] = "--new-gen-semi-max-size=1";
151 args[1] = "--old_gen_growth_rate=1"; 152 args[1] = "--old_gen_growth_rate=1";
152 RunTest("handle_finalizer_test.dart", false, args, kNumArgs); 153 RunTest("handle_finalizer_test.dart", false, args, kNumArgs);
153 } 154 }
154 155
155 } // namespace 156 } // namespace
156 } // namespace dart 157 } // namespace dart
157 } // namespace mojo 158 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/dart/embedder/test/dart_to_cpp_tests.dart ('k') | mojo/dart/embedder/test/validation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698