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

Unified Diff: third_party/WebKit/Source/modules/payments/PaymentTestHelper.h

Issue 2145553002: Parameterize OnError method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Parameterize OnError method. Created 4 years, 5 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/modules/payments/PaymentTestHelper.h
diff --git a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
index b19b1a15c140e50944260784814fb8396d4eebdf..f8b9c02618bc99ce3b2fc0e9fbd47c5fad422342 100644
--- a/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
+++ b/third_party/WebKit/Source/modules/payments/PaymentTestHelper.h
@@ -6,6 +6,7 @@
#define PaymentTestHelper_h
#include "bindings/core/v8/ScriptFunction.h"
+#include "bindings/core/v8/V8DOMException.h"
#include "modules/payments/PaymentDetails.h"
#include "modules/payments/PaymentItem.h"
#include "modules/payments/PaymentShippingOption.h"
@@ -68,14 +69,22 @@ public:
~PaymentRequestMockFunctionScope();
v8::Local<v8::Function> expectCall();
+ v8::Local<v8::Function> expectCall(String*);
v8::Local<v8::Function> expectNoCall();
private:
class MockFunction : public ScriptFunction {
public:
explicit MockFunction(ScriptState*);
+ explicit MockFunction(ScriptState*, String *captor);
please use gerrit instead 2016/07/12 15:57:36 Remove "explicit" on this line. The keyword "expli
pals 2016/07/13 05:54:28 Done.
v8::Local<v8::Function> bind();
- MOCK_METHOD1(call, ScriptValue(ScriptValue));
+ // MOCK_METHOD1(call, ScriptValue(ScriptValue));
please use gerrit instead 2016/07/12 15:57:36 Leave MOCK_METHOD1() unmodified.
pals 2016/07/13 05:54:28 Done.
+ ScriptValue call(ScriptValue value) override
please use gerrit instead 2016/07/12 15:57:36 Remove this method.
pals 2016/07/13 05:54:28 Done.
+ {
+ *m_value = toCoreString(value.v8Value()->ToString(getScriptState()->context()).ToLocalChecked());
+ return value;
+ }
+ String* m_value;
};
ScriptState* m_scriptState;

Powered by Google App Engine
This is Rietveld 408576698