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

Side by Side Diff: url/mojo/url_gurl_struct_traits_unittest.cc

Issue 2716583003: Rename Origin.unique() to opaque().
Patch Set: Mac fixes Created 3 years, 9 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 <utility> 5 #include <utility>
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 { 68 {
69 const std::string url = std::string("http://example.org/").append( 69 const std::string url = std::string("http://example.org/").append(
70 kMaxURLChars + 1, 'a'); 70 kMaxURLChars + 1, 'a');
71 GURL input(url.c_str()); 71 GURL input(url.c_str());
72 GURL output; 72 GURL output;
73 EXPECT_TRUE(proxy->BounceUrl(input, &output)); 73 EXPECT_TRUE(proxy->BounceUrl(input, &output));
74 EXPECT_TRUE(output.is_empty()); 74 EXPECT_TRUE(output.is_empty());
75 } 75 }
76 76
77 // Test basic Origin serialization. 77 // Test basic Origin serialization.
78 Origin non_unique = Origin::UnsafelyCreateOriginWithoutNormalization( 78 Origin non_opaque = Origin::UnsafelyCreateOriginWithoutNormalization(
79 "http", "www.google.com", 80); 79 "http", "www.google.com", 80);
80 Origin output; 80 Origin output;
81 EXPECT_TRUE(proxy->BounceOrigin(non_unique, &output)); 81 EXPECT_TRUE(proxy->BounceOrigin(non_opaque, &output));
82 EXPECT_EQ(non_unique, output); 82 EXPECT_EQ(non_opaque, output);
83 EXPECT_FALSE(non_unique.unique()); 83 EXPECT_FALSE(non_opaque.opaque());
84 84
85 Origin unique; 85 Origin opaque;
86 EXPECT_TRUE(proxy->BounceOrigin(unique, &output)); 86 EXPECT_TRUE(proxy->BounceOrigin(opaque, &output));
87 EXPECT_TRUE(output.unique()); 87 EXPECT_TRUE(output.opaque());
88 } 88 }
89 89
90 } // namespace url 90 } // namespace url
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698