OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/test/test_blink_web_unit_test_support.h" | 5 #include "content/test/test_blink_web_unit_test_support.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // should be no task posted to this task runner. The message loop is not | 103 // should be no task posted to this task runner. The message loop is not |
104 // created before this initialization because some tests need specific kinds | 104 // created before this initialization because some tests need specific kinds |
105 // of message loops, and their types are not known upfront. Some tests also | 105 // of message loops, and their types are not known upfront. Some tests also |
106 // create their own thread bundles or message loops, and doing the same in | 106 // create their own thread bundles or message loops, and doing the same in |
107 // TestBlinkWebUnitTestSupport would introduce a conflict. | 107 // TestBlinkWebUnitTestSupport would introduce a conflict. |
108 dummy_task_runner = make_scoped_refptr(new DummyTaskRunner()); | 108 dummy_task_runner = make_scoped_refptr(new DummyTaskRunner()); |
109 dummy_task_runner_handle.reset( | 109 dummy_task_runner_handle.reset( |
110 new base::ThreadTaskRunnerHandle(dummy_task_runner)); | 110 new base::ThreadTaskRunnerHandle(dummy_task_runner)); |
111 } | 111 } |
112 renderer_scheduler_ = make_scoped_ptr(new scheduler::RendererSchedulerImpl( | 112 renderer_scheduler_ = make_scoped_ptr(new scheduler::RendererSchedulerImpl( |
113 scheduler::LazySchedulerMessageLoopDelegateForTests::Create())); | 113 scheduler::LazySchedulerMessageLoopDelegateForTests::Create(), |
| 114 scheduler::RendererSchedulerImpl::TimeSource::NORMAL)); |
114 web_thread_.reset(new scheduler::WebThreadImplForRendererScheduler( | 115 web_thread_.reset(new scheduler::WebThreadImplForRendererScheduler( |
115 renderer_scheduler_.get())); | 116 renderer_scheduler_.get())); |
116 | 117 |
117 blink::initialize(this); | 118 blink::initialize(this); |
118 blink::setLayoutTestMode(true); | 119 blink::setLayoutTestMode(true); |
119 blink::WebRuntimeFeatures::enableApplicationCache(true); | 120 blink::WebRuntimeFeatures::enableApplicationCache(true); |
120 blink::WebRuntimeFeatures::enableDatabase(true); | 121 blink::WebRuntimeFeatures::enableDatabase(true); |
121 blink::WebRuntimeFeatures::enableNotifications(true); | 122 blink::WebRuntimeFeatures::enableNotifications(true); |
122 blink::WebRuntimeFeatures::enableTouch(true); | 123 blink::WebRuntimeFeatures::enableTouch(true); |
123 | 124 |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 base::MessageLoop::current()->QuitWhenIdle(); | 370 base::MessageLoop::current()->QuitWhenIdle(); |
370 } | 371 } |
371 | 372 |
372 void TestBlinkWebUnitTestSupport::getPluginList( | 373 void TestBlinkWebUnitTestSupport::getPluginList( |
373 bool refresh, blink::WebPluginListBuilder* builder) { | 374 bool refresh, blink::WebPluginListBuilder* builder) { |
374 builder->addPlugin("pdf", "pdf", "pdf-files"); | 375 builder->addPlugin("pdf", "pdf", "pdf-files"); |
375 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); | 376 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); |
376 } | 377 } |
377 | 378 |
378 } // namespace content | 379 } // namespace content |
OLD | NEW |