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

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: Last few changes Sami requested Created 5 years 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 ASSERT_NOT_REACHED(); 130 ASSERT_NOT_REACHED();
131 return nullptr; 131 return nullptr;
132 } 132 }
133 133
134 void shutdown() override {} 134 void shutdown() override {}
135 bool shouldYieldForHighPriorityWork() override { return false; } 135 bool shouldYieldForHighPriorityWork() override { return false; }
136 bool canExceedIdleDeadlineIfRequired() override { return false; } 136 bool canExceedIdleDeadlineIfRequired() override { return false; }
137 void postIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { } 137 void postIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { }
138 void postNonNestableIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { } 138 void postNonNestableIdleTask(const WebTraceLocation&, WebThread::IdleTask*) override { }
139 void postIdleTaskAfterWakeup(const WebTraceLocation&, WebThread::IdleTask*) override { } 139 void postIdleTaskAfterWakeup(const WebTraceLocation&, WebThread::IdleTask*) override { }
140 void postTimerTaskAt(const WebTraceLocation&, WebTaskRunner::Task*, double m onotonicTime) override { }
141 WebPassOwnPtr<WebViewScheduler> createWebViewScheduler(blink::WebView*) over ride { return nullptr; } 140 WebPassOwnPtr<WebViewScheduler> createWebViewScheduler(blink::WebView*) over ride { return nullptr; }
142 void suspendTimerQueue() override { } 141 void suspendTimerQueue() override { }
143 void resumeTimerQueue() override { } 142 void resumeTimerQueue() override { }
144 void addPendingNavigation() override { } 143 void addPendingNavigation() override { }
145 void removePendingNavigation() override { } 144 void removePendingNavigation() override { }
146 void onNavigationStarted() override { } 145 void onNavigationStarted() override { }
147 146
148 private: 147 private:
149 MockWebThread m_mockWebThread; 148 MockWebThread m_mockWebThread;
150 Deque<OwnPtr<WebTaskRunner::Task>> m_tasks; 149 Deque<OwnPtr<WebTaskRunner::Task>> m_tasks;
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 #endif 553 #endif
555 554
556 // m_scriptRunner is gone. We need to make sure that ScriptRunner::Task do n ot access dead object. 555 // m_scriptRunner is gone. We need to make sure that ScriptRunner::Task do n ot access dead object.
557 EXPECT_CALL(*scriptLoader1, execute()).Times(0); 556 EXPECT_CALL(*scriptLoader1, execute()).Times(0);
558 EXPECT_CALL(*scriptLoader2, execute()).Times(0); 557 EXPECT_CALL(*scriptLoader2, execute()).Times(0);
559 558
560 m_platform.runAllTasks(); 559 m_platform.runAllTasks();
561 } 560 }
562 561
563 } // namespace blink 562 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ExecutionContext.h ('k') | third_party/WebKit/Source/core/frame/DOMTimer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698