blob: d6cec6ed55d792c7f5471218292d0bb80ac67a29 [file] [log] [blame]
David Ghandehari60170302017-03-10 21:18:13 -08001// Copyright 2015 Google Inc. All Rights Reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
David Ghandehari9e5b5872016-07-28 09:50:04 -070014
15#ifndef COBALT_BINDINGS_TESTING_NAMED_CONSTRUCTOR_INTERFACE_H_
16#define COBALT_BINDINGS_TESTING_NAMED_CONSTRUCTOR_INTERFACE_H_
17
18#include "base/lazy_instance.h"
19#include "cobalt/script/wrappable.h"
20#include "testing/gmock/include/gmock/gmock.h"
21
22namespace cobalt {
23namespace bindings {
24namespace testing {
25
26class NamedConstructorInterface : public script::Wrappable {
27 public:
28 class ConstructorImplementationMock {
29 public:
30 MOCK_METHOD0(Constructor, void());
31 };
32 NamedConstructorInterface() {
33 constructor_implementation_mock.Get().Constructor();
34 }
35
36 DEFINE_WRAPPABLE_TYPE(NamedConstructorInterface);
37
38 static base::LazyInstance< ::testing::StrictMock<
39 ConstructorImplementationMock> > constructor_implementation_mock;
40};
41
42} // namespace testing
43} // namespace bindings
44} // namespace cobalt
45
46#endif // COBALT_BINDINGS_TESTING_NAMED_CONSTRUCTOR_INTERFACE_H_