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

Side by Side Diff: content/child/blink_platform_impl_unittest.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Update new uses post-rebase Created 3 years, 4 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
« no previous file with comments | « content/browser/webauth/authenticator_impl.cc ('k') | content/child/db_message_filter.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 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 "content/child/blink_platform_impl.h" 5 #include "content/child/blink_platform_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 CheckCastedOriginsAlreadyNormalized(web_origin); 130 CheckCastedOriginsAlreadyNormalized(web_origin);
131 } 131 }
132 132
133 { 133 {
134 SCOPED_TRACE(testing::Message() << "null"); 134 SCOPED_TRACE(testing::Message() << "null");
135 blink::WebSecurityOrigin web_origin = 135 blink::WebSecurityOrigin web_origin =
136 blink::WebSecurityOrigin::CreateUnique(); 136 blink::WebSecurityOrigin::CreateUnique();
137 EXPECT_TRUE(web_origin.IsUnique()); 137 EXPECT_TRUE(web_origin.IsUnique());
138 138
139 url::Origin url_origin = web_origin; 139 url::Origin url_origin = web_origin;
140 EXPECT_TRUE(url_origin.unique()); 140 EXPECT_TRUE(url_origin.opaque());
141 EXPECT_EQ("", url_origin.suborigin()); 141 EXPECT_EQ("", url_origin.suborigin());
142 142
143 web_origin = url::Origin(GURL("")); 143 web_origin = url::Origin(GURL(""));
144 EXPECT_TRUE(web_origin.IsUnique()); 144 EXPECT_TRUE(web_origin.IsUnique());
145 } 145 }
146 } 146 }
147 147
148 // This test ensures that WebSecurityOrigins can safely use 148 // This test ensures that WebSecurityOrigins can safely use
149 // url::Origin::CreateFromNormalizedTupleWithSuborigin when doing conversions. 149 // url::Origin::CreateFromNormalizedTupleWithSuborigin when doing conversions.
150 TEST(BlinkPlatformTest, WebSecurityOriginNormalization) { 150 TEST(BlinkPlatformTest, WebSecurityOriginNormalization) {
(...skipping 29 matching lines...) Expand all
180 for (const auto& test : cases) { 180 for (const auto& test : cases) {
181 SCOPED_TRACE(testing::Message() << test.url); 181 SCOPED_TRACE(testing::Message() << test.url);
182 blink::WebSecurityOrigin web_origin = 182 blink::WebSecurityOrigin web_origin =
183 blink::WebSecurityOrigin::CreateFromString( 183 blink::WebSecurityOrigin::CreateFromString(
184 blink::WebString::FromUTF8(test.url)); 184 blink::WebString::FromUTF8(test.url));
185 CheckCastedOriginsAlreadyNormalized(web_origin); 185 CheckCastedOriginsAlreadyNormalized(web_origin);
186 } 186 }
187 } 187 }
188 188
189 } // namespace content 189 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/webauth/authenticator_impl.cc ('k') | content/child/db_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698