| 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/callback.h" |
| 7 #include "base/feature_list.h" | 8 #include "base/feature_list.h" |
| 8 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 9 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 10 #include "base/files/scoped_temp_dir.h" | 11 #include "base/files/scoped_temp_dir.h" |
| 11 #include "base/macros.h" | 12 #include "base/macros.h" |
| 12 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 13 #include "base/path_service.h" | 14 #include "base/path_service.h" |
| 14 #include "base/single_thread_task_runner.h" | 15 #include "base/single_thread_task_runner.h" |
| 15 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 16 #include "base/threading/platform_thread.h" | 17 #include "base/threading/platform_thread.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 | 58 |
| 58 using blink::WebString; | 59 using blink::WebString; |
| 59 | 60 |
| 60 namespace { | 61 namespace { |
| 61 | 62 |
| 62 class DummyTaskRunner : public base::SingleThreadTaskRunner { | 63 class DummyTaskRunner : public base::SingleThreadTaskRunner { |
| 63 public: | 64 public: |
| 64 DummyTaskRunner() : thread_id_(base::PlatformThread::CurrentId()) {} | 65 DummyTaskRunner() : thread_id_(base::PlatformThread::CurrentId()) {} |
| 65 | 66 |
| 66 bool PostDelayedTask(const tracked_objects::Location& from_here, | 67 bool PostDelayedTask(const tracked_objects::Location& from_here, |
| 67 const base::Closure& task, | 68 base::Closure task, |
| 68 base::TimeDelta delay) override { | 69 base::TimeDelta delay) override { |
| 69 // Drop the delayed task. | 70 // Drop the delayed task. |
| 70 return false; | 71 return false; |
| 71 } | 72 } |
| 72 | 73 |
| 73 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 74 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
| 74 const base::Closure& task, | 75 base::Closure task, |
| 75 base::TimeDelta delay) override { | 76 base::TimeDelta delay) override { |
| 76 // Drop the delayed task. | 77 // Drop the delayed task. |
| 77 return false; | 78 return false; |
| 78 } | 79 } |
| 79 | 80 |
| 80 bool RunsTasksOnCurrentThread() const override { | 81 bool RunsTasksOnCurrentThread() const override { |
| 81 return thread_id_ == base::PlatformThread::CurrentId(); | 82 return thread_id_ == base::PlatformThread::CurrentId(); |
| 82 } | 83 } |
| 83 | 84 |
| 84 protected: | 85 protected: |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 blink::WebRTCCertificateGenerator* | 349 blink::WebRTCCertificateGenerator* |
| 349 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() { | 350 TestBlinkWebUnitTestSupport::createRTCCertificateGenerator() { |
| 350 #if BUILDFLAG(ENABLE_WEBRTC) | 351 #if BUILDFLAG(ENABLE_WEBRTC) |
| 351 return new TestWebRTCCertificateGenerator(); | 352 return new TestWebRTCCertificateGenerator(); |
| 352 #else | 353 #else |
| 353 return nullptr; | 354 return nullptr; |
| 354 #endif | 355 #endif |
| 355 } | 356 } |
| 356 | 357 |
| 357 } // namespace content | 358 } // namespace content |
| OLD | NEW |