Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc

Issue 2874103003: Revert of App button click exits WebVR presentation. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
diff --git a/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc b/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
index f803c835f69dbfef66b239321cbe090b9b8c975b..10dacc06fdda62e4a31d3afe4bcbe92e181675c0 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
@@ -28,7 +28,6 @@
MOCK_METHOD0(AppButtonClicked, void());
MOCK_METHOD0(ForceExitVr, void());
- MOCK_METHOD0(ExitPresent, void());
MOCK_METHOD2(
RunVRDisplayInfoCallback,
void(const base::Callback<void(device::mojom::VRDisplayInfoPtr)>&,
@@ -64,12 +63,20 @@
std::unique_ptr<UiSceneManager> manager_;
};
-TEST_F(UiSceneManagerTest, ExitPresentOnAppButtonClick) {
+TEST_F(UiSceneManagerTest, ContentPausesOnAppButtonClick) {
InSequence s;
- // Clicking app button should trigger to exit presentation.
- EXPECT_CALL(*browser_, ExitPresent()).Times(1);
+ EXPECT_TRUE(scene_->GetWebVrRenderingEnabled());
+
+ // Clicking app button once should pause content rendering.
+ EXPECT_CALL(*browser_, OnContentPaused(true)).Times(1);
manager_->OnAppButtonClicked();
+ EXPECT_FALSE(scene_->GetWebVrRenderingEnabled());
+
+ // Clicking it again should resume content rendering.
+ EXPECT_CALL(*browser_, OnContentPaused(false)).Times(1);
+ manager_->OnAppButtonClicked();
+ EXPECT_TRUE(scene_->GetWebVrRenderingEnabled());
}
} // namespace vr_shell
« no previous file with comments | « chrome/browser/android/vr_shell/ui_scene_manager.cc ('k') | chrome/browser/android/vr_shell/vr_browser_interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698