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

Unified Diff: content/browser/appcache/appcache_update_job_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/appcache/appcache_update_job_unittest.cc
diff --git a/content/browser/appcache/appcache_update_job_unittest.cc b/content/browser/appcache/appcache_update_job_unittest.cc
index 0233e590f2285cee4e965311f668c1a06987b3f5..39c2290af271e0c579c212bb8b8e21e083b01c32 100644
--- a/content/browser/appcache/appcache_update_job_unittest.cc
+++ b/content/browser/appcache/appcache_update_job_unittest.cc
@@ -2,9 +2,13 @@
// 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/bind.h"
#include "base/bind_helpers.h"
#include "base/location.h"
+#include "base/macros.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
#include "base/synchronization/waitable_event.h"
@@ -1233,10 +1237,9 @@ class AppCacheUpdateJobTest : public testing::Test,
expect_group_obsolete_ = false;
expect_group_has_cache_ = true;
expect_old_cache_ = cache;
- expect_response_ids_.insert(
- std::map<GURL, int64>::value_type(
- MockHttpServer::GetMockUrl("files/explicit1"),
- response_writer_->response_id()));
+ expect_response_ids_.insert(std::map<GURL, int64_t>::value_type(
+ MockHttpServer::GetMockUrl("files/explicit1"),
+ response_writer_->response_id()));
tested_manifest_ = MANIFEST1;
MockFrontend::HostIds ids(1, host->host_id());
frontend->AddExpectedEvent(ids, APPCACHE_CHECKING_EVENT);
@@ -1570,9 +1573,9 @@ class AppCacheUpdateJobTest : public testing::Test,
expect_extra_entries_.insert(AppCache::EntryMap::value_type(
MockHttpServer::GetMockUrl("files/notmodified"),
AppCacheEntry(AppCacheEntry::EXPLICIT)));
- expect_response_ids_.insert(std::map<GURL, int64>::value_type(
+ expect_response_ids_.insert(std::map<GURL, int64_t>::value_type(
MockHttpServer::GetMockUrl("files/servererror"), 444)); // copied
- expect_response_ids_.insert(std::map<GURL, int64>::value_type(
+ expect_response_ids_.insert(std::map<GURL, int64_t>::value_type(
MockHttpServer::GetMockUrl("files/notmodified"), 555)); // copied
MockFrontend::HostIds ids1(1, host1->host_id());
frontend1->AddExpectedEvent(ids1, APPCACHE_CHECKING_EVENT);
@@ -1931,7 +1934,7 @@ class AppCacheUpdateJobTest : public testing::Test,
storage->SimulateStoreGroupAndNewestCacheFailure();
const GURL kManifestUrl = MockHttpServer::GetMockUrl("files/notmodified");
- const int64 kManifestResponseId = 11;
+ const int64_t kManifestResponseId = 11;
// Seed the response_info working set with canned data for
// files/servererror and for files/notmodified to test that the
@@ -3058,13 +3061,14 @@ class AppCacheUpdateJobTest : public testing::Test,
service_->set_request_context(io_thread_->request_context());
}
- AppCache* MakeCacheForGroup(int64 cache_id, int64 manifest_response_id) {
+ AppCache* MakeCacheForGroup(int64_t cache_id, int64_t manifest_response_id) {
return MakeCacheForGroup(cache_id, group_->manifest_url(),
manifest_response_id);
}
- AppCache* MakeCacheForGroup(int64 cache_id, const GURL& manifest_entry_url,
- int64 manifest_response_id) {
+ AppCache* MakeCacheForGroup(int64_t cache_id,
+ const GURL& manifest_entry_url,
+ int64_t manifest_response_id) {
AppCache* cache = new AppCache(service_->storage(), cache_id);
cache->set_complete(true);
cache->set_update_time(base::Time::Now() - kOneHour);
@@ -3090,7 +3094,8 @@ class AppCacheUpdateJobTest : public testing::Test,
}
AppCacheResponseInfo* MakeAppCacheResponseInfo(
- const GURL& manifest_url, int64 response_id,
+ const GURL& manifest_url,
+ int64_t response_id,
const std::string& raw_headers) {
net::HttpResponseInfo* http_info = new net::HttpResponseInfo();
http_info->headers = new net::HttpResponseHeaders(raw_headers);
@@ -3172,7 +3177,7 @@ class AppCacheUpdateJobTest : public testing::Test,
// Check that any copied entries have the expected response id
// and that entries that are not copied have a different response id.
- std::map<GURL, int64>::iterator found =
+ std::map<GURL, int64_t>::iterator found =
expect_response_ids_.find(it->first);
if (found != expect_response_ids_.end()) {
EXPECT_EQ(found->second, it->second.response_id());
@@ -3448,7 +3453,7 @@ class AppCacheUpdateJobTest : public testing::Test,
TestedManifest tested_manifest_;
const char* tested_manifest_path_override_;
AppCache::EntryMap expect_extra_entries_;
- std::map<GURL, int64> expect_response_ids_;
+ std::map<GURL, int64_t> expect_response_ids_;
};
TEST_F(AppCacheUpdateJobTest, AlreadyChecking) {
« no previous file with comments | « content/browser/appcache/appcache_update_job.cc ('k') | content/browser/appcache/appcache_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698