Commit db61ed62 authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

Fix compile failure for system_proxy_manager_browsertest.cc

This was failing compile with:
../../chrome/browser/chromeos/policy/system_proxy_manager_browsertest.cc:438:23: error: comparison of integers of different signs: 'int' and 'std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
    for (int i = 0; i < auth_schemes.size(); ++i) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~
and:
../../third_party/googletest/src/googletest/include/gtest/gtest.h:1544:11: error: comparison of integers of different signs: 'const unsigned long' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
../../third_party/googletest/src/googletest/include/gtest/gtest.h:1571:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned long, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
../../chrome/browser/chromeos/policy/system_proxy_manager_browsertest.cc:436:5: note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned long, int, nullptr>' requested here
    ASSERT_EQ(auth_schemes.size(),
    ^

Change-Id: Iae6fab7566a7a36efd5b41f4c76c696de4a29e99
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2525386
Auto-Submit: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarMaksim Ivanov <emaxx@chromium.org>
Commit-Queue: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#825297}
parent 95dd8011
......@@ -433,9 +433,11 @@ class SystemProxyManagerPolicyCredentialsBrowserTest
client_test_interface()->GetLastAuthenticationDetailsRequest();
EXPECT_EQ(username, request.credentials().username());
EXPECT_EQ(password, request.credentials().password());
ASSERT_EQ(auth_schemes.size(),
request.credentials().policy_credentials_auth_schemes().size());
for (int i = 0; i < auth_schemes.size(); ++i) {
ASSERT_EQ(
auth_schemes.size(),
static_cast<size_t>(
request.credentials().policy_credentials_auth_schemes().size()));
for (size_t i = 0; i < auth_schemes.size(); ++i) {
EXPECT_EQ(request.credentials().policy_credentials_auth_schemes()[i],
auth_schemes[i]);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment