Respond with QuotaExceededError when IndexedDB has no disk space on open.
[chromium-blink-merge.git] / content / gpu / gpu_idirect3d9_mock_win.h
blob1902bd5a10e55b7dfd9d957c59b80e8a28816326
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CONTENT_GPU_GPU_IDIRECT3D9_MOCK_WIN_H_
6 #define CONTENT_GPU_GPU_IDIRECT3D9_MOCK_WIN_H_
8 #include <d3d9.h>
9 #include <windows.h>
11 #include "testing/gmock/include/gmock/gmock.h"
13 class IDirect3D9Mock : public IDirect3D9 {
14 public:
15 IDirect3D9Mock();
16 virtual ~IDirect3D9Mock();
18 MOCK_METHOD5_WITH_CALLTYPE(
19 STDMETHODCALLTYPE, CheckDepthStencilMatch,
20 HRESULT(UINT Adapter, D3DDEVTYPE DeviceType,
21 D3DFORMAT AdapterFormat, D3DFORMAT RenderTargetFormat,
22 D3DFORMAT DepthStencilFormat));
23 MOCK_METHOD6_WITH_CALLTYPE(
24 STDMETHODCALLTYPE, CheckDeviceFormat,
25 HRESULT(UINT Adapter, D3DDEVTYPE DeviceType,
26 D3DFORMAT AdapterFormat, DWORD Usage,
27 D3DRESOURCETYPE RType, D3DFORMAT CheckFormat));
28 MOCK_METHOD4_WITH_CALLTYPE(
29 STDMETHODCALLTYPE, CheckDeviceFormatConversion,
30 HRESULT(UINT Adapter, D3DDEVTYPE DeviceType,
31 D3DFORMAT SourceFormat, D3DFORMAT TargetFormat));
32 MOCK_METHOD6_WITH_CALLTYPE(
33 STDMETHODCALLTYPE, CheckDeviceMultiSampleType,
34 HRESULT(UINT Adapter, D3DDEVTYPE DeviceType,
35 D3DFORMAT SurfaceFormat, BOOL Windowed,
36 D3DMULTISAMPLE_TYPE MultiSampleType,
37 DWORD* pQualityLevels));
38 MOCK_METHOD5_WITH_CALLTYPE(
39 STDMETHODCALLTYPE, CheckDeviceType,
40 HRESULT(UINT Adapter, D3DDEVTYPE DevType,
41 D3DFORMAT AdapterFormat, D3DFORMAT BackBufferFormat,
42 BOOL bWindowed));
43 MOCK_METHOD6_WITH_CALLTYPE(
44 STDMETHODCALLTYPE, CreateDevice,
45 HRESULT(UINT Adapter, D3DDEVTYPE DeviceType, HWND hFocusWindow,
46 DWORD BehaviorFlags,
47 D3DPRESENT_PARAMETERS* pPresentationParameters,
48 IDirect3DDevice9** ppReturnedDeviceInterface));
49 MOCK_METHOD4_WITH_CALLTYPE(
50 STDMETHODCALLTYPE, EnumAdapterModes,
51 HRESULT(UINT Adapter, D3DFORMAT Format, UINT Mode,
52 D3DDISPLAYMODE* pMode));
53 MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, GetAdapterCount, UINT());
54 MOCK_METHOD2_WITH_CALLTYPE(
55 STDMETHODCALLTYPE, GetAdapterDisplayMode,
56 HRESULT(UINT Adapter, D3DDISPLAYMODE* pMode));
57 MOCK_METHOD3_WITH_CALLTYPE(
58 STDMETHODCALLTYPE, GetAdapterIdentifier,
59 HRESULT(UINT Adapter, DWORD Flags,
60 D3DADAPTER_IDENTIFIER9* pIdentifier));
61 MOCK_METHOD2_WITH_CALLTYPE(STDMETHODCALLTYPE, GetAdapterModeCount,
62 UINT(UINT Adapter, D3DFORMAT Format));
63 MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, GetAdapterMonitor,
64 HMONITOR(UINT Adapter));
65 MOCK_METHOD3_WITH_CALLTYPE(STDMETHODCALLTYPE, GetDeviceCaps,
66 HRESULT(UINT Adapter, D3DDEVTYPE DeviceType,
67 D3DCAPS9* pCaps));
68 MOCK_METHOD1_WITH_CALLTYPE(STDMETHODCALLTYPE, RegisterSoftwareDevice,
69 HRESULT(void* pInitializeFunction));
70 MOCK_METHOD2_WITH_CALLTYPE(STDMETHODCALLTYPE, QueryInterface,
71 HRESULT(REFIID riid, void** ppvObj));
72 MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, AddRef, ULONG());
73 MOCK_METHOD0_WITH_CALLTYPE(STDMETHODCALLTYPE, Release, ULONG());
76 #endif // CONTENT_GPU_GPU_IDIRECT3D9_MOCK_WIN_H_