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

Unified Diff: chrome/test/data/webui/md_history/test_util.js

Issue 2239623002: [MD History] Add shift-selection to the history lists. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@reshadow
Patch Set: rebase, fix closure compile Created 4 years, 4 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
« no previous file with comments | « chrome/test/data/webui/md_history/history_list_test.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/webui/md_history/test_util.js
diff --git a/chrome/test/data/webui/md_history/test_util.js b/chrome/test/data/webui/md_history/test_util.js
index 7ec8a6d7df545120647fac087afc04d05caec28f..0deeb3b54425f502e464344745c051eaf7ac753a 100644
--- a/chrome/test/data/webui/md_history/test_util.js
+++ b/chrome/test/data/webui/md_history/test_util.js
@@ -109,3 +109,23 @@ function waitForEvent(element, eventName, predicate) {
element.addEventListener(eventName, listener);
});
}
+
+/**
+ * Sends a shift click event to |element|.
+ * @param {HTMLElement} element
+ */
+function shiftClick(element) {
+ var xy = MockInteractions.middleOfNode(element);
+ var props = {
+ bubbles: true,
+ cancelable: true,
+ clientX: xy.x,
+ clientY: xy.y,
+ buttons: 1,
+ shiftKey: true,
+ };
+
+ element.dispatchEvent(new MouseEvent('mousedown', props));
+ element.dispatchEvent(new MouseEvent('mouseup', props));
+ element.dispatchEvent(new MouseEvent('click', props));
+}
« no previous file with comments | « chrome/test/data/webui/md_history/history_list_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698