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

Side by Side Diff: chrome/browser/net/safe_search_util_unittest.cc

Issue 684613002: 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/net/safe_search_util.h" 5 #include "chrome/browser/net/safe_search_util.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "net/http/http_request_headers.h" 9 #include "net/http/http_request_headers.h"
10 #include "net/url_request/url_request_test_util.h" 10 #include "net/url_request/url_request_test_util.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "url/gurl.h" 12 #include "url/gurl.h"
13 13
14 class SafeSearchUtilTest : public ::testing::Test { 14 class SafeSearchUtilTest : public ::testing::Test {
15 protected: 15 protected:
16 SafeSearchUtilTest() {} 16 SafeSearchUtilTest() {}
17 virtual ~SafeSearchUtilTest() {} 17 ~SafeSearchUtilTest() override {}
18 18
19 scoped_ptr<net::URLRequest> CreateYoutubeRequest() { 19 scoped_ptr<net::URLRequest> CreateYoutubeRequest() {
20 return context_.CreateRequest(GURL("http://www.youtube.com"), 20 return context_.CreateRequest(GURL("http://www.youtube.com"),
21 net::DEFAULT_PRIORITY, 21 net::DEFAULT_PRIORITY,
22 NULL, 22 NULL,
23 NULL); 23 NULL);
24 } 24 }
25 25
26 scoped_ptr<net::URLRequest> CreateNonYoutubeRequest() { 26 scoped_ptr<net::URLRequest> CreateNonYoutubeRequest() {
27 return context_.CreateRequest(GURL("http://www.notyoutube.com"), 27 return context_.CreateRequest(GURL("http://www.notyoutube.com"),
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 "PREF=\"f1=1&f2=4321\"; OtherCookie=value", 81 "PREF=\"f1=1&f2=4321\"; OtherCookie=value",
82 "PREF=\"f1=1&f2=8004321\"; OtherCookie=value"); 82 "PREF=\"f1=1&f2=8004321\"; OtherCookie=value");
83 } 83 }
84 84
85 TEST_F(SafeSearchUtilTest, DoesntTouchNonYoutubeURL) { 85 TEST_F(SafeSearchUtilTest, DoesntTouchNonYoutubeURL) {
86 scoped_ptr<net::URLRequest> request = CreateNonYoutubeRequest(); 86 scoped_ptr<net::URLRequest> request = CreateNonYoutubeRequest();
87 CheckHeaders(request.get(), 87 CheckHeaders(request.get(),
88 "PREF=f2=0", 88 "PREF=f2=0",
89 "PREF=f2=0"); 89 "PREF=f2=0");
90 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698