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

Side by Side Diff: ppapi/shared_impl/test_globals.h

Issue 10702188: Fix unit test to allow repeated successful runs by avoiding a function static variable in tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef PPAPI_SHARED_IMPL_TEST_GLOBALS_H_ 5 #ifndef PPAPI_SHARED_IMPL_TEST_GLOBALS_H_
6 #define PPAPI_SHARED_IMPL_TEST_GLOBALS_H_ 6 #define PPAPI_SHARED_IMPL_TEST_GLOBALS_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "ppapi/shared_impl/callback_tracker.h" 9 #include "ppapi/shared_impl/callback_tracker.h"
10 #include "ppapi/shared_impl/ppapi_globals.h" 10 #include "ppapi/shared_impl/ppapi_globals.h"
(...skipping 24 matching lines...) Expand all
35 // PpapiGlobals implementation. 35 // PpapiGlobals implementation.
36 virtual ResourceTracker* GetResourceTracker() OVERRIDE; 36 virtual ResourceTracker* GetResourceTracker() OVERRIDE;
37 virtual VarTracker* GetVarTracker() OVERRIDE; 37 virtual VarTracker* GetVarTracker() OVERRIDE;
38 virtual CallbackTracker* GetCallbackTrackerForInstance( 38 virtual CallbackTracker* GetCallbackTrackerForInstance(
39 PP_Instance instance) OVERRIDE; 39 PP_Instance instance) OVERRIDE;
40 virtual thunk::PPB_Instance_API* GetInstanceAPI( 40 virtual thunk::PPB_Instance_API* GetInstanceAPI(
41 PP_Instance instance) OVERRIDE; 41 PP_Instance instance) OVERRIDE;
42 virtual thunk::ResourceCreationAPI* GetResourceCreationAPI( 42 virtual thunk::ResourceCreationAPI* GetResourceCreationAPI(
43 PP_Instance instance) OVERRIDE; 43 PP_Instance instance) OVERRIDE;
44 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE; 44 virtual PP_Module GetModuleForInstance(PP_Instance instance) OVERRIDE;
45 virtual base::MessageLoopProxy* GetMainThreadMessageLoop() OVERRIDE;
45 virtual std::string GetCmdLine() OVERRIDE; 46 virtual std::string GetCmdLine() OVERRIDE;
46 virtual void PreCacheFontForFlash(const void* logfontw) OVERRIDE; 47 virtual void PreCacheFontForFlash(const void* logfontw) OVERRIDE;
47 virtual base::Lock* GetProxyLock() OVERRIDE; 48 virtual base::Lock* GetProxyLock() OVERRIDE;
48 virtual void LogWithSource(PP_Instance instance, 49 virtual void LogWithSource(PP_Instance instance,
49 PP_LogLevel_Dev level, 50 PP_LogLevel_Dev level,
50 const std::string& source, 51 const std::string& source,
51 const std::string& value) OVERRIDE; 52 const std::string& value) OVERRIDE;
52 virtual void BroadcastLogWithSource(PP_Module module, 53 virtual void BroadcastLogWithSource(PP_Module module,
53 PP_LogLevel_Dev level, 54 PP_LogLevel_Dev level,
54 const std::string& source, 55 const std::string& source,
55 const std::string& value) OVERRIDE; 56 const std::string& value) OVERRIDE;
56 57
57 private: 58 private:
58 ResourceTracker resource_tracker_; 59 ResourceTracker resource_tracker_;
59 TestVarTracker var_tracker_; 60 TestVarTracker var_tracker_;
60 scoped_refptr<CallbackTracker> callback_tracker_; 61 scoped_refptr<CallbackTracker> callback_tracker_;
62 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_;
61 63
62 DISALLOW_COPY_AND_ASSIGN(TestGlobals); 64 DISALLOW_COPY_AND_ASSIGN(TestGlobals);
63 }; 65 };
64 66
65 } // namespace ppapi 67 } // namespace ppapi
66 68
67 #endif // PPAPI_SHARED_IMPL_TEST_GLOBALS_H_ 69 #endif // PPAPI_SHARED_IMPL_TEST_GLOBALS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698