Commit 51915670 authored by thestig@chromium.org's avatar thestig@chromium.org

Fix a flaky GViewRequestInterceptorTest by refreshing the plugins list before every test case.

BUG=none
TEST=unit_tests --gtest_filter=GViewRequestInterceptorTest.* and unit_tests --gtest_filter=GViewRequestInterceptorTest.InterceptPdfWithNoPlugins should both pass; Official CrOS bot goes green.
Review URL: http://codereview.chromium.org/8417015

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107773 0039d316-1c4b-4281-b951-d872f2087c98
parent 35eb9b24
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
#include <string> #include <string>
#include <vector>
#include "base/bind.h" #include "base/bind.h"
#include "base/message_loop.h" #include "base/message_loop.h"
...@@ -101,6 +102,10 @@ class GViewRequestInterceptorTest : public testing::Test { ...@@ -101,6 +102,10 @@ class GViewRequestInterceptorTest : public testing::Test {
ASSERT_TRUE(PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path_)); ASSERT_TRUE(PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf_path_));
handler_ = new content::DummyResourceHandler(); handler_ = new content::DummyResourceHandler();
PluginService::GetInstance()->RefreshPluginList();
PluginService::GetInstance()->GetPlugins(base::Bind(&QuitMessageLoop));
MessageLoop::current()->Run();
} }
virtual void TearDown() { virtual void TearDown() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment