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

Side by Side Diff: chrome/browser/chromeos/gview_request_interceptor_unittest.cc

Issue 8589010: Disable GViewRequestInterceptorTest.InterceptPdfWithNoPlugin on official builds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: thestig's comment Created 9 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/chrome_plugin_service_filter.h" 10 #include "chrome/browser/chrome_plugin_service_filter.h"
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 plugin_prefs_->EnablePlugin(false, pdf_path_); 237 plugin_prefs_->EnablePlugin(false, pdf_path_);
238 238
239 net::URLRequest request(GURL(kPdfUrl), &test_delegate_); 239 net::URLRequest request(GURL(kPdfUrl), &test_delegate_);
240 SetupRequest(&request); 240 SetupRequest(&request);
241 request.Start(); 241 request.Start();
242 MessageLoop::current()->Run(); 242 MessageLoop::current()->Run();
243 EXPECT_EQ(1, test_delegate_.received_redirect_count()); 243 EXPECT_EQ(1, test_delegate_.received_redirect_count());
244 EXPECT_EQ(GURL(kPdfUrlIntercepted), request.url()); 244 EXPECT_EQ(GURL(kPdfUrlIntercepted), request.url());
245 } 245 }
246 246
247 #if !defined(OFFICIAL_BUILD)
248 // Official builds have pdf plugin by default, and we cannot unload it, so the
249 // test fails. Since pdf plugin is always present, we don't need to run this
250 // test.
247 TEST_F(GViewRequestInterceptorTest, InterceptPdfWithNoPlugin) { 251 TEST_F(GViewRequestInterceptorTest, InterceptPdfWithNoPlugin) {
248 SetPDFPluginLoadedState(false); 252 SetPDFPluginLoadedState(false);
249 253
250 net::URLRequest request(GURL(kPdfUrl), &test_delegate_); 254 net::URLRequest request(GURL(kPdfUrl), &test_delegate_);
251 SetupRequest(&request); 255 SetupRequest(&request);
252 request.Start(); 256 request.Start();
253 MessageLoop::current()->Run(); 257 MessageLoop::current()->Run();
254 EXPECT_EQ(1, test_delegate_.received_redirect_count()); 258 EXPECT_EQ(1, test_delegate_.received_redirect_count());
255 EXPECT_EQ(GURL(kPdfUrlIntercepted), request.url()); 259 EXPECT_EQ(GURL(kPdfUrlIntercepted), request.url());
256 } 260 }
261 #endif
257 262
258 TEST_F(GViewRequestInterceptorTest, InterceptPowerpoint) { 263 TEST_F(GViewRequestInterceptorTest, InterceptPowerpoint) {
259 net::URLRequest request(GURL(kPptUrl), &test_delegate_); 264 net::URLRequest request(GURL(kPptUrl), &test_delegate_);
260 SetupRequest(&request); 265 SetupRequest(&request);
261 request.Start(); 266 request.Start();
262 MessageLoop::current()->Run(); 267 MessageLoop::current()->Run();
263 EXPECT_EQ(1, test_delegate_.received_redirect_count()); 268 EXPECT_EQ(1, test_delegate_.received_redirect_count());
264 EXPECT_EQ(GURL(kPptUrlIntercepted), request.url()); 269 EXPECT_EQ(GURL(kPptUrlIntercepted), request.url());
265 } 270 }
266 271
(...skipping 16 matching lines...) Expand all
283 SetupRequest(&request); 288 SetupRequest(&request);
284 request.Start(); 289 request.Start();
285 MessageLoop::current()->Run(); 290 MessageLoop::current()->Run();
286 EXPECT_EQ(0, test_delegate_.received_redirect_count()); 291 EXPECT_EQ(0, test_delegate_.received_redirect_count());
287 EXPECT_EQ(GURL(kPdfBlob), request.url()); 292 EXPECT_EQ(GURL(kPdfBlob), request.url());
288 } 293 }
289 294
290 } // namespace 295 } // namespace
291 296
292 } // namespace chromeos 297 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698