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

Side by Side Diff: mojo/dart/embedder/test/dart_to_cpp_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
« no previous file with comments | « mojo/dart/embedder/test/BUILD.gn ('k') | mojo/dart/embedder/test/dart_to_cpp_tests.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 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/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "base/files/file_util.h" 8 #include "base/files/file_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 .AppendASCII(test); 297 .AppendASCII(test);
298 298
299 // Read in the source. 299 // Read in the source.
300 std::string source; 300 std::string source;
301 EXPECT_TRUE(ReadFileToString(path, &source)) << "Failed to read test file"; 301 EXPECT_TRUE(ReadFileToString(path, &source)) << "Failed to read test file";
302 302
303 // Setup the package root. 303 // Setup the package root.
304 base::FilePath package_root; 304 base::FilePath package_root;
305 PathService::Get(base::DIR_EXE, &package_root); 305 PathService::Get(base::DIR_EXE, &package_root);
306 package_root = package_root.AppendASCII("gen") 306 package_root = package_root.AppendASCII("gen")
307 .AppendASCII("dart-gen"); 307 .AppendASCII("dart-pkg")
308 .AppendASCII("packages");
309
308 310
309 config->strict_compilation = true; 311 config->strict_compilation = true;
310 config->script = source; 312 config->script = source;
311 config->script_uri = path.AsUTF8Unsafe(); 313 config->script_uri = path.AsUTF8Unsafe();
312 config->package_root = package_root.AsUTF8Unsafe(); 314 config->package_root = package_root.AsUTF8Unsafe();
313 config->application_data = nullptr; 315 config->application_data = nullptr;
314 config->callbacks.exception = 316 config->callbacks.exception =
315 base::Bind(&UnhandledExceptionCallback, unhandled_exception); 317 base::Bind(&UnhandledExceptionCallback, unhandled_exception);
316 config->entropy = GenerateEntropy; 318 config->entropy = GenerateEntropy;
317 config->handle = handle; 319 config->handle = handle;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 TEST_F(DartToCppTest, Echo) { 375 TEST_F(DartToCppTest, Echo) {
374 EchoCppSideConnection cpp_side_connection; 376 EchoCppSideConnection cpp_side_connection;
375 bool unhandled_exception = 377 bool unhandled_exception =
376 RunTest("dart_to_cpp_tests.dart", &cpp_side_connection); 378 RunTest("dart_to_cpp_tests.dart", &cpp_side_connection);
377 EXPECT_TRUE(cpp_side_connection.DidSucceed()); 379 EXPECT_TRUE(cpp_side_connection.DidSucceed());
378 EXPECT_FALSE(unhandled_exception); 380 EXPECT_FALSE(unhandled_exception);
379 } 381 }
380 382
381 } // namespace dart 383 } // namespace dart
382 } // namespace mojo 384 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/dart/embedder/test/BUILD.gn ('k') | mojo/dart/embedder/test/dart_to_cpp_tests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698