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

Unified Diff: third_party/WebKit/Source/core/timing/PerformanceBaseTest.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/PerformanceBaseTest.cpp
diff --git a/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp b/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp
index 78ac9997ac67ec5fa01482e22b802f37df0c81e2..2cbe04647df76423697db029fa893b958c932f16 100644
--- a/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp
+++ b/third_party/WebKit/Source/core/timing/PerformanceBaseTest.cpp
@@ -6,6 +6,7 @@
#include "bindings/core/v8/PerformanceObserverCallback.h"
#include "bindings/core/v8/V8BindingForTesting.h"
+#include "core/dom/TaskRunnerHelper.h"
#include "core/testing/DummyPageHolder.h"
#include "core/testing/NullExecutionContext.h"
#include "core/timing/PerformanceBase.h"
@@ -19,7 +20,11 @@ namespace blink {
class TestPerformanceBase : public PerformanceBase {
public:
- TestPerformanceBase() : PerformanceBase(0) {}
+ explicit TestPerformanceBase(ScriptState* scriptState)
+ : PerformanceBase(
+ 0,
+ TaskRunnerHelper::get(TaskType::PerformanceTimeline, scriptState)) {
+ }
~TestPerformanceBase() {}
ExecutionContext* getExecutionContext() const override { return nullptr; }
@@ -40,7 +45,7 @@ class PerformanceBaseTest : public ::testing::Test {
void initialize(ScriptState* scriptState) {
v8::Local<v8::Function> callback =
v8::Function::New(scriptState->context(), nullptr).ToLocalChecked();
- m_base = new TestPerformanceBase();
+ m_base = new TestPerformanceBase(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