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

Side by Side Diff: mojo/dart/unittests/embedder_tester/dart_test.h

Issue 1665823003: Only enable the Dart timeline for benchmarks (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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/unittests/embedder_tester/dart_finalizer_test.cc ('k') | mojo/tools/data/benchmarks » ('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 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 #ifndef MOJO_DART_UNITTESTS_EMBEDDER_TESTER_DART_TEST_H_ 5 #ifndef MOJO_DART_UNITTESTS_EMBEDDER_TESTER_DART_TEST_H_
6 #define MOJO_DART_UNITTESTS_EMBEDDER_TESTER_DART_TEST_H_ 6 #define MOJO_DART_UNITTESTS_EMBEDDER_TESTER_DART_TEST_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
11 #include "base/rand_util.h" 11 #include "base/rand_util.h"
12 #include "mojo/dart/embedder/dart_controller.h" 12 #include "mojo/dart/embedder/dart_controller.h"
13 #include "mojo/public/c/system/types.h" 13 #include "mojo/public/c/system/types.h"
14 #include "mojo/public/cpp/environment/environment.h" 14 #include "mojo/public/cpp/environment/environment.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace mojo { 17 namespace mojo {
18 namespace dart { 18 namespace dart {
19 19
20 class DartTest : public testing::Test { 20 class DartTest : public testing::Test {
21 public: 21 public:
22 DartTest() {} 22 DartTest() {}
23 23
24 static void SetUpTestCase() { 24 static void SetUpTestCase() {
25 DartController::Initialize(nullptr, true, false, nullptr, 0); 25 DartController::Initialize(nullptr, true, false, false, nullptr, 0);
26 } 26 }
27 27
28 static void TearDownTestCase() { 28 static void TearDownTestCase() {
29 DartController::Shutdown(); 29 DartController::Shutdown();
30 } 30 }
31 31
32 void RunDartTest(const base::FilePath& path, 32 void RunDartTest(const base::FilePath& path,
33 const std::vector<std::string>& script_arguments, 33 const std::vector<std::string>& script_arguments,
34 bool compile_all, 34 bool compile_all,
35 bool expect_unhandled_exception, 35 bool expect_unhandled_exception,
(...skipping 12 matching lines...) Expand all
48 EXPECT_TRUE(Dart_IsError(error)); 48 EXPECT_TRUE(Dart_IsError(error));
49 *exception = true; 49 *exception = true;
50 *closed_handles = count; 50 *closed_handles = count;
51 } 51 }
52 }; 52 };
53 53
54 } // namespace dart 54 } // namespace dart
55 } // namespace mojo 55 } // namespace mojo
56 56
57 #endif // MOJO_DART_UNITTESTS_EMBEDDER_TESTER_DART_TEST_H_ 57 #endif // MOJO_DART_UNITTESTS_EMBEDDER_TESTER_DART_TEST_H_
OLDNEW
« no previous file with comments | « mojo/dart/unittests/embedder_tester/dart_finalizer_test.cc ('k') | mojo/tools/data/benchmarks » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698