diff --git a/tests/unittests/request_unittest.cc b/tests/unittests/request_unittest.cc index 92c4ae655..00836a9ab 100644 --- a/tests/unittests/request_unittest.cc +++ b/tests/unittests/request_unittest.cc @@ -237,7 +237,9 @@ class TypeExpectations { explicit TypeExpectations(bool navigation) : navigation_(navigation) { // Build the map of relevant requests. - for (size_t i = 0; i < sizeof(g_type_expected) / sizeof(TypeExpected); ++i) { + for (int i = 0; + i < static_cast(sizeof(g_type_expected) / sizeof(TypeExpected)); + ++i) { if (navigation_ && g_type_expected[i].navigation != navigation_) continue; @@ -279,7 +281,9 @@ class TypeExpectations { // Test if all expectations have been met. bool IsDone(bool assert) { - for (size_t i = 0; i < sizeof(g_type_expected) / sizeof(TypeExpected); ++i) { + for (int i = 0; + i < static_cast(sizeof(g_type_expected) / sizeof(TypeExpected)); + ++i) { if (navigation_ && g_type_expected[i].navigation != navigation_) continue; @@ -304,7 +308,9 @@ class TypeExpectations { int GetExpectedIndex(const std::string& file, cef_transition_type_t transition_type, cef_resource_type_t resource_type) { - for (size_t i = 0; i < sizeof(g_type_expected) / sizeof(TypeExpected); ++i) { + for (int i = 0; + i < static_cast(sizeof(g_type_expected) / sizeof(TypeExpected)); + ++i) { if (g_type_expected[i].file == file && (!navigation_ || g_type_expected[i].navigation == navigation_) && g_type_expected[i].transition_type == transition_type &&