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

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

Issue 1424053002: Adds a flag to support "Virtual Time" to the blink scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased 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
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test/launcher/unit_test_launcher.h" 7 #include "base/test/launcher/unit_test_launcher.h"
8 #include "base/test/test_suite.h" 8 #include "base/test/test_suite.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "components/scheduler/child/scheduler_task_runner_delegate_impl.h" 10 #include "components/scheduler/child/scheduler_tqm_delegate_impl.h"
11 #include "components/scheduler/child/web_task_runner_impl.h" 11 #include "components/scheduler/child/web_task_runner_impl.h"
12 #include "components/scheduler/renderer/renderer_scheduler_impl.h" 12 #include "components/scheduler/renderer/renderer_scheduler_impl.h"
13 #include "components/scheduler/renderer/renderer_web_scheduler_impl.h" 13 #include "components/scheduler/renderer/renderer_web_scheduler_impl.h"
14 #include "components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tes ts.h" 14 #include "components/scheduler/test/lazy_scheduler_message_loop_delegate_for_tes ts.h"
15 #include "media/base/media.h" 15 #include "media/base/media.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/include/gtest/gtest.h"
17 #include "third_party/WebKit/public/platform/WebScheduler.h" 17 #include "third_party/WebKit/public/platform/WebScheduler.h"
18 #include "third_party/WebKit/public/platform/WebTaskRunner.h" 18 #include "third_party/WebKit/public/platform/WebTaskRunner.h"
19 #include "third_party/WebKit/public/platform/WebThread.h" 19 #include "third_party/WebKit/public/platform/WebThread.h"
20 #include "third_party/WebKit/public/web/WebKit.h" 20 #include "third_party/WebKit/public/web/WebKit.h"
(...skipping 29 matching lines...) Expand all
50 50
51 bool isCurrentThread() const override { return true; } 51 bool isCurrentThread() const override { return true; }
52 52
53 blink::PlatformThreadId threadId() const override { return 17; } 53 blink::PlatformThreadId threadId() const override { return 17; }
54 54
55 blink::WebScheduler* scheduler() const override { 55 blink::WebScheduler* scheduler() const override {
56 return web_scheduler_.get(); 56 return web_scheduler_.get();
57 } 57 }
58 58
59 private: 59 private:
60 scoped_refptr<scheduler::SchedulerTaskRunnerDelegate> task_runner_delegate_; 60 scoped_refptr<scheduler::SchedulerTqmDelegate> task_runner_delegate_;
61 scoped_ptr<scheduler::RendererScheduler> scheduler_; 61 scoped_ptr<scheduler::RendererScheduler> scheduler_;
62 scoped_ptr<blink::WebScheduler> web_scheduler_; 62 scoped_ptr<blink::WebScheduler> web_scheduler_;
63 scoped_ptr<blink::WebTaskRunner> web_task_runner_; 63 scoped_ptr<blink::WebTaskRunner> web_task_runner_;
64 }; 64 };
65 65
66 class TestBlinkPlatformSupport : NON_EXPORTED_BASE(public blink::Platform) { 66 class TestBlinkPlatformSupport : NON_EXPORTED_BASE(public blink::Platform) {
67 public: 67 public:
68 ~TestBlinkPlatformSupport() override; 68 ~TestBlinkPlatformSupport() override;
69 69
70 void cryptographicallyRandomValues(unsigned char* buffer, 70 void cryptographicallyRandomValues(unsigned char* buffer,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 blink::initialize(blink_platform_support_.get()); 139 blink::initialize(blink_platform_support_.get());
140 } 140 }
141 141
142 int main(int argc, char** argv) { 142 int main(int argc, char** argv) {
143 BlinkMediaTestSuite test_suite(argc, argv); 143 BlinkMediaTestSuite test_suite(argc, argv);
144 144
145 return base::LaunchUnitTests( 145 return base::LaunchUnitTests(
146 argc, argv, base::Bind(&BlinkMediaTestSuite::Run, 146 argc, argv, base::Bind(&BlinkMediaTestSuite::Run,
147 base::Unretained(&test_suite))); 147 base::Unretained(&test_suite)));
148 } 148 }
OLDNEW
« no previous file with comments | « content/content_browser.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698