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

Side by Side Diff: chrome/test/data/webui/md_bookmarks/test_util.js

Issue 2639453002: [MD Bookmarks] Add Select for Bookmarks. (Closed)
Patch Set: comment Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * Replace the current body of the test with a new element. 6 * Replace the current body of the test with a new element.
7 * @param {Element} element 7 * @param {Element} element
8 */ 8 */
9 function replaceBody(element) { 9 function replaceBody(element) {
10 PolymerTest.clearBody(); 10 PolymerTest.clearBody();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 id: id, 62 id: id,
63 title: '', 63 title: '',
64 url: 'http://www.google.com/', 64 url: 'http://www.google.com/',
65 }; 65 };
66 if (config) { 66 if (config) {
67 for (var key in config) 67 for (var key in config)
68 newItem[key] = config[key]; 68 newItem[key] = config[key];
69 } 69 }
70 return newItem; 70 return newItem;
71 } 71 }
72
73 /**
74 * Sends a custom click event to |element|.
75 * @param {HTMLElement} element
76 * @param {Object} config
77 */
78 function customClick(element, config) {
calamity 2017/01/17 06:12:22 I would fill out config with a useful set of defau
jiaxi 2017/01/20 04:51:09 Done.
79 element.dispatchEvent(new MouseEvent('mousedown', config));
80 element.dispatchEvent(new MouseEvent('mouseup', config));
81 element.dispatchEvent(new MouseEvent('click', config));
82 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698