chromium/content/browser/renderer_host/input/event_latency_aura_browsertest.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/test/metrics/histogram_tester.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/hit_test_region_observer.h"
#include "content/shell/browser/shell.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/aura/window.h"
#include "ui/aura/window_tree_host.h"
#include "ui/events/test/event_generator.h"

namespace content {

class EventLatencyBrowserTest : public ContentBrowserTest {};

// Tests that if a key-press on a page causes a visual update, appropriate event
// latency metrics are reported.
// TODO(crbug.com/40132021): flaky test.
IN_PROC_BROWSER_TEST_F(EventLatencyBrowserTest, DISABLED_KeyPressOnButton) {}

// Tests that if a key-press on a page with an animation causes a visual update,
// appropriate event latency metrics are reported.
// TODO(crbug.com/40128555): Test is flaky.
IN_PROC_BROWSER_TEST_F(EventLatencyBrowserTest,
                       DISABLED_KeyPressOnButtonWithAnimation) {}

// Tests that entering a character in a textbox leads to appropriate event
// latency metrics being reported even though the page has an animation running.
//
// Disabled due to flakiness on several platforms. See crbug.com/1072340
IN_PROC_BROWSER_TEST_F(EventLatencyBrowserTest,
                       DISABLED_KeyPressInInputWithAnimation) {}

}  // namespace content