OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "mojo/edk/test/scoped_ipc_support.h" | 36 #include "mojo/edk/test/scoped_ipc_support.h" |
37 #include "platform/heap/Heap.h" | 37 #include "platform/heap/Heap.h" |
38 #include "platform/testing/TestingPlatformSupport.h" | 38 #include "platform/testing/TestingPlatformSupport.h" |
39 #include <memory> | 39 #include <memory> |
40 | 40 |
41 namespace { | 41 namespace { |
42 | 42 |
43 int runTestSuite(base::TestSuite* testSuite) | 43 int runTestSuite(base::TestSuite* testSuite) |
44 { | 44 { |
45 int result = testSuite->Run(); | 45 int result = testSuite->Run(); |
46 blink::ThreadState::current()-> collectAllGarbage(); | 46 blink::ThreadHeap::collectAllGarbage(); |
47 return result; | 47 return result; |
48 } | 48 } |
49 | 49 |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 int main(int argc, char** argv) | 52 int main(int argc, char** argv) |
53 { | 53 { |
54 blink::ScopedUnittestsEnvironmentSetup testEnvironmentSetup(argc, argv); | 54 blink::ScopedUnittestsEnvironmentSetup testEnvironmentSetup(argc, argv); |
55 int result = 0; | 55 int result = 0; |
56 { | 56 { |
57 base::TestSuite testSuite(argc, argv); | 57 base::TestSuite testSuite(argc, argv); |
58 | 58 |
59 mojo::edk::Init(); | 59 mojo::edk::Init(); |
60 base::TestIOThread testIoThread(base::TestIOThread::kAutoStart); | 60 base::TestIOThread testIoThread(base::TestIOThread::kAutoStart); |
61 std::unique_ptr<mojo::edk::test::ScopedIPCSupport> ipcSupport(wrapUnique
(new mojo::edk::test::ScopedIPCSupport(testIoThread.task_runner()))); | 61 std::unique_ptr<mojo::edk::test::ScopedIPCSupport> ipcSupport(wrapUnique
(new mojo::edk::test::ScopedIPCSupport(testIoThread.task_runner()))); |
62 result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base
::Unretained(&testSuite))); | 62 result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base
::Unretained(&testSuite))); |
63 } | 63 } |
64 return result; | 64 return result; |
65 } | 65 } |
OLD | NEW |