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

Side by Side Diff: mojo/dart/embedder/test/validation_unittest.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdio.h> 5 #include <stdio.h>
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 .AppendASCII("test") 52 .AppendASCII("test")
53 .AppendASCII("validation_test.dart"); 53 .AppendASCII("validation_test.dart");
54 54
55 // Read in the source. 55 // Read in the source.
56 std::string source; 56 std::string source;
57 EXPECT_TRUE(ReadFileToString(path, &source)) << "Failed to read test file"; 57 EXPECT_TRUE(ReadFileToString(path, &source)) << "Failed to read test file";
58 58
59 // Setup the package root. 59 // Setup the package root.
60 base::FilePath package_root; 60 base::FilePath package_root;
61 PathService::Get(base::DIR_EXE, &package_root); 61 PathService::Get(base::DIR_EXE, &package_root);
62 package_root = package_root.AppendASCII("gen"); 62 package_root = package_root.AppendASCII("gen")
63 .AppendASCII("dart-gen");
63 64
64 char* error = NULL; 65 char* error = NULL;
65 bool unhandled_exception = false; 66 bool unhandled_exception = false;
66 DartControllerConfig config; 67 DartControllerConfig config;
67 config.script = source; 68 config.script = source;
68 // Run with strict compilation even in Release mode so that ASAN testing gets 69 // Run with strict compilation even in Release mode so that ASAN testing gets
69 // coverage of Dart asserts, type-checking, etc. 70 // coverage of Dart asserts, type-checking, etc.
70 config.strict_compilation = true; 71 config.strict_compilation = true;
71 config.script_uri = test; 72 config.script_uri = test;
72 config.package_root = package_root.AsUTF8Unsafe(); 73 config.package_root = package_root.AsUTF8Unsafe();
(...skipping 12 matching lines...) Expand all
85 EXPECT_FALSE(unhandled_exception); 86 EXPECT_FALSE(unhandled_exception);
86 } 87 }
87 88
88 TEST(DartTest, validation) { 89 TEST(DartTest, validation) {
89 RunTest(GetPath()); 90 RunTest(GetPath());
90 } 91 }
91 92
92 } // namespace 93 } // namespace
93 } // namespace dart 94 } // namespace dart
94 } // namespace mojo 95 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/dart/embedder/test/run_dart_tests.cc ('k') | mojo/dart/embedder/tools/dart_embedder_url_mappings.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698