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

Unified Diff: content/browser/frame_host/navigation_controller_impl_unittest.cc

Issue 1549113002: Switch to standard integer types in content/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
Index: content/browser/frame_host/navigation_controller_impl_unittest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index cb4f1d06b043226e9358af1f4db989c3be7b0e38..ac73cc55d17c3f829cd03c21f2b7aa4a8885d4f5 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -2,14 +2,18 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/basictypes.h"
+#include <stddef.h>
+#include <stdint.h>
+
#include "base/bind.h"
#include "base/files/file_util.h"
+#include "base/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/time/time.h"
+#include "build/build_config.h"
#include "content/browser/frame_host/cross_site_transferring_request.h"
#include "content/browser/frame_host/frame_navigation_entry.h"
#include "content/browser/frame_host/navigation_controller_impl.h"
@@ -133,7 +137,7 @@ namespace content {
// function.
TEST(TimeSmoother, Basic) {
NavigationControllerImpl::TimeSmoother smoother;
- for (int64 i = 1; i < 1000; ++i) {
+ for (int64_t i = 1; i < 1000; ++i) {
base::Time t = base::Time::FromInternalValue(i);
EXPECT_EQ(t, smoother.GetSmoothedTime(t));
}
@@ -145,7 +149,7 @@ TEST(TimeSmoother, SingleDuplicate) {
NavigationControllerImpl::TimeSmoother smoother;
base::Time t = base::Time::FromInternalValue(1);
EXPECT_EQ(t, smoother.GetSmoothedTime(t));
- for (int64 i = 1; i < 1000; ++i) {
+ for (int64_t i = 1; i < 1000; ++i) {
base::Time expected_t = base::Time::FromInternalValue(i + 1);
t = base::Time::FromInternalValue(i);
EXPECT_EQ(expected_t, smoother.GetSmoothedTime(t));
@@ -155,14 +159,14 @@ TEST(TimeSmoother, SingleDuplicate) {
// With k duplicates and timestamps thereafter increasing by one
// microsecond, the smoothed time should always be k behind.
TEST(TimeSmoother, ManyDuplicates) {
- const int64 kNumDuplicates = 100;
+ const int64_t kNumDuplicates = 100;
NavigationControllerImpl::TimeSmoother smoother;
base::Time t = base::Time::FromInternalValue(1);
- for (int64 i = 0; i < kNumDuplicates; ++i) {
+ for (int64_t i = 0; i < kNumDuplicates; ++i) {
base::Time expected_t = base::Time::FromInternalValue(i + 1);
EXPECT_EQ(expected_t, smoother.GetSmoothedTime(t));
}
- for (int64 i = 1; i < 1000; ++i) {
+ for (int64_t i = 1; i < 1000; ++i) {
base::Time expected_t =
base::Time::FromInternalValue(i + kNumDuplicates);
t = base::Time::FromInternalValue(i);
@@ -173,10 +177,10 @@ TEST(TimeSmoother, ManyDuplicates) {
// If the clock jumps far back enough after a run of duplicates, it
// should immediately jump to that value.
TEST(TimeSmoother, ClockBackwardsJump) {
- const int64 kNumDuplicates = 100;
+ const int64_t kNumDuplicates = 100;
NavigationControllerImpl::TimeSmoother smoother;
base::Time t = base::Time::FromInternalValue(1000);
- for (int64 i = 0; i < kNumDuplicates; ++i) {
+ for (int64_t i = 0; i < kNumDuplicates; ++i) {
base::Time expected_t = base::Time::FromInternalValue(i + 1000);
EXPECT_EQ(expected_t, smoother.GetSmoothedTime(t));
}

Powered by Google App Engine
This is Rietveld 408576698