Windows: Fix 64-bit compile errors (issue #394).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1361 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-08-14 21:45:22 +00:00
parent 94b5c536ba
commit 2f1c313fd0
11 changed files with 26 additions and 25 deletions

View File

@@ -275,7 +275,7 @@ class NetNotifyRendererTest : public ClientApp::RenderDelegate {
NetNotifyTestType test_type = NNTT_NONE;
// Extract the test type.
int pos = url.find("t=");
size_t pos = url.find("t=");
int intval = 0;
if (pos > 0 && base::StringToInt(url.substr(pos + 2, 1), &intval))
test_type = static_cast<NetNotifyTestType>(intval);

View File

@@ -27,7 +27,7 @@ static void VerifyStreamReadBehavior(CefRefPtr<CefStreamReader> stream,
int res, read, offset = 0;
do {
read = std::min(static_cast<int>(sizeof(buff)), contentSize-offset);
res = stream->Read(buff, 1, read);
res = static_cast<int>(stream->Read(buff, 1, read));
ASSERT_EQ(read, res);
ASSERT_TRUE(!memcmp(contentStr+offset, buff, res));
offset += res;
@@ -47,7 +47,7 @@ static void VerifyStreamWriteBehavior(CefRefPtr<CefStreamWriter> stream,
int res, write, offset = 0;
do {
write = std::min(10, contentSize-offset);
res = stream->Write(contentStr+offset, 1, write);
res = static_cast<int>(stream->Write(contentStr+offset, 1, write));
ASSERT_EQ(write, res);
offset += res;
ASSERT_EQ(offset, stream->Tell());

View File

@@ -132,7 +132,7 @@ CefRefPtr<CefResourceHandler> TestHandler::GetResourceHandler(
// Ignore the query component, if any.
std::string urlStr = url;
int idx = urlStr.find('?');
size_t idx = urlStr.find('?');
if (idx > 0)
urlStr = urlStr.substr(0, idx);
@@ -186,7 +186,7 @@ void TestHandler::AddResource(const std::string& url,
const std::string& mimeType) {
// Ignore the query component, if any.
std::string urlStr = url;
int idx = urlStr.find('?');
size_t idx = urlStr.find('?');
if (idx > 0)
urlStr = urlStr.substr(0, idx);

View File

@@ -182,10 +182,10 @@ void TestListEqual(CefRefPtr<CefListValue> val1,
EXPECT_TRUE(val1.get());
EXPECT_TRUE(val2.get());
size_t size = val1->GetSize();
EXPECT_EQ(size, val2->GetSize());
int size = static_cast<int>(val1->GetSize());
EXPECT_EQ(size, static_cast<int>(val2->GetSize()));
for (size_t i = 0; i < size; ++i) {
for (int i = 0; i < size; ++i) {
CefValueType type = val1->GetType(i);
EXPECT_EQ(type, val2->GetType(i));
switch (type) {