| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 namespace { | 54 namespace { |
| 55 | 55 |
| 56 double dummyCurrentTime() | 56 double dummyCurrentTime() |
| 57 { | 57 { |
| 58 return 0.0; | 58 return 0.0; |
| 59 } | 59 } |
| 60 | 60 |
| 61 int runTestSuite(base::TestSuite* testSuite) | 61 int runTestSuite(base::TestSuite* testSuite) |
| 62 { | 62 { |
| 63 int result = testSuite->Run(); | 63 int result = testSuite->Run(); |
| 64 blink::Heap::collectAllGarbage(); | 64 blink::ThreadHeap::collectAllGarbage(); |
| 65 return result; | 65 return result; |
| 66 } | 66 } |
| 67 | 67 |
| 68 class DummyPlatform final : public blink::Platform { | 68 class DummyPlatform final : public blink::Platform { |
| 69 public: | 69 public: |
| 70 DummyPlatform() { } | 70 DummyPlatform() { } |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 } // namespace | 73 } // namespace |
| 74 | 74 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 87 WTF::initialize(); | 87 WTF::initialize(); |
| 88 WTF::initializeMainThread(0); | 88 WTF::initializeMainThread(0); |
| 89 blink::CompositorFactory::initializeDefault(); | 89 blink::CompositorFactory::initializeDefault(); |
| 90 int result = 0; | 90 int result = 0; |
| 91 { | 91 { |
| 92 blink::TestingPlatformSupport::Config platformConfig; | 92 blink::TestingPlatformSupport::Config platformConfig; |
| 93 cc_blink::WebCompositorSupportImpl compositorSupport; | 93 cc_blink::WebCompositorSupportImpl compositorSupport; |
| 94 platformConfig.compositorSupport = &compositorSupport; | 94 platformConfig.compositorSupport = &compositorSupport; |
| 95 blink::TestingPlatformSupport platform(platformConfig); | 95 blink::TestingPlatformSupport platform(platformConfig); |
| 96 | 96 |
| 97 blink::Heap::init(); | 97 blink::ProcessHeap::init(); |
| 98 blink::ThreadState::attachMainThread(); | 98 blink::ThreadState::attachMainThread(); |
| 99 blink::ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr
); | 99 blink::ThreadState::current()->registerTraceDOMWrappers(nullptr, nullptr
); |
| 100 blink::EventTracer::initialize(); | 100 blink::EventTracer::initialize(); |
| 101 blink::HTTPNames::init(); | 101 blink::HTTPNames::init(); |
| 102 | 102 |
| 103 base::TestSuite testSuite(argc, argv); | 103 base::TestSuite testSuite(argc, argv); |
| 104 | 104 |
| 105 mojo::edk::Init(); | 105 mojo::edk::Init(); |
| 106 base::TestIOThread testIoThread(base::TestIOThread::kAutoStart); | 106 base::TestIOThread testIoThread(base::TestIOThread::kAutoStart); |
| 107 WTF::OwnPtr<mojo::edk::test::ScopedIPCSupport> ipcSupport(adoptPtr(new m
ojo::edk::test::ScopedIPCSupport(testIoThread.task_runner()))); | 107 WTF::OwnPtr<mojo::edk::test::ScopedIPCSupport> ipcSupport(adoptPtr(new m
ojo::edk::test::ScopedIPCSupport(testIoThread.task_runner()))); |
| 108 result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base
::Unretained(&testSuite))); | 108 result = base::LaunchUnitTests(argc, argv, base::Bind(runTestSuite, base
::Unretained(&testSuite))); |
| 109 | 109 |
| 110 blink::ThreadState::detachMainThread(); | 110 blink::ThreadState::detachMainThread(); |
| 111 blink::Heap::shutdown(); | 111 blink::ProcessHeap::shutdown(); |
| 112 } | 112 } |
| 113 blink::CompositorFactory::shutdown(); | 113 blink::CompositorFactory::shutdown(); |
| 114 WTF::shutdown(); | 114 WTF::shutdown(); |
| 115 WTF::Partitions::shutdown(); | 115 WTF::Partitions::shutdown(); |
| 116 return result; | 116 return result; |
| 117 } | 117 } |
| OLD | NEW |