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

Unified Diff: url/origin_unittest.cc

Issue 1542703002: Switch to standard integer types in url/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « url/origin.cc ('k') | url/scheme_host_port.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/origin_unittest.cc
diff --git a/url/origin_unittest.cc b/url/origin_unittest.cc
index ec4ec65105759cfeb86a4ff3c33f4b7b1f4edead..6a3128b7be2a8a87d1b0a5a840a0671e4af725a7 100644
--- a/url/origin_unittest.cc
+++ b/url/origin_unittest.cc
@@ -2,10 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/logging.h"
-#include "url/origin.h"
+#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
+#include "url/origin.h"
namespace {
@@ -44,7 +48,7 @@ TEST(OriginTest, ConstructFromGURL) {
const char* const url;
const char* const expected_scheme;
const char* const expected_host;
- const uint16 expected_port;
+ const uint16_t expected_port;
} cases[] = {
// IP Addresses
{"http://192.168.9.1/", "http", "192.168.9.1", 80},
@@ -162,7 +166,7 @@ TEST(OriginTest, UnsafelyCreate) {
struct TestCase {
const char* scheme;
const char* host;
- uint16 port;
+ uint16_t port;
} cases[] = {
{"http", "example.com", 80},
{"http", "example.com", 123},
@@ -189,7 +193,7 @@ TEST(OriginTest, UnsafelyCreateUniqueOnInvalidInput) {
struct TestCases {
const char* scheme;
const char* host;
- uint16 port;
+ uint16_t port;
} cases[] = {{"", "", 0},
{"data", "", 0},
{"blob", "", 0},
@@ -226,7 +230,7 @@ TEST(OriginTest, UnsafelyCreateUniqueViaEmbeddedNulls) {
size_t scheme_length;
const char* host;
size_t host_length;
- uint16 port;
+ uint16_t port;
} cases[] = {{"http\0more", 9, "example.com", 11, 80},
{"http\0", 5, "example.com", 11, 80},
{"\0http", 5, "example.com", 11, 80},
« no previous file with comments | « url/origin.cc ('k') | url/scheme_host_port.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698