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

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

Issue 1071693003: Uses mojom module names as Dart's package: import URI (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 5 years, 8 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 28 matching lines...) Expand all
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
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
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