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

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

Issue 2592293003: [MD Bookmarks] Add skeleton for MD Bookmarks. (Closed)
Patch Set: Remove css no longer needed for cr toolbar. Created 4 years 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
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.
+
+/**
tsergeant 2016/12/28 23:51:50 Hmmmm This was copied from History, where it has
angelayang 2016/12/29 02:53:34 Done.
+ * Replace the current primary element of the test with a new element. Useful
tsergeant 2016/12/28 23:51:50 Replace "primary element" with "body", then delete
angelayang 2016/12/29 02:53:34 Done.
+ * as an alternative to PolymerTest.clearBody() which preserves styling.
+ * @param {Element} element
+ */
+function replaceBody(element) {
+ var body = document.body;
tsergeant 2016/12/28 23:51:50 I think it would be fine to replace the body of th
angelayang 2016/12/29 02:53:34 Done.
+ while (body.children.length > 0)
+ body.removeChild(body.children[0]);
+ body.appendChild(element);
+}

Powered by Google App Engine
This is Rietveld 408576698