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

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

Issue 2745993002: MD Bookmarks: Update URL router to work in new data binding system (Closed)
Patch Set: calamity@ review Created 3 years, 9 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
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/store_test.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
11
12 window.history.replaceState({}, '', '/');
13
11 document.body.appendChild(element); 14 document.body.appendChild(element);
12 } 15 }
13 16
14 /** 17 /**
15 * Convert a list of top-level bookmark nodes into a normalized lookup table of 18 * Convert a list of top-level bookmark nodes into a normalized lookup table of
16 * nodes. 19 * nodes.
17 * @param {...BookmarkTreeNode} nodes 20 * @param {...BookmarkTreeNode} nodes
18 */ 21 */
19 function testTree(nodes) { 22 function testTree(nodes) {
20 return bookmarks.util.normalizeNodes( 23 return bookmarks.util.normalizeNodes(
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 98
96 if (config) { 99 if (config) {
97 for (var key in config) 100 for (var key in config)
98 props[key] = config[key]; 101 props[key] = config[key];
99 } 102 }
100 103
101 element.dispatchEvent(new MouseEvent('mousedown', props)); 104 element.dispatchEvent(new MouseEvent('mousedown', props));
102 element.dispatchEvent(new MouseEvent('mouseup', props)); 105 element.dispatchEvent(new MouseEvent('mouseup', props));
103 element.dispatchEvent(new MouseEvent('click', props)); 106 element.dispatchEvent(new MouseEvent('click', props));
104 } 107 }
OLDNEW
« no previous file with comments | « chrome/test/data/webui/md_bookmarks/store_test.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698