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

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

Issue 2603303002: [MD Bookmarks] Add UI for Material Bookmarks. (Closed)
Patch Set: 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 primary element of the test with a new element. Useful
tsergeant 2017/01/03 23:31:17 As above, undo all changes to this file.
jiaxi 2017/01/04 02:50:16 Done.
7 * as an alternative to PolymerTest.clearBody() which preserves styling.
7 * @param {Element} element 8 * @param {Element} element
8 */ 9 */
9 function replaceBody(element) { 10 function replaceBody(element) {
10 PolymerTest.clearBody(); 11 var body = document.body;
11 document.body.appendChild(element); 12 while (body.children.length > 0)
13 body.removeChild(body.children[0]);
14 body.appendChild(element);
12 } 15 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698