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

Unified Diff: ppapi/shared_impl/test_globals.cc

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 side-by-side diff with in-line comments
Download patch
« chrome/chrome_tests.gypi ('K') | « ppapi/shared_impl/test_globals.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/shared_impl/test_globals.cc
diff --git a/ppapi/shared_impl/test_globals.cc b/ppapi/shared_impl/test_globals.cc
index f8997dcb8d4c8f6ef709fb46f219c7c278bc650c..d154a9883f23b2f7464104a70ea1fa609cc8aed8 100644
--- a/ppapi/shared_impl/test_globals.cc
+++ b/ppapi/shared_impl/test_globals.cc
@@ -4,6 +4,8 @@
#include "ppapi/shared_impl/test_globals.h"
+#include "base/message_loop_proxy.h"
+
namespace ppapi {
TestGlobals::TestGlobals()
@@ -46,6 +48,12 @@ PP_Module TestGlobals::GetModuleForInstance(PP_Instance instance) {
return 0;
}
+base::MessageLoopProxy* TestGlobals::GetMainThreadMessageLoop() {
+ if (!message_loop_proxy_.get())
+ message_loop_proxy_ = base::MessageLoopProxy::current();
+ return message_loop_proxy_.get();
+}
+
std::string TestGlobals::GetCmdLine() {
return std::string();
}
« chrome/chrome_tests.gypi ('K') | « ppapi/shared_impl/test_globals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698