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

Side by Side Diff: chrome/browser/browsing_data/browsing_data_helper_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 (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 "chrome/browser/browsing_data/browsing_data_helper.h" 5 #include "chrome/browser/browsing_data/browsing_data_helper.h"
6 6
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "chrome/common/url_constants.h" 8 #include "chrome/common/url_constants.h"
9 #include "extensions/common/constants.h" 9 #include "extensions/common/constants.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 18 matching lines...) Expand all
29 const GURL kOriginExt(kTestOriginExt); 29 const GURL kOriginExt(kTestOriginExt);
30 const GURL kOriginDevTools(kTestOriginDevTools); 30 const GURL kOriginDevTools(kTestOriginDevTools);
31 31
32 const int kExtension = BrowsingDataHelper::EXTENSION; 32 const int kExtension = BrowsingDataHelper::EXTENSION;
33 const int kProtected = BrowsingDataHelper::PROTECTED_WEB; 33 const int kProtected = BrowsingDataHelper::PROTECTED_WEB;
34 const int kUnprotected = BrowsingDataHelper::UNPROTECTED_WEB; 34 const int kUnprotected = BrowsingDataHelper::UNPROTECTED_WEB;
35 35
36 class BrowsingDataHelperTest : public testing::Test { 36 class BrowsingDataHelperTest : public testing::Test {
37 public: 37 public:
38 BrowsingDataHelperTest() {} 38 BrowsingDataHelperTest() {}
39 virtual ~BrowsingDataHelperTest() {} 39 ~BrowsingDataHelperTest() override {}
40 40
41 bool IsWebScheme(const std::string& scheme) { 41 bool IsWebScheme(const std::string& scheme) {
42 GURL test(scheme + "://example.com"); 42 GURL test(scheme + "://example.com");
43 return (BrowsingDataHelper::HasWebScheme(test) && 43 return (BrowsingDataHelper::HasWebScheme(test) &&
44 BrowsingDataHelper::IsWebScheme(scheme)); 44 BrowsingDataHelper::IsWebScheme(scheme));
45 } 45 }
46 46
47 bool IsExtensionScheme(const std::string& scheme) { 47 bool IsExtensionScheme(const std::string& scheme) {
48 GURL test(scheme + "://example.com"); 48 GURL test(scheme + "://example.com");
49 return (BrowsingDataHelper::HasExtensionScheme(test) && 49 return (BrowsingDataHelper::HasExtensionScheme(test) &&
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 EXPECT_TRUE(Match(kOriginExt, kExtension, NULL)); 168 EXPECT_TRUE(Match(kOriginExt, kExtension, NULL));
169 EXPECT_FALSE(Match(kOriginExt, kUnprotected, NULL)); 169 EXPECT_FALSE(Match(kOriginExt, kUnprotected, NULL));
170 EXPECT_FALSE(Match(kOriginExt, kProtected, NULL)); 170 EXPECT_FALSE(Match(kOriginExt, kProtected, NULL));
171 171
172 EXPECT_FALSE(Match(kOriginDevTools, kExtension, NULL)); 172 EXPECT_FALSE(Match(kOriginDevTools, kExtension, NULL));
173 EXPECT_FALSE(Match(kOriginDevTools, kUnprotected, NULL)); 173 EXPECT_FALSE(Match(kOriginDevTools, kUnprotected, NULL));
174 EXPECT_FALSE(Match(kOriginDevTools, kProtected, NULL)); 174 EXPECT_FALSE(Match(kOriginDevTools, kProtected, NULL));
175 } 175 }
176 176
177 } // namespace 177 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698