OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 7 #include "base/rand_util.h" |
7 #include "base/test/launcher/unit_test_launcher.h" | 8 #include "base/test/launcher/unit_test_launcher.h" |
8 #include "base/test/test_suite.h" | 9 #include "base/test/test_suite.h" |
9 #include "build/build_config.h" | 10 #include "build/build_config.h" |
10 #include "components/scheduler/child/scheduler_task_runner_delegate_impl.h" | 11 #include "components/scheduler/child/scheduler_task_runner_delegate_impl.h" |
11 #include "components/scheduler/child/web_task_runner_impl.h" | 12 #include "components/scheduler/child/web_task_runner_impl.h" |
12 #include "components/scheduler/renderer/renderer_scheduler_impl.h" | 13 #include "components/scheduler/renderer/renderer_scheduler_impl.h" |
13 #include "components/scheduler/renderer/renderer_web_scheduler_impl.h" | 14 #include "components/scheduler/renderer/renderer_web_scheduler_impl.h" |
14 #include "components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tes
ts.h" | 15 #include "components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tes
ts.h" |
15 #include "media/base/media.h" | 16 #include "media/base/media.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 | 76 |
76 private: | 77 private: |
77 CurrentThreadMock m_currentThread; | 78 CurrentThreadMock m_currentThread; |
78 }; | 79 }; |
79 | 80 |
80 TestBlinkPlatformSupport::~TestBlinkPlatformSupport() {} | 81 TestBlinkPlatformSupport::~TestBlinkPlatformSupport() {} |
81 | 82 |
82 void TestBlinkPlatformSupport::cryptographicallyRandomValues( | 83 void TestBlinkPlatformSupport::cryptographicallyRandomValues( |
83 unsigned char* buffer, | 84 unsigned char* buffer, |
84 size_t length) { | 85 size_t length) { |
| 86 base::RandBytes(buffer, length); |
85 } | 87 } |
86 | 88 |
87 const unsigned char* TestBlinkPlatformSupport::getTraceCategoryEnabledFlag( | 89 const unsigned char* TestBlinkPlatformSupport::getTraceCategoryEnabledFlag( |
88 const char* categoryName) { | 90 const char* categoryName) { |
89 static const unsigned char tracingIsDisabled = 0; | 91 static const unsigned char tracingIsDisabled = 0; |
90 return &tracingIsDisabled; | 92 return &tracingIsDisabled; |
91 } | 93 } |
92 | 94 |
93 class BlinkMediaTestSuite : public base::TestSuite { | 95 class BlinkMediaTestSuite : public base::TestSuite { |
94 public: | 96 public: |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 blink::initialize(blink_platform_support_.get()); | 141 blink::initialize(blink_platform_support_.get()); |
140 } | 142 } |
141 | 143 |
142 int main(int argc, char** argv) { | 144 int main(int argc, char** argv) { |
143 BlinkMediaTestSuite test_suite(argc, argv); | 145 BlinkMediaTestSuite test_suite(argc, argv); |
144 | 146 |
145 return base::LaunchUnitTests( | 147 return base::LaunchUnitTests( |
146 argc, argv, base::Bind(&BlinkMediaTestSuite::Run, | 148 argc, argv, base::Bind(&BlinkMediaTestSuite::Run, |
147 base::Unretained(&test_suite))); | 149 base::Unretained(&test_suite))); |
148 } | 150 } |
OLD | NEW |