Fix memory leak on ChromeBrowserProxyResolverTest.
ChromeBrowserProxyResolverTest.SuccessTest was creating a duplicate
of the string returned by DBusMessageGetArgs_3() when the mocked
Chrome returns a proxy response. The caller of this interface
should not delete the returned pointers (as they are pointers to the
dbus message) so the test ended up leaking those strings.
This patch fixes that and uses a StrickMock for the dbus interface
to catch some unexpected calls also included on this fix. Finally,
testing::SetArgumentPointee() was deprecated in favor of
testing::SetArgPointee().
BUG=chromium:378548
TEST=`FEATURES="test" USE="clang asan" emerge-link update_engine` doesn't complain about ChromeBrowserProxyResolverTest.
Change-Id: Ie348eeab964fbfdeaafa68db9016d7ab36835552
Reviewed-on: https://chromium-review.googlesource.com/202071
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: David Zeuthen <zeuthen@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
1 file changed