Commit a3a24c5c authored by Dave Tapuska's avatar Dave Tapuska Committed by Commit Bot

Move RenderWidgetUnittest.ForceSendMetadataOnInput into blink.

Simple move of this test closer to where the code to send the metadata
is.

BUG=1097816

Change-Id: Ifc0d2acd28e3d119c3a1d6e9f42d49d32b5207d4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2461988
Commit-Queue: Dave Tapuska <dtapuska@chromium.org>
Reviewed-by: default avatardanakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816684}
parent e6619ecf
......@@ -216,16 +216,4 @@ TEST_F(RenderWidgetSubFrameUnittest,
EXPECT_FALSE(layer_tree_host->is_external_pinch_gesture_active_for_testing());
}
#if defined(OS_ANDROID)
TEST_F(RenderWidgetUnittest, ForceSendMetadataOnInput) {
cc::LayerTreeHost* layer_tree_host = widget()->layer_tree_host();
// We should not have any force send metadata requests at start.
EXPECT_FALSE(layer_tree_host->TakeForceSendMetadataRequest());
// ShowVirtualKeyboard will trigger a text input state update.
widget()->GetWebWidget()->ShowVirtualKeyboard();
// We should now have a force send metadata request.
EXPECT_TRUE(layer_tree_host->TakeForceSendMetadataRequest());
}
#endif // !defined(OS_ANDROID)
} // namespace content
......@@ -6,6 +6,7 @@
#include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h"
#include "build/build_config.h"
#include "cc/layers/solid_color_layer.h"
#include "components/viz/common/surfaces/parent_local_surface_id_allocator.h"
#include "third_party/blink/public/common/input/synthetic_web_input_event_builders.h"
......@@ -103,6 +104,19 @@ TEST_F(WebFrameWidgetSimTest, FrameSinkIdHitTestAPI) {
EXPECT_EQ(gfx::PointF(150.27, 150.25), point);
}
#if defined(OS_ANDROID)
TEST_F(WebFrameWidgetSimTest, ForceSendMetadataOnInput) {
cc::LayerTreeHost* layer_tree_host =
WebView().MainFrameViewWidget()->LayerTreeHost();
// We should not have any force send metadata requests at start.
EXPECT_FALSE(layer_tree_host->TakeForceSendMetadataRequest());
// ShowVirtualKeyboard will trigger a text input state update.
WebView().MainFrameViewWidget()->ShowVirtualKeyboard();
// We should now have a force send metadata request.
EXPECT_TRUE(layer_tree_host->TakeForceSendMetadataRequest());
}
#endif // defined(OS_ANDROID)
const char EVENT_LISTENER_RESULT_HISTOGRAM[] = "Event.PassiveListeners";
// Keep in sync with enum defined in
......
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