Chromium Code Reviews| Index: third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h |
| diff --git a/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h b/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8046e6089b0929a21ffbbcf763a6a66e42cd5ab1 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/modules/payments/PaymentRequestTestBase.h |
| @@ -0,0 +1,36 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef PaymentRequestTestBase_h |
| +#define PaymentRequestTestBase_h |
| + |
| +#include "bindings/core/v8/ExceptionState.h" |
| +#include "testing/gtest/include/gtest/gtest.h" |
| +#include "wtf/OwnPtr.h" |
| +#include "wtf/text/WTFString.h" |
| + |
| +namespace blink { |
| + |
| +class DummyPageHolder; |
| +class ScriptState; |
| + |
| +// A base fixture for PaymentRequest tests. |
| +class PaymentRequestTestBase : public testing::Test { |
|
haraken
2016/06/09 01:57:59
Can we use ScriptStateForTesting?
please use gerrit instead
2016/06/09 22:36:14
ScriptStateForTesting needs an isolate(), which I
haraken
2016/06/10 00:15:12
You can use v8::Isolate::GetCurrent().
Or if you
please use gerrit instead
2016/06/10 21:18:20
After experimenting, turns out I need a document w
|
| +public: |
| + PaymentRequestTestBase(); |
| + ~PaymentRequestTestBase() override; |
| + |
| + ScriptState* getScriptState(); |
| + ExceptionState& getExceptionState(); |
| + |
| + void setSecurityOrigin(const String&); |
| + |
| +private: |
| + OwnPtr<DummyPageHolder> m_page; |
| + TrackExceptionState m_exceptionState; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // PaymentRequestTestBase_h |