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