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

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

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/embedder/dart_controller.cc ('k') | mojo/dart/unittests/embedder_tester/dart_test.h » ('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 #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/path_service.h" 7 #include "base/path_service.h"
8 #include "mojo/dart/embedder/dart_controller.h" 8 #include "mojo/dart/embedder/dart_controller.h"
9 #include "mojo/dart/unittests/embedder_tester/dart_test.h" 9 #include "mojo/dart/unittests/embedder_tester/dart_test.h"
10 #include "mojo/public/c/system/types.h" 10 #include "mojo/public/c/system/types.h"
11 #include "mojo/public/cpp/environment/environment.h" 11 #include "mojo/public/cpp/environment/environment.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace mojo { 14 namespace mojo {
15 namespace dart { 15 namespace dart {
16 namespace { 16 namespace {
17 17
18 class DartFinalizerTest : public DartTest { 18 class DartFinalizerTest : public DartTest {
19 public: 19 public:
20 DartFinalizerTest() {} 20 DartFinalizerTest() {}
21 21
22 static void SetUpTestCase() { 22 static void SetUpTestCase() {
23 const int kNumArgs = 2; 23 const int kNumArgs = 2;
24 const char* args[kNumArgs]; 24 const char* args[kNumArgs];
25 args[0] = "--new-gen-semi-max-size=1"; 25 args[0] = "--new-gen-semi-max-size=1";
26 args[1] = "--old_gen_growth_rate=1"; 26 args[1] = "--old_gen_growth_rate=1";
27 DartController::Initialize(nullptr, true, false, args, kNumArgs); 27 DartController::Initialize(nullptr, true, false, false, args, kNumArgs);
28 } 28 }
29 29
30 void RunTest(const std::string& test) { 30 void RunTest(const std::string& test) {
31 base::FilePath path; 31 base::FilePath path;
32 PathService::Get(base::DIR_SOURCE_ROOT, &path); 32 PathService::Get(base::DIR_SOURCE_ROOT, &path);
33 path = path.AppendASCII("mojo") 33 path = path.AppendASCII("mojo")
34 .AppendASCII("dart") 34 .AppendASCII("dart")
35 .AppendASCII("unittests") 35 .AppendASCII("unittests")
36 .AppendASCII("embedder_tests") 36 .AppendASCII("embedder_tests")
37 .AppendASCII(test); 37 .AppendASCII(test);
38 std::vector<std::string> script_arguments; 38 std::vector<std::string> script_arguments;
39 39
40 RunDartTest(path, script_arguments, false, false, 0); 40 RunDartTest(path, script_arguments, false, false, 0);
41 } 41 }
42 }; 42 };
43 43
44 TEST_F(DartFinalizerTest, handle_finalizer_test) { 44 TEST_F(DartFinalizerTest, handle_finalizer_test) {
45 RunTest("handle_finalizer_test.dart"); 45 RunTest("handle_finalizer_test.dart");
46 } 46 }
47 47
48 TEST_F(DartFinalizerTest, shared_buffer_finalizer_test) { 48 TEST_F(DartFinalizerTest, shared_buffer_finalizer_test) {
49 RunTest("shared_buffer_finalizer_test.dart"); 49 RunTest("shared_buffer_finalizer_test.dart");
50 } 50 }
51 51
52 } // namespace 52 } // namespace
53 } // namespace dart 53 } // namespace dart
54 } // namespace mojo 54 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/dart/embedder/dart_controller.cc ('k') | mojo/dart/unittests/embedder_tester/dart_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698