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

Side by Side Diff: components/subresource_filter/core/common/first_party_origin_unittest.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "components/subresource_filter/core/common/first_party_origin.h" 5 #include "components/subresource_filter/core/common/first_party_origin.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace subresource_filter { 10 namespace subresource_filter {
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 } 65 }
66 } 66 }
67 67
68 TEST(FirstPartyOriginTest, EmptyHostUrls) { 68 TEST(FirstPartyOriginTest, EmptyHostUrls) {
69 const char* const kUrls[] = { 69 const char* const kUrls[] = {
70 "data:text/plain,example.com", "data:text/plain,another.example.com", 70 "data:text/plain,example.com", "data:text/plain,another.example.com",
71 "data:text/plain;base64,ABACABA", 71 "data:text/plain;base64,ABACABA",
72 }; 72 };
73 73
74 FirstPartyOrigin first_party(url::Origin(GURL("https://example.com"))); 74 FirstPartyOrigin first_party(url::Origin(GURL("https://example.com")));
75 for (const auto& url_string : kUrls) { 75 for (auto* url_string : kUrls) {
76 GURL url(url_string); 76 GURL url(url_string);
77 EXPECT_TRUE(FirstPartyOrigin::IsThirdParty(url, first_party.origin())); 77 EXPECT_TRUE(FirstPartyOrigin::IsThirdParty(url, first_party.origin()));
78 EXPECT_TRUE(first_party.IsThirdParty(url)); 78 EXPECT_TRUE(first_party.IsThirdParty(url));
79 } 79 }
80 } 80 }
81 81
82 } // namespace subresource_filter 82 } // namespace subresource_filter
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698