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

Side by Side Diff: chrome/test/chromedriver/net/net_util_unittest.cc

Issue 679273002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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 <string> 5 #include <string>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 26 matching lines...) Expand all
37 context_getter_ = new URLRequestContextGetter( 37 context_getter_ = new URLRequestContextGetter(
38 io_thread_.message_loop_proxy()); 38 io_thread_.message_loop_proxy());
39 base::WaitableEvent event(false, false); 39 base::WaitableEvent event(false, false);
40 io_thread_.message_loop_proxy()->PostTask( 40 io_thread_.message_loop_proxy()->PostTask(
41 FROM_HERE, 41 FROM_HERE,
42 base::Bind(&FetchUrlTest::InitOnIO, 42 base::Bind(&FetchUrlTest::InitOnIO,
43 base::Unretained(this), &event)); 43 base::Unretained(this), &event));
44 event.Wait(); 44 event.Wait();
45 } 45 }
46 46
47 virtual ~FetchUrlTest() { 47 ~FetchUrlTest() override {
48 base::WaitableEvent event(false, false); 48 base::WaitableEvent event(false, false);
49 io_thread_.message_loop_proxy()->PostTask( 49 io_thread_.message_loop_proxy()->PostTask(
50 FROM_HERE, 50 FROM_HERE,
51 base::Bind(&FetchUrlTest::DestroyServerOnIO, 51 base::Bind(&FetchUrlTest::DestroyServerOnIO,
52 base::Unretained(this), &event)); 52 base::Unretained(this), &event));
53 event.Wait(); 53 event.Wait();
54 } 54 }
55 55
56 void InitOnIO(base::WaitableEvent* event) { 56 void InitOnIO(base::WaitableEvent* event) {
57 scoped_ptr<net::ServerSocket> server_socket( 57 scoped_ptr<net::ServerSocket> server_socket(
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 ASSERT_FALSE(FetchUrl(server_url_, context_getter_.get(), &response)); 130 ASSERT_FALSE(FetchUrl(server_url_, context_getter_.get(), &response));
131 ASSERT_STREQ("stuff", response.c_str()); 131 ASSERT_STREQ("stuff", response.c_str());
132 } 132 }
133 133
134 TEST_F(FetchUrlTest, NoServer) { 134 TEST_F(FetchUrlTest, NoServer) {
135 std::string response("stuff"); 135 std::string response("stuff");
136 ASSERT_FALSE( 136 ASSERT_FALSE(
137 FetchUrl("http://localhost:33333", context_getter_.get(), &response)); 137 FetchUrl("http://localhost:33333", context_getter_.get(), &response));
138 ASSERT_STREQ("stuff", response.c_str()); 138 ASSERT_STREQ("stuff", response.c_str());
139 } 139 }
OLDNEW
« no previous file with comments | « chrome/test/base/web_ui_browser_test_browsertest.cc ('k') | chrome/test/chromedriver/net/sync_websocket_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698