Add 'expand to fullscreen' scenario to LauncherAnimationsTest

The current tests do not evaluate the case of opening as 'peeking'
and then expanding to fullscreen to see all applications. This
can have different performance characteristics, since the application
data should be ready before the animation.

Currently the performance would be identical to normal fullscreen,
Open to be ~20 and Close to be ~90.

Bug: 961467
Test: interactive_ui_tests on nocturne
Change-Id: I002dc5ef3e4b2a57791b9da97c7fcf1e44ca323c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1674194
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Commit-Queue: Jun Mukai <mukai@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672134}
diff --git a/chrome/browser/ui/ash/launcher_animations_interactive_uitest.cc b/chrome/browser/ui/ash/launcher_animations_interactive_uitest.cc
index 18ab477..2e9c2c7d 100644
--- a/chrome/browser/ui/ash/launcher_animations_interactive_uitest.cc
+++ b/chrome/browser/ui/ash/launcher_animations_interactive_uitest.cc
@@ -137,6 +137,34 @@
                          LauncherAnimationsFullscreenTest,
                          /*reuse_widget=*/::testing::Bool());
 
+class LauncherAnimationsExpandToFullscreenTest
+    : public LauncherAnimationsTestBase {
+ public:
+  LauncherAnimationsExpandToFullscreenTest() = default;
+  ~LauncherAnimationsExpandToFullscreenTest() override = default;
+
+ private:
+  // LauncherAnimationsTestBase:
+  std::string GetAnimationSmoothnessMetricsName() const override {
+    return "FullscreenAllApps.ClamshellMode";
+  }
+
+  DISALLOW_COPY_AND_ASSIGN(LauncherAnimationsExpandToFullscreenTest);
+};
+
+IN_PROC_BROWSER_TEST_P(LauncherAnimationsExpandToFullscreenTest, Run) {
+  SendKeyAndWaitForState(ui::VKEY_BROWSER_SEARCH, false,
+                         ash::AppListViewState::kPeeking);
+  SendKeyAndWaitForState(ui::VKEY_BROWSER_SEARCH, true,
+                         ash::AppListViewState::kFullscreenAllApps);
+  SendKeyAndWaitForState(ui::VKEY_BROWSER_SEARCH, true,
+                         ash::AppListViewState::kClosed);
+}
+
+INSTANTIATE_TEST_SUITE_P(LauncherAnimations,
+                         LauncherAnimationsExpandToFullscreenTest,
+                         /*reuse_widget=*/::testing::Bool());
+
 class LauncherAnimationsPeekingTest : public LauncherAnimationsTestBase {
  public:
   LauncherAnimationsPeekingTest() = default;