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

Side by Side Diff: media/blink/run_all_unittests.cc

Issue 1419293005: Add assertions that the empty Platform::cryptographicallyRandomValues() overrides are not being use… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to RELEASE_ASSERT and use base::RandBytes() in Chromium. Created 5 years, 1 month 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
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « components/test_runner/test_common.cc ('k') | third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698