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

Side by Side Diff: content/browser/streams/stream_url_request_job_unittest.cc

Issue 678073006: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix bogus formatting Created 6 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
« no previous file with comments | « content/browser/streams/stream_unittest.cc ('k') | content/browser/time_zone_monitor_linux.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/test/test_simple_task_runner.h" 6 #include "base/test/test_simple_task_runner.h"
7 #include "content/browser/streams/stream.h" 7 #include "content/browser/streams/stream.h"
8 #include "content/browser/streams/stream_registry.h" 8 #include "content/browser/streams/stream_registry.h"
9 #include "content/browser/streams/stream_url_request_job.h" 9 #include "content/browser/streams/stream_url_request_job.h"
10 #include "content/browser/streams/stream_write_observer.h" 10 #include "content/browser/streams/stream_write_observer.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 return new StreamURLRequestJob(request, network_delegate, stream); 46 return new StreamURLRequestJob(request, network_delegate, stream);
47 return NULL; 47 return NULL;
48 } 48 }
49 49
50 private: 50 private:
51 StreamRegistry* registry_; 51 StreamRegistry* registry_;
52 }; 52 };
53 53
54 StreamURLRequestJobTest() {} 54 StreamURLRequestJobTest() {}
55 55
56 virtual void SetUp() { 56 void SetUp() override {
57 registry_.reset(new StreamRegistry()); 57 registry_.reset(new StreamRegistry());
58 58
59 url_request_job_factory_.SetProtocolHandler( 59 url_request_job_factory_.SetProtocolHandler(
60 "blob", new MockProtocolHandler(registry_.get())); 60 "blob", new MockProtocolHandler(registry_.get()));
61 url_request_context_.set_job_factory(&url_request_job_factory_); 61 url_request_context_.set_job_factory(&url_request_job_factory_);
62 } 62 }
63 63
64 virtual void TearDown() { 64 void TearDown() override {}
65 }
66 65
67 void TestSuccessRequest(const GURL& url, 66 void TestSuccessRequest(const GURL& url,
68 const std::string& expected_response) { 67 const std::string& expected_response) {
69 TestRequest("GET", url, net::HttpRequestHeaders(), 200, expected_response); 68 TestRequest("GET", url, net::HttpRequestHeaders(), 200, expected_response);
70 } 69 }
71 70
72 void TestRequest(const std::string& method, 71 void TestRequest(const std::string& method,
73 const GURL& url, 72 const GURL& url,
74 const net::HttpRequestHeaders& extra_headers, 73 const net::HttpRequestHeaders& extra_headers,
75 int expected_status_code, 74 int expected_status_code,
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 stream->AddData(buffer, buffer->size()); 170 stream->AddData(buffer, buffer->size());
172 stream->Finalize(); 171 stream->Finalize();
173 172
174 net::HttpRequestHeaders extra_headers; 173 net::HttpRequestHeaders extra_headers;
175 extra_headers.SetHeader(net::HttpRequestHeaders::kRange, 174 extra_headers.SetHeader(net::HttpRequestHeaders::kRange,
176 net::HttpByteRange::Bounded(1, 3).GetHeaderValue()); 175 net::HttpByteRange::Bounded(1, 3).GetHeaderValue());
177 TestRequest("GET", kStreamURL, extra_headers, 405, std::string()); 176 TestRequest("GET", kStreamURL, extra_headers, 405, std::string());
178 } 177 }
179 178
180 } // namespace content 179 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/streams/stream_unittest.cc ('k') | content/browser/time_zone_monitor_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698