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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp

Issue 2048823004: PaymentRequest.abort() should return a promise. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include what you use Created 4 years, 6 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/bindings/core/v8/V8BindingForTesting.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp b/third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp
index c992e3cfa06b6241a4226dea07fa31e37cf7571c..02a5dd18adf10339af8236238db52cec9c174448 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8BindingForTesting.cpp
@@ -5,7 +5,7 @@
#include "bindings/core/v8/V8BindingForTesting.h"
#include "bindings/core/v8/DOMWrapperWorld.h"
-#include "core/dom/ExecutionContext.h"
+#include "core/testing/DummyPageHolder.h"
namespace blink {
@@ -33,6 +33,20 @@ void ScriptStateForTesting::setExecutionContext(ExecutionContext* executionConte
m_executionContext = executionContext;
}
+ScriptStateForTestingWithPage::ScriptStateForTestingWithPage()
+ : m_page(DummyPageHolder::create())
+{
+}
+
+ScriptStateForTestingWithPage::~ScriptStateForTestingWithPage()
+{
+}
+
+ScriptState* ScriptStateForTestingWithPage::getScriptState()
+{
+ return ScriptState::forMainWorld(m_page->document().frame());
+}
+
V8TestingScope::V8TestingScope(v8::Isolate* isolate)
: m_handleScope(isolate)
, m_contextScope(v8::Context::New(isolate))

Powered by Google App Engine
This is Rietveld 408576698