Commit f4aba69f authored by Christopher Grant's avatar Christopher Grant Committed by Commit Bot

VR: Fix annoying uninteresting mock calls.

A mock call warning is interesting despite the fact that the test output
says it's uninteresting.

BUG=

Change-Id: I34e2b2ca98685886f08f3adf411ea3252cd025f7
Reviewed-on: https://chromium-review.googlesource.com/695820Reviewed-by: default avatarTibor Goldschwendt <tiborg@chromium.org>
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#505799}
parent 1c23d6eb
......@@ -35,7 +35,9 @@ UiSceneManagerTest::UiSceneManagerTest() {}
UiSceneManagerTest::~UiSceneManagerTest() {}
void UiSceneManagerTest::SetUp() {
browser_ = base::MakeUnique<MockBrowserInterface>();
browser_ = base::MakeUnique<testing::NiceMock<MockBrowserInterface>>();
content_input_delegate_ =
base::MakeUnique<testing::NiceMock<MockContentInputDelegate>>();
}
void UiSceneManagerTest::MakeManager(InCct in_cct, InWebVr in_web_vr) {
......@@ -47,7 +49,7 @@ void UiSceneManagerTest::MakeManager(InCct in_cct, InWebVr in_web_vr) {
ui_initial_state.in_web_vr = in_web_vr;
ui_initial_state.web_vr_autopresentation_expected = false;
manager_ = base::MakeUnique<UiSceneManager>(browser_.get(), scene_.get(),
&content_input_delegate_,
content_input_delegate_.get(),
model_.get(), ui_initial_state);
}
......@@ -60,7 +62,7 @@ void UiSceneManagerTest::MakeAutoPresentedManager() {
ui_initial_state.in_web_vr = false;
ui_initial_state.web_vr_autopresentation_expected = true;
manager_ = base::MakeUnique<UiSceneManager>(browser_.get(), scene_.get(),
&content_input_delegate_,
content_input_delegate_.get(),
model_.get(), ui_initial_state);
}
......
......@@ -78,10 +78,10 @@ class UiSceneManagerTest : public testing::Test {
base::MessageLoop message_loop_;
std::unique_ptr<MockBrowserInterface> browser_;
std::unique_ptr<MockContentInputDelegate> content_input_delegate_;
std::unique_ptr<UiScene> scene_;
std::unique_ptr<Model> model_;
std::unique_ptr<UiSceneManager> manager_;
MockContentInputDelegate content_input_delegate_;
base::TimeTicks current_time_;
};
......
......@@ -57,7 +57,7 @@ TEST_F(UiInputManagerTest, NoMouseMovesDuringClick) {
// Unless we suppress content move events during clicks, this will cause us to
// call OnContentMove on the delegate. We should do this suppression, so we
// set the expected number of calls to zero.
EXPECT_CALL(content_input_delegate_, OnContentMove(testing::_)).Times(0);
EXPECT_CALL(*content_input_delegate_, OnContentMove(testing::_)).Times(0);
input_manager_->HandleInput(content_quad_center - origin, origin,
UiInputManager::ButtonState::DOWN, &gesture_list,
......
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