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

Unified Diff: chrome/browser/component_updater/component_installers_unittest.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
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | chrome/chrome_tests.gypi » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/component_installers_unittest.cc
diff --git a/chrome/browser/component_updater/component_installers_unittest.cc b/chrome/browser/component_updater/component_installers_unittest.cc
index 1b11497865540f0fd4603635c9212113e1adc02e..59c4610137697ad4c480e604ebdebfa2e66f240a 100644
--- a/chrome/browser/component_updater/component_installers_unittest.cc
+++ b/chrome/browser/component_updater/component_installers_unittest.cc
@@ -14,6 +14,7 @@
#include "build/build_config.h"
#include "chrome/common/chrome_paths.h"
#include "content/public/test/test_browser_thread.h"
+#include "ppapi/shared_impl/test_globals.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -39,6 +40,10 @@ const FilePath::CharType kDataPath[] =
// TODO(viettrungluu): Separate out into two separate tests; use a test fixture.
TEST(ComponentInstallerTest, PepperFlashCheck) {
+ scoped_ptr<ppapi::TestGlobals> for_test(
+ new ppapi::TestGlobals(ppapi::PpapiGlobals::ForTest()));
+ ppapi::PpapiGlobals::SetPpapiGlobalsOnThreadForTest(for_test.get());
+
MessageLoop message_loop;
content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop);
« no previous file with comments | « no previous file | chrome/chrome_tests.gypi » ('j') | chrome/chrome_tests.gypi » ('J')

Powered by Google App Engine
This is Rietveld 408576698