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

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp

Issue 2646933002: Move PerformanceBase to TaskRunnerTimer. (Closed)
Patch Set: unneeded includes Created 3 years, 11 months 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp
diff --git a/third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp b/third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp
index 8d6a66d70205cb3abec62444bf7362df419d30e0..f63c8b280ebf267175ffaa824982cc808ed4ca6a 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp
+++ b/third_party/WebKit/Source/core/timing/PerformanceObserverTest.cpp
@@ -6,6 +6,7 @@
#include "bindings/core/v8/PerformanceObserverCallback.h"
#include "bindings/core/v8/V8BindingForTesting.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/timing/Performance.h"
#include "core/timing/PerformanceBase.h"
#include "core/timing/PerformanceMark.h"
@@ -16,7 +17,11 @@ namespace blink {
class MockPerformanceBase : public PerformanceBase {
public:
- MockPerformanceBase() : PerformanceBase(0) {}
+ explicit MockPerformanceBase(ScriptState* scriptState)
+ : PerformanceBase(
+ 0,
+ TaskRunnerHelper::get(TaskType::PerformanceTimeline, scriptState)) {
+ }
~MockPerformanceBase() {}
ExecutionContext* getExecutionContext() const override { return nullptr; }
@@ -27,7 +32,7 @@ class PerformanceObserverTest : public ::testing::Test {
void initialize(ScriptState* scriptState) {
v8::Local<v8::Function> callback =
v8::Function::New(scriptState->context(), nullptr).ToLocalChecked();
- m_base = new MockPerformanceBase();
+ m_base = new MockPerformanceBase(scriptState);
m_cb = PerformanceObserverCallback::create(scriptState, callback);
m_observer = PerformanceObserver::create(scriptState->getExecutionContext(),
m_base, m_cb);

Powered by Google App Engine
This is Rietveld 408576698