MediaSessionImplBrowserTest outputs too gMock warnings |
|||
Issue description
We should probably add test expectations to avoid this many warnings:
GMOCK WARNING:
Uninteresting mock function call - taking default action specified at:
../../content/browser/media/session/media_session_impl_browsertest.cc:48:
Function call: RequestAudioFocus(4-byte object <00-00 00-00>)
Returns: true
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: MediaSessionStateChanged(true, false)
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: MediaSessionStateChanged(true, true)
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: AbandonAudioFocus()
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: MediaSessionStateChanged(false, true)
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
GMOCK WARNING:
Uninteresting mock function call - taking default action specified at:
../../content/browser/media/session/media_session_impl_browsertest.cc:48:
Function call: RequestAudioFocus(4-byte object <00-00 00-00>)
Returns: true
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: MediaSessionStateChanged(true, false)
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: MediaSessionStateChanged(true, false)
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: MediaSessionStateChanged(true, true)
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
GMOCK WARNING:
Uninteresting mock function call - returning directly.
Function call: AbandonAudioFocus()
NOTE: You can safely ignore the above warning unless this call should not happen. Do not suppress it by blindly adding an EXPECT_CALL() if you don't mean to enforce the call. See http://code.google.com/p/googlemock/wiki/CookBook#Knowing_When_to_Expect for details.
,
Mar 17 2017
,
Mar 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ff2ee4a30a7b0170e27b227c11157b7844e79c99 commit ff2ee4a30a7b0170e27b227c11157b7844e79c99 Author: zqzhang <zqzhang@chromium.org> Date: Mon Mar 20 01:18:59 2017 Use NiceMock for MediaSession/AudioFocus tests As per https://github.com/google/googlemock/blob/master/googlemock/docs/CookBook.md#knowing-when-to-expect, this is to avoid printing too many warnings for uninsterested calls to mocked methods. BUG= 699112 Review-Url: https://codereview.chromium.org/2756883002 Cr-Commit-Position: refs/heads/master@{#458011} [modify] https://crrev.com/ff2ee4a30a7b0170e27b227c11157b7844e79c99/content/browser/media/session/media_session_impl_browsertest.cc [modify] https://crrev.com/ff2ee4a30a7b0170e27b227c11157b7844e79c99/content/browser/media/session/media_session_impl_service_routing_unittest.cc
,
Mar 20 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by yini...@chromium.org
, Mar 7 2017