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

Side by Side Diff: third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp

Issue 1441073006: Move throttling of background timers into the renderer scheduler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Try again for MSVC 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
OLDNEW
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 ASSERT_NOT_REACHED(); 140 ASSERT_NOT_REACHED();
141 return nullptr; 141 return nullptr;
142 } 142 }
143 143
144 void shutdown() override {} 144 void shutdown() override {}
145 bool shouldYieldForHighPriorityWork() override { return false; } 145 bool shouldYieldForHighPriorityWork() override { return false; }
146 bool canExceedIdleDeadlineIfRequired() override { return false; } 146 bool canExceedIdleDeadlineIfRequired() override { return false; }
147 void postIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { } 147 void postIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { }
148 void postNonNestableIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { } 148 void postNonNestableIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { }
149 void postIdleTaskAfterWakeup(const WebTraceLocation&, WebThread::IdleTask*) override { } 149 void postIdleTaskAfterWakeup(const WebTraceLocation&, WebThread::IdleTask*) override { }
150 void postTimerTaskAt(const WebTraceLocation&, WebTaskRunner::Task*, double m onotonicTime) override { }
151 WebPassOwnPtr<WebViewScheduler> createWebViewScheduler(blink::WebView*) over ride { return nullptr; } 150 WebPassOwnPtr<WebViewScheduler> createWebViewScheduler(blink::WebView*) over ride { return nullptr; }
152 void suspendTimerQueue() override { } 151 void suspendTimerQueue() override { }
153 void resumeTimerQueue() override { } 152 void resumeTimerQueue() override { }
154 void addPendingNavigation() override { } 153 void addPendingNavigation() override { }
155 void removePendingNavigation() override { } 154 void removePendingNavigation() override { }
156 void onNavigationStarted() override { } 155 void onNavigationStarted() override { }
157 156
158 private: 157 private:
159 MockWebThread m_mockWebThread; 158 MockWebThread m_mockWebThread;
160 Deque<OwnPtr<WebTaskRunner::Task>> m_tasks; 159 Deque<OwnPtr<WebTaskRunner::Task>> m_tasks;
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 #endif 567 #endif
569 568
570 // m_scriptRunner is gone. We need to make sure that ScriptRunner::Task do n ot access dead object. 569 // m_scriptRunner is gone. We need to make sure that ScriptRunner::Task do n ot access dead object.
571 EXPECT_CALL(*scriptLoader1, execute()).Times(0); 570 EXPECT_CALL(*scriptLoader1, execute()).Times(0);
572 EXPECT_CALL(*scriptLoader2, execute()).Times(0); 571 EXPECT_CALL(*scriptLoader2, execute()).Times(0);
573 572
574 m_platform.runAllTasks(); 573 m_platform.runAllTasks();
575 } 574 }
576 575
577 } // namespace blink 576 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698