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

Side by Side Diff: mojo/dart/unittests/embedder_tester/dart_to_cpp_tests.cc

Issue 1545483003: Dart: Reorganize files (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix build file Created 4 years, 12 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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.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"
11 #include "base/path_service.h" 11 #include "base/path_service.h"
12 #include "base/rand_util.h" 12 #include "base/rand_util.h"
13 #include "base/run_loop.h" 13 #include "base/run_loop.h"
14 #include "base/threading/thread.h" 14 #include "base/threading/thread.h"
15 #include "mojo/dart/embedder/dart_controller.h" 15 #include "mojo/dart/embedder/dart_controller.h"
16 #include "mojo/dart/embedder/test/dart_test.h" 16 #include "mojo/dart/unittests/embedder_tester/dart_test.h"
17 #include "mojo/dart/embedder/test/dart_to_cpp.mojom.h" 17 #include "mojo/dart/unittests/embedder_tester/dart_to_cpp.mojom.h"
18 #include "mojo/public/cpp/bindings/strong_binding.h" 18 #include "mojo/public/cpp/bindings/strong_binding.h"
19 #include "mojo/public/cpp/system/core.h" 19 #include "mojo/public/cpp/system/core.h"
20 #include "mojo/public/cpp/system/macros.h" 20 #include "mojo/public/cpp/system/macros.h"
21 #include "testing/gtest/include/gtest/gtest.h" 21 #include "testing/gtest/include/gtest/gtest.h"
22 22
23 namespace mojo { 23 namespace mojo {
24 namespace dart { 24 namespace dart {
25 25
26 // Global value updated by some checks to prevent compilers from optimizing 26 // Global value updated by some checks to prevent compilers from optimizing
27 // reads out of existence. 27 // reads out of existence.
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 static void InitializeDartConfig(DartControllerConfig* config, 274 static void InitializeDartConfig(DartControllerConfig* config,
275 const std::string& test, 275 const std::string& test,
276 MojoHandle handle, 276 MojoHandle handle,
277 bool* unhandled_exception, 277 bool* unhandled_exception,
278 int64_t* closed_handles, 278 int64_t* closed_handles,
279 char** error) { 279 char** error) {
280 base::FilePath path; 280 base::FilePath path;
281 PathService::Get(base::DIR_SOURCE_ROOT, &path); 281 PathService::Get(base::DIR_SOURCE_ROOT, &path);
282 path = path.AppendASCII("mojo") 282 path = path.AppendASCII("mojo")
283 .AppendASCII("dart") 283 .AppendASCII("dart")
284 .AppendASCII("embedder") 284 .AppendASCII("unittests")
285 .AppendASCII("test") 285 .AppendASCII("embedder_tests")
286 .AppendASCII(test); 286 .AppendASCII(test);
287 287
288 // Setup the package root. 288 // Setup the package root.
289 base::FilePath package_root; 289 base::FilePath package_root;
290 PathService::Get(base::DIR_EXE, &package_root); 290 PathService::Get(base::DIR_EXE, &package_root);
291 package_root = package_root.AppendASCII("gen") 291 package_root = package_root.AppendASCII("gen")
292 .AppendASCII("dart-pkg") 292 .AppendASCII("dart-pkg")
293 .AppendASCII("packages"); 293 .AppendASCII("packages");
294 294
295 295
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 TEST_F(DartToCppTest, Echo) { 351 TEST_F(DartToCppTest, Echo) {
352 EchoCppSideConnection cpp_side_connection; 352 EchoCppSideConnection cpp_side_connection;
353 bool unhandled_exception = 353 bool unhandled_exception =
354 RunTest("dart_to_cpp_tests.dart", &cpp_side_connection); 354 RunTest("dart_to_cpp_tests.dart", &cpp_side_connection);
355 EXPECT_TRUE(cpp_side_connection.DidSucceed()); 355 EXPECT_TRUE(cpp_side_connection.DidSucceed());
356 EXPECT_FALSE(unhandled_exception); 356 EXPECT_FALSE(unhandled_exception);
357 } 357 }
358 358
359 } // namespace dart 359 } // namespace dart
360 } // namespace mojo 360 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/dart/unittests/embedder_tester/dart_to_cpp.mojom ('k') | mojo/dart/unittests/embedder_tester/run_dart_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698