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

Unified Diff: tools/telemetry/telemetry/internal/actions/mouse_click.js

Issue 1647513002: Delete tools/telemetry. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: tools/telemetry/telemetry/internal/actions/mouse_click.js
diff --git a/tools/telemetry/telemetry/internal/actions/mouse_click.js b/tools/telemetry/telemetry/internal/actions/mouse_click.js
deleted file mode 100644
index e85239a6dbf04d974bc695744ab2b3a56633580f..0000000000000000000000000000000000000000
--- a/tools/telemetry/telemetry/internal/actions/mouse_click.js
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-'use strict';
-
-(function() {
- function MouseClickAction(opt_callback) {
- this.callback_ = opt_callback;
- }
-
- MouseClickAction.prototype.start = function(options) {
- this.click_(options.element);
- };
-
- MouseClickAction.prototype.click_ = function(element) {
- var triggerMouseEvent = this.triggerMouseEvent_;
- var callback = this.callback_;
- triggerMouseEvent(element, 'mouseover');
- triggerMouseEvent(element, 'mousedown');
- // ~100ms is typical for a mouse click's elapsed time.
- window.setTimeout(
- function() {
- triggerMouseEvent(element, 'mouseup');
- triggerMouseEvent(element, 'click', callback);
- }, 100);
- };
-
- MouseClickAction.prototype.triggerMouseEvent_ = function(
- node, eventType, callback) {
- var clickEvent = document.createEvent('MouseEvents');
- clickEvent.initEvent(eventType, true, true);
- node.dispatchEvent(clickEvent);
- if (callback) {
- window.setTimeout(callback, 0);
- }
- };
-
- window.__MouseClickAction = MouseClickAction;
-})();
« no previous file with comments | « tools/telemetry/telemetry/internal/actions/media_action.py ('k') | tools/telemetry/telemetry/internal/actions/mouse_click.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698