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

Unified Diff: gpu/np_utils/np_browser_mock.h

Issue 481007: Deleted np_utils library. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years 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
« no previous file with comments | « gpu/np_utils/np_browser.cc ('k') | gpu/np_utils/np_browser_stub.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/np_utils/np_browser_mock.h
===================================================================
--- gpu/np_utils/np_browser_mock.h (revision 34090)
+++ gpu/np_utils/np_browser_mock.h (working copy)
@@ -1,50 +0,0 @@
-// Copyright (c) 2006-2008 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 GPU_NP_UTILS_NP_BROWSER_MOCK_H_
-#define GPU_NP_UTILS_NP_BROWSER_MOCK_H_
-
-#include "gpu/np_utils/np_browser_stub.h"
-#include "testing/gmock/include/gmock/gmock.h"
-
-namespace np_utils {
-
-// This mocks certain member functions of the stub browser. Those relating
-// to identifiers, memory management, reference counting and forwarding to
-// NPObjects are deliberately not mocked so the mock browser can be used as
-// normal for these calls.
-class MockNPBrowser : public StubNPBrowser {
- public:
- NPObject* ConcreteCreateObject(NPP npp, const NPClass* cl) {
- return StubNPBrowser::CreateObject(npp, cl);
- }
-
- MockNPBrowser() {
- // Do not mock CreateObject by default but allow it to be mocked so object
- // creation can be intercepted.
- ON_CALL(*this, CreateObject(testing::_, testing::_))
- .WillByDefault(testing::Invoke(this,
- &MockNPBrowser::ConcreteCreateObject));
- }
-
- void ConcretePluginThreadAsyncCall(NPP npp,
- PluginThreadAsyncCallProc callback,
- void* data) {
- return StubNPBrowser::PluginThreadAsyncCall(npp, callback, data);
- }
-
- MOCK_METHOD2(CreateObject, NPObject*(NPP npp, const NPClass* cl));
- MOCK_METHOD1(GetWindowNPObject, NPObject*(NPP cpp));
- MOCK_METHOD3(PluginThreadAsyncCall,
- void(NPP npp, PluginThreadAsyncCallProc callback, void* data));
- MOCK_METHOD4(ScheduleTimer, uint32(NPP npp,
- uint32 interval,
- bool repeat,
- TimerProc callback));
- MOCK_METHOD2(UnscheduleTimer, void(NPP npp, uint32 timer_id));
-};
-
-} // namespace np_utils
-
-#endif // GPU_NP_UTILS_NP_BROWSER_MOCK_H_
« no previous file with comments | « gpu/np_utils/np_browser.cc ('k') | gpu/np_utils/np_browser_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698