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

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

Issue 2872163002: MD Bookmarks: Add 'Open' command, to open in either the BMM or in new tabs (Closed)
Patch Set: Rebase Created 3 years, 7 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_bookmarks/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_bookmarks/test_util.js
diff --git a/chrome/test/data/webui/md_bookmarks/test_util.js b/chrome/test/data/webui/md_bookmarks/test_util.js
index 593610b359f50d3dbe59a69bafff36e1cd350d05..c1b2279b0f42a50f4cbf12f7ab6eb9eede16ba14 100644
--- a/chrome/test/data/webui/md_bookmarks/test_util.js
+++ b/chrome/test/data/webui/md_bookmarks/test_util.js
@@ -54,7 +54,7 @@ function createFolder(id, children, config) {
* Splices out the item/folder at |index| and adjusts the indices of all the
* items after that.
* @param {BookmarkTreeNode} tree
- * @param {Number} index
+ * @param {number} index
*/
function removeChild(tree, index) {
tree.children.splice(index, 1);
@@ -99,9 +99,11 @@ function customClick(element, config) {
var props = {
bubbles: true,
cancelable: true,
+ button: 0,
buttons: 1,
shiftKey: false,
ctrlKey: false,
+ detail: 1,
};
if (config) {
@@ -112,6 +114,8 @@ function customClick(element, config) {
element.dispatchEvent(new MouseEvent('mousedown', props));
element.dispatchEvent(new MouseEvent('mouseup', props));
element.dispatchEvent(new MouseEvent('click', props));
+ if (config && config.detail == 2)
+ element.dispatchEvent(new MouseEvent('dblclick', props));
}
/**
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/list_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698