Add shelf autohide state to shelf test api.

BUG=b:188196863

Change-Id: I76d28378bd9194e78aff0d9884731f6a8b0d81b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3034976
Auto-Submit: Yulun Wu <yulunwu@chromium.org>
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Andrew Xu <andrewxu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#904174}
diff --git a/ash/public/cpp/shelf_ui_info.h b/ash/public/cpp/shelf_ui_info.h
index 048b5871..1fd1a2b 100644
--- a/ash/public/cpp/shelf_ui_info.h
+++ b/ash/public/cpp/shelf_ui_info.h
@@ -74,6 +74,9 @@
 
   // The current hotseat state.
   HotseatState hotseat_state = HotseatState::kHidden;
+
+  // Indicates whether the hotseat is being autohidden.
+  bool is_auto_hidden = false;
 };
 
 }  // namespace ash
diff --git a/ash/shelf/shelf_test_api.cc b/ash/shelf/shelf_test_api.cc
index 5d82678..5be626c 100644
--- a/ash/shelf/shelf_test_api.cc
+++ b/ash/shelf/shelf_test_api.cc
@@ -118,6 +118,8 @@
   gfx::Point swipe_end_location = info.swipe_up.swipe_start_location;
   swipe_end_location.set_y(swipe_end_location.y() - swipe_distance);
   info.swipe_up.swipe_end_location = swipe_end_location;
+  info.is_auto_hidden =
+      GetShelf()->shelf_layout_manager()->is_shelf_auto_hidden();
 
   return info;
 }
diff --git a/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.cc b/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.cc
index 5266dd31..db84f16 100644
--- a/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.cc
+++ b/chrome/browser/chromeos/extensions/autotest_private/autotest_private_api.cc
@@ -4849,6 +4849,7 @@
     hotseat_ui_info.swipe_up = std::move(swipe_up_descriptor);
     hotseat_ui_info.is_animating = hotseat_info.is_animating;
     hotseat_ui_info.state = GetHotseatState(hotseat_info.hotseat_state);
+    hotseat_ui_info.is_auto_hidden = hotseat_info.is_auto_hidden;
 
     shelf_ui_info.hotseat_info = std::move(hotseat_ui_info);
   }
diff --git a/chrome/common/extensions/api/autotest_private.idl b/chrome/common/extensions/api/autotest_private.idl
index 5f266ac..58d30d1 100644
--- a/chrome/common/extensions/api/autotest_private.idl
+++ b/chrome/common/extensions/api/autotest_private.idl
@@ -501,6 +501,8 @@
     HotseatSwipeDescriptor swipeUp;
     HotseatState state;
     boolean isAnimating;
+    // Whether the shelf is hidden with auto-hide enabled.
+    boolean isAutoHidden;
   };
 
   // The ui information of shelf components, including hotseat and