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

Unified Diff: chrome/browser/chromeos/gview_request_interceptor_unittest.cc

Issue 10872034: Changing PluginPrefs to use PluginFinder's async interface. (Closed) Base URL: http://git.chromium.org/chromium/src.git@test_async
Patch Set: Fixed bug in chromeos loading the plugins page Created 8 years, 3 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
Index: chrome/browser/chromeos/gview_request_interceptor_unittest.cc
diff --git a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
index 4799224326f01098da7cfe30bf3b37852ae2ad71..d137f57d24ae2537c9ab763d8bb54e7380b5d1f5 100644
--- a/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
+++ b/chrome/browser/chromeos/gview_request_interceptor_unittest.cc
@@ -44,6 +44,11 @@ const char kPdfUrlIntercepted[] =
const char kPptUrlIntercepted[] =
"http://docs.google.com/gview?url=http%3A//foo.com/file.ppt";
+void AssertPluginEnabled(bool did_enable) {
+ ASSERT_TRUE(did_enable);
+ MessageLoop::current()->QuitWhenIdle();
+}
+
class GViewURLRequestTestJob : public net::URLRequestTestJob {
public:
GViewURLRequestTestJob(net::URLRequest* request,
@@ -206,7 +211,8 @@ TEST_F(GViewRequestInterceptorTest, DoNotInterceptDownload) {
TEST_F(GViewRequestInterceptorTest, DoNotInterceptPdfWhenEnabled) {
ASSERT_NO_FATAL_FAILURE(SetPDFPluginLoadedState(true));
- plugin_prefs_->EnablePlugin(true, pdf_path_, MessageLoop::QuitClosure());
+ plugin_prefs_->EnablePlugin(true, pdf_path_,
+ base::Bind(&AssertPluginEnabled));
MessageLoop::current()->Run();
net::URLRequest request(
@@ -220,7 +226,8 @@ TEST_F(GViewRequestInterceptorTest, DoNotInterceptPdfWhenEnabled) {
TEST_F(GViewRequestInterceptorTest, InterceptPdfWhenDisabled) {
ASSERT_NO_FATAL_FAILURE(SetPDFPluginLoadedState(true));
- plugin_prefs_->EnablePlugin(false, pdf_path_, MessageLoop::QuitClosure());
+ plugin_prefs_->EnablePlugin(false, pdf_path_,
+ base::Bind(&AssertPluginEnabled));
MessageLoop::current()->Run();
net::URLRequest request(
« no previous file with comments | « chrome/browser/chrome_plugin_browsertest.cc ('k') | chrome/browser/component_updater/pepper_flash_component_installer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698