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

Unified Diff: chrome/test/data/devtools/latency_info.html

Issue 1705533003: Revert of DevTools: add input event instrumentation test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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/test/data/devtools/latency_info.html
diff --git a/chrome/test/data/devtools/latency_info.html b/chrome/test/data/devtools/latency_info.html
deleted file mode 100644
index a45bcac1be702aa73d8b8b8cebe509da55a6f251..0000000000000000000000000000000000000000
--- a/chrome/test/data/devtools/latency_info.html
+++ /dev/null
@@ -1,103 +0,0 @@
-<html>
-<head>
-<style>
-#test-hover {
- position: absolute;
- left: 20px;
- top: 40px;
- width: 100px;
- height: 30px;
- background-color: red;
-}
-
-#test-hover:hover {
- background-color: blue;
-}
-
-#test-button {
- position: absolute;
- left: 20px;
- top: 100px;
- width: 100px;
- height: 30px;
-}
-
-#scrollable {
- position: absolute;
- left: 200px;
- top: 30px;
- width: 200px;
- height: 200px;
- overflow: scroll;
-}
-
-#scrolled {
- width: 800px;
- height: 800px;
-}
-</style>
-</head>
-<body>
-<div id="test-hover">Hover me</div>
-<button id="test-button">Click me</button>
-<div id="scrollable"><div id="scrolled"></div></div>
-<script>
-var pendingListeners = {};
-var pendingEvents = {};
-var inflightEvents = null;
-function onEvent(event)
-{
- if (inflightEvents) {
- inflightEvents.push(event);
- return;
- }
- inflightEvents = [event];
- requestAnimationFrame(onEventAfterFrame);
-}
-
-function onEventAfterFrame()
-{
- for (event of inflightEvents) {
- var type = event.type;
- var listener = pendingListeners[type];
- if (!listener) {
- pendingEvents[type] = (pendingEvents[type] || 0) + 1;
- continue;
- }
- delete pendingListeners[type];
- listener();
- }
- inflightEvents = null;
-}
-
-function waitForEvent(eventType, callback)
-{
- if (pendingEvents[eventType]) {
- pendingEvents[eventType]--;
- callback();
- return;
- }
- pendingListeners[eventType] = callback;
-}
-
-var eventTypes = [
- "mousemove",
- "mousedown",
- "mouseup",
- "wheel",
- "gesturetap",
- "click",
- "keydown",
- "keyup",
- "touchstart",
- "touchend",
- "touchcancel",
- "touchmove"
-];
-
-for (var e of eventTypes) {
- window.addEventListener(e, onEvent, true);
-}
-</script>
-</body>
-</html>

Powered by Google App Engine
This is Rietveld 408576698