| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d5e5c473257f91748344ed782abb665379c6a01f
|
| --- /dev/null
|
| +++ b/chrome/test/data/webui/md_bookmarks/test_util.js
|
| @@ -0,0 +1,15 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +/**
|
| + * Replace the current primary element of the test with a new element. Useful
|
| + * as an alternative to PolymerTest.clearBody() which preserves styling.
|
| + * @param {Element} element
|
| + */
|
| +function replaceBody(element) {
|
| + var body = document.body;
|
| + while (body.children.length > 0)
|
| + body.removeChild(body.children[0]);
|
| + body.appendChild(element);
|
| +}
|
|
|