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

Side by Side Diff: mojo/fetcher/about_fetcher_unittest.cc

Issue 1342093002: Mandoline: let html_viewer handle more contents (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « mojo/fetcher/about_fetcher.cc ('k') | mojo/fetcher/network_fetcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/macros.h" 6 #include "base/macros.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 const URLResponse* response = html_content_handler()->latest_response(); 153 const URLResponse* response = html_content_handler()->latest_response();
154 EXPECT_EQ("about:blank", response->url); 154 EXPECT_EQ("about:blank", response->url);
155 EXPECT_EQ(200u, response->status_code); 155 EXPECT_EQ(200u, response->status_code);
156 EXPECT_EQ("text/html", response->mime_type); 156 EXPECT_EQ("text/html", response->mime_type);
157 EXPECT_FALSE(response->body.is_valid()); 157 EXPECT_FALSE(response->body.is_valid());
158 } 158 }
159 159
160 TEST_F(AboutFetcherTest, UnrecognizedURL) { 160 TEST_F(AboutFetcherTest, UnrecognizedURL) {
161 ConnectAndWait("about:some_unrecognized_url"); 161 ConnectAndWait("about:some_unrecognized_url");
162 162
163 ASSERT_EQ(0u, html_content_handler()->response_number()); 163 ASSERT_EQ(1u, html_content_handler()->response_number());
164
165 const URLResponse* response = html_content_handler()->latest_response();
166 EXPECT_EQ("about:some_unrecognized_url", response->url);
167 EXPECT_EQ(404u, response->status_code);
168 EXPECT_EQ("text/html", response->mime_type);
169 EXPECT_FALSE(response->body.is_valid());
164 } 170 }
165 171
166 } // namespace 172 } // namespace
167 } // namespace fetcher 173 } // namespace fetcher
168 } // namespace mojo 174 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/fetcher/about_fetcher.cc ('k') | mojo/fetcher/network_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698