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

Unified Diff: content/child/indexed_db/webidbcursor_impl_unittest.cc

Issue 1544273002: Switch to standard integer types in content/. (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 | « content/child/indexed_db/webidbcursor_impl.cc ('k') | content/child/indexed_db/webidbdatabase_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/indexed_db/webidbcursor_impl_unittest.cc
diff --git a/content/child/indexed_db/webidbcursor_impl_unittest.cc b/content/child/indexed_db/webidbcursor_impl_unittest.cc
index eb5a35f7c294dd4383b236d8be622b1178808e8b..053542b8a78220208345404aae96e709eee13ae9 100644
--- a/content/child/indexed_db/webidbcursor_impl_unittest.cc
+++ b/content/child/indexed_db/webidbcursor_impl_unittest.cc
@@ -2,6 +2,10 @@
// 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/macros.h"
#include "base/memory/scoped_ptr.h"
#include "base/thread_task_runner_handle.h"
#include "base/values.h"
@@ -42,7 +46,7 @@ class MockDispatcher : public IndexedDBDispatcher {
void RequestIDBCursorPrefetch(int n,
WebIDBCallbacks* callbacks,
- int32 ipc_cursor_id) override {
+ int32_t ipc_cursor_id) override {
++prefetch_calls_;
last_prefetch_count_ = n;
callbacks_.reset(callbacks);
@@ -50,15 +54,15 @@ class MockDispatcher : public IndexedDBDispatcher {
void RequestIDBCursorPrefetchReset(int used_prefetches,
int unused_prefetches,
- int32 ipc_cursor_id) override {
+ int32_t ipc_cursor_id) override {
++reset_calls_;
last_used_count_ = used_prefetches;
}
void RequestIDBCursorAdvance(unsigned long count,
WebIDBCallbacks* callbacks,
- int32 ipc_cursor_id,
- int64 transaction_id) override {
+ int32_t ipc_cursor_id,
+ int64_t transaction_id) override {
++advance_calls_;
callbacks_.reset(callbacks);
}
@@ -66,13 +70,13 @@ class MockDispatcher : public IndexedDBDispatcher {
void RequestIDBCursorContinue(const IndexedDBKey& key,
const IndexedDBKey& primary_key,
WebIDBCallbacks* callbacks,
- int32 ipc_cursor_id,
- int64 transaction_id) override {
+ int32_t ipc_cursor_id,
+ int64_t transaction_id) override {
++continue_calls_;
callbacks_.reset(callbacks);
}
- void CursorDestroyed(int32 ipc_cursor_id) override {
+ void CursorDestroyed(int32_t ipc_cursor_id) override {
destroyed_cursor_id_ = ipc_cursor_id;
}
@@ -82,7 +86,7 @@ class MockDispatcher : public IndexedDBDispatcher {
int last_used_count() { return last_used_count_; }
int advance_calls() { return advance_calls_; }
int continue_calls() { return continue_calls_; }
- int32 destroyed_cursor_id() { return destroyed_cursor_id_; }
+ int32_t destroyed_cursor_id() { return destroyed_cursor_id_; }
private:
int prefetch_calls_;
@@ -91,7 +95,7 @@ class MockDispatcher : public IndexedDBDispatcher {
int last_used_count_;
int advance_calls_;
int continue_calls_;
- int32 destroyed_cursor_id_;
+ int32_t destroyed_cursor_id_;
scoped_ptr<WebIDBCallbacks> callbacks_;
};
@@ -147,7 +151,7 @@ class WebIDBCursorImplTest : public testing::Test {
};
TEST_F(WebIDBCursorImplTest, PrefetchTest) {
- const int64 transaction_id = 1;
+ const int64_t transaction_id = 1;
{
WebIDBCursorImpl cursor(WebIDBCursorImpl::kInvalidCursorId,
transaction_id,
@@ -216,7 +220,7 @@ TEST_F(WebIDBCursorImplTest, PrefetchTest) {
}
TEST_F(WebIDBCursorImplTest, AdvancePrefetchTest) {
- const int64 transaction_id = 1;
+ const int64_t transaction_id = 1;
WebIDBCursorImpl cursor(WebIDBCursorImpl::kInvalidCursorId,
transaction_id,
thread_safe_sender_.get());
@@ -286,7 +290,7 @@ TEST_F(WebIDBCursorImplTest, AdvancePrefetchTest) {
}
TEST_F(WebIDBCursorImplTest, PrefetchReset) {
- const int64 transaction_id = 1;
+ const int64_t transaction_id = 1;
WebIDBCursorImpl cursor(WebIDBCursorImpl::kInvalidCursorId,
transaction_id,
thread_safe_sender_.get());
« no previous file with comments | « content/child/indexed_db/webidbcursor_impl.cc ('k') | content/child/indexed_db/webidbdatabase_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698