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

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

Issue 3082020: Mark GViewRequestInterceptorTest.InterceptPdf as failing.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "chrome/browser/chromeos/gview_request_interceptor.h" 7 #include "chrome/browser/chromeos/gview_request_interceptor.h"
8 #include "net/base/load_flags.h" 8 #include "net/base/load_flags.h"
9 #include "net/url_request/url_request.h" 9 #include "net/url_request/url_request.h"
10 #include "net/url_request/url_request_job.h" 10 #include "net/url_request/url_request_job.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 77
78 TEST_F(GViewRequestInterceptorTest, DoNotInterceptDownload) { 78 TEST_F(GViewRequestInterceptorTest, DoNotInterceptDownload) {
79 URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_); 79 URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
80 request.set_load_flags(net::LOAD_IS_DOWNLOAD); 80 request.set_load_flags(net::LOAD_IS_DOWNLOAD);
81 request.Start(); 81 request.Start();
82 MessageLoop::current()->Run(); 82 MessageLoop::current()->Run();
83 EXPECT_EQ(0, test_delegate_.received_redirect_count()); 83 EXPECT_EQ(0, test_delegate_.received_redirect_count());
84 EXPECT_EQ(GURL("http://foo.com/file.pdf"), request.url()); 84 EXPECT_EQ(GURL("http://foo.com/file.pdf"), request.url());
85 } 85 }
86 86
87 TEST_F(GViewRequestInterceptorTest, InterceptPdf) { 87 TEST_F(GViewRequestInterceptorTest, FAILS_InterceptPdf) {
88 URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_); 88 URLRequest request(GURL("http://foo.com/file.pdf"), &test_delegate_);
89 request.Start(); 89 request.Start();
90 MessageLoop::current()->Run(); 90 MessageLoop::current()->Run();
91 EXPECT_EQ(1, test_delegate_.received_redirect_count()); 91 EXPECT_EQ(1, test_delegate_.received_redirect_count());
92 EXPECT_EQ(GURL("http://docs.google.com/gview?url=http%3A//foo.com/file.pdf"), 92 EXPECT_EQ(GURL("http://docs.google.com/gview?url=http%3A//foo.com/file.pdf"),
93 request.url()); 93 request.url());
94 } 94 }
95 95
96 TEST_F(GViewRequestInterceptorTest, InterceptPowerpoint) { 96 TEST_F(GViewRequestInterceptorTest, InterceptPowerpoint) {
97 URLRequest request(GURL("http://foo.com/file.ppt"), &test_delegate_); 97 URLRequest request(GURL("http://foo.com/file.ppt"), &test_delegate_);
98 request.Start(); 98 request.Start();
99 MessageLoop::current()->Run(); 99 MessageLoop::current()->Run();
100 EXPECT_EQ(1, test_delegate_.received_redirect_count()); 100 EXPECT_EQ(1, test_delegate_.received_redirect_count());
101 EXPECT_EQ(GURL("http://docs.google.com/gview?url=http%3A//foo.com/file.ppt"), 101 EXPECT_EQ(GURL("http://docs.google.com/gview?url=http%3A//foo.com/file.ppt"),
102 request.url()); 102 request.url());
103 } 103 }
104 104
105 } // namespace chromeos 105 } // 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