OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "config.h" | 5 #include "config.h" |
6 #include "core/dom/ScriptRunner.h" | 6 #include "core/dom/ScriptRunner.h" |
7 | 7 |
8 #include "core/dom/Document.h" | 8 #include "core/dom/Document.h" |
9 #include "core/dom/Element.h" | 9 #include "core/dom/Element.h" |
10 #include "core/dom/ScriptLoader.h" | 10 #include "core/dom/ScriptLoader.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 }; | 95 }; |
96 | 96 |
97 class MockPlatform : public Platform, private WebScheduler { | 97 class MockPlatform : public Platform, private WebScheduler { |
98 public: | 98 public: |
99 MockPlatform() | 99 MockPlatform() |
100 : m_mockWebThread(this) | 100 : m_mockWebThread(this) |
101 , m_mockWebTaskRunner(&m_tasks) | 101 , m_mockWebTaskRunner(&m_tasks) |
102 { | 102 { |
103 } | 103 } |
104 | 104 |
105 void cryptographicallyRandomValues(unsigned char* buffer, size_t length) ove
rride { } | 105 void cryptographicallyRandomValues(unsigned char* buffer, size_t length) ove
rride |
| 106 { |
| 107 ASSERT_NOT_REACHED(); |
| 108 } |
106 | 109 |
107 const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) o
verride | 110 const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) o
verride |
108 { | 111 { |
109 static const unsigned char tracingIsDisabled = 0; | 112 static const unsigned char tracingIsDisabled = 0; |
110 return &tracingIsDisabled; | 113 return &tracingIsDisabled; |
111 } | 114 } |
112 | 115 |
113 WebThread* currentThread() override { return &m_mockWebThread; } | 116 WebThread* currentThread() override { return &m_mockWebThread; } |
114 | 117 |
115 WebTaskRunner* loadingTaskRunner() override | 118 WebTaskRunner* loadingTaskRunner() override |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 #endif | 552 #endif |
550 | 553 |
551 // m_scriptRunner is gone. We need to make sure that ScriptRunner::Task do n
ot access dead object. | 554 // m_scriptRunner is gone. We need to make sure that ScriptRunner::Task do n
ot access dead object. |
552 EXPECT_CALL(*scriptLoader1, execute()).Times(0); | 555 EXPECT_CALL(*scriptLoader1, execute()).Times(0); |
553 EXPECT_CALL(*scriptLoader2, execute()).Times(0); | 556 EXPECT_CALL(*scriptLoader2, execute()).Times(0); |
554 | 557 |
555 m_platform.runAllTasks(); | 558 m_platform.runAllTasks(); |
556 } | 559 } |
557 | 560 |
558 } // namespace blink | 561 } // namespace blink |
OLD | NEW |