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/feature_list.h" | 7 #include "base/feature_list.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/file_util.h" | 9 #include "base/files/file_util.h" |
10 #include "base/files/scoped_temp_dir.h" | 10 #include "base/files/scoped_temp_dir.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "gin/v8_initializer.h" | 46 #include "gin/v8_initializer.h" |
47 #endif | 47 #endif |
48 | 48 |
49 namespace { | 49 namespace { |
50 | 50 |
51 class DummyTaskRunner : public base::SingleThreadTaskRunner { | 51 class DummyTaskRunner : public base::SingleThreadTaskRunner { |
52 public: | 52 public: |
53 DummyTaskRunner() : thread_id_(base::PlatformThread::CurrentId()) {} | 53 DummyTaskRunner() : thread_id_(base::PlatformThread::CurrentId()) {} |
54 | 54 |
55 bool PostDelayedTask(const tracked_objects::Location& from_here, | 55 bool PostDelayedTask(const tracked_objects::Location& from_here, |
56 const base::Closure& task, | 56 base::OnceClosure task, |
57 base::TimeDelta delay) override { | 57 base::TimeDelta delay) override { |
58 // Drop the delayed task. | 58 // Drop the delayed task. |
59 return false; | 59 return false; |
60 } | 60 } |
61 | 61 |
62 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, | 62 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, |
63 const base::Closure& task, | 63 base::OnceClosure task, |
64 base::TimeDelta delay) override { | 64 base::TimeDelta delay) override { |
65 // Drop the delayed task. | 65 // Drop the delayed task. |
66 return false; | 66 return false; |
67 } | 67 } |
68 | 68 |
69 bool RunsTasksOnCurrentThread() const override { | 69 bool RunsTasksOnCurrentThread() const override { |
70 return thread_id_ == base::PlatformThread::CurrentId(); | 70 return thread_id_ == base::PlatformThread::CurrentId(); |
71 } | 71 } |
72 | 72 |
73 protected: | 73 protected: |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 | 287 |
288 void TestBlinkWebUnitTestSupport::getPluginList( | 288 void TestBlinkWebUnitTestSupport::getPluginList( |
289 bool refresh, | 289 bool refresh, |
290 const blink::WebSecurityOrigin& mainFrameOrigin, | 290 const blink::WebSecurityOrigin& mainFrameOrigin, |
291 blink::WebPluginListBuilder* builder) { | 291 blink::WebPluginListBuilder* builder) { |
292 builder->addPlugin("pdf", "pdf", "pdf-files"); | 292 builder->addPlugin("pdf", "pdf", "pdf-files"); |
293 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); | 293 builder->addMediaTypeToLastPlugin("application/pdf", "pdf"); |
294 } | 294 } |
295 | 295 |
296 } // namespace content | 296 } // namespace content |
OLD | NEW |