| OLD | NEW |
| 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 28 matching lines...) Expand all Loading... |
| 39 .AppendASCII("test") | 39 .AppendASCII("test") |
| 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 | 51 |
| 51 char* error = NULL; | 52 char* error = NULL; |
| 52 bool unhandled_exception = false; | 53 bool unhandled_exception = false; |
| 53 DartControllerConfig config; | 54 DartControllerConfig config; |
| 54 // Run with strict compilation even in Release mode so that ASAN testing gets | 55 // Run with strict compilation even in Release mode so that ASAN testing gets |
| 55 // coverage of Dart asserts, type-checking, etc. | 56 // coverage of Dart asserts, type-checking, etc. |
| 56 config.strict_compilation = true; | 57 config.strict_compilation = true; |
| 57 config.script = source; | 58 config.script = source; |
| 58 config.script_uri = path.AsUTF8Unsafe(); | 59 config.script_uri = path.AsUTF8Unsafe(); |
| 59 config.package_root = package_root.AsUTF8Unsafe(); | 60 config.package_root = package_root.AsUTF8Unsafe(); |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 const int kNumArgs = 2; | 144 const int kNumArgs = 2; |
| 144 const char* args[kNumArgs]; | 145 const char* args[kNumArgs]; |
| 145 args[0] = "--new-gen-semi-max-size=1"; | 146 args[0] = "--new-gen-semi-max-size=1"; |
| 146 args[1] = "--old_gen_growth_rate=1"; | 147 args[1] = "--old_gen_growth_rate=1"; |
| 147 RunTest("handle_finalizer_test.dart", false, args, kNumArgs); | 148 RunTest("handle_finalizer_test.dart", false, args, kNumArgs); |
| 148 } | 149 } |
| 149 | 150 |
| 150 } // namespace | 151 } // namespace |
| 151 } // namespace dart | 152 } // namespace dart |
| 152 } // namespace mojo | 153 } // namespace mojo |
| OLD | NEW |