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

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

Issue 2872143002: VrShell: Exit fullscreen on app button press. (Closed)
Patch Set: update app button test 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..30b943a91f017a86af1a3057300d04eb95a20485 100644
--- a/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
+++ b/chrome/browser/android/vr_shell/ui_scene_manager_unittest.cc
@@ -29,6 +29,7 @@ class MockBrowserInterface : public VrBrowserInterface {
MOCK_METHOD0(AppButtonClicked, void());
MOCK_METHOD0(ForceExitVr, void());
MOCK_METHOD0(ExitPresent, void());
+ MOCK_METHOD0(ExitFullscreen, void());
MOCK_METHOD2(
RunVRDisplayInfoCallback,
void(const base::Callback<void(device::mojom::VRDisplayInfoPtr)>&,
@@ -64,11 +65,11 @@ class UiSceneManagerTest : public testing::Test {
std::unique_ptr<UiSceneManager> manager_;
};
-TEST_F(UiSceneManagerTest, ExitPresentOnAppButtonClick) {
- InSequence s;
-
+TEST_F(UiSceneManagerTest, ExitPresentAndFullscreenOnAppButtonClick) {
// Clicking app button should trigger to exit presentation.
EXPECT_CALL(*browser_, ExitPresent()).Times(1);
+ // And also trigger exit fullscreen.
+ EXPECT_CALL(*browser_, ExitFullscreen()).Times(1);
manager_->OnAppButtonClicked();
}
« 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