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

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

Issue 2898303004: [MD Bookmarks] Add toasts. (Closed)
Patch Set: address comments Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/data/webui/md_bookmarks/toast_manager_test.js
diff --git a/chrome/test/data/webui/md_bookmarks/toast_manager_test.js b/chrome/test/data/webui/md_bookmarks/toast_manager_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..0fe26ddabbd708e1ab9bbdc536e08802b16499d2
--- /dev/null
+++ b/chrome/test/data/webui/md_bookmarks/toast_manager_test.js
@@ -0,0 +1,24 @@
+// Copyright 2017 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.
+
+suite('<bookmarks-toast-manager>', function() {
+ var toastManager;
+ var store;
+
+ setup(function() {
+ toastManager = document.createElement('bookmarks-toast-manager');
+ replaceBody(toastManager);
+ });
+
+ test('simple show/hide', function() {
dpapad 2017/06/01 17:35:44 The test claims to test show/hide, but only toastM
calamity 2017/06/02 05:34:22 Done.
+ toastManager.show('test', false);
+ var toast = toastManager.$.toast;
+ assertTrue(toast.open);
+ assertEquals('test', toastManager.$.content.textContent);
+ assertTrue(toastManager.$$('paper-button').hidden);
+
+ toastManager.show('test', true);
+ assertFalse(toastManager.$$('paper-button').hidden);
+ });
+});

Powered by Google App Engine
This is Rietveld 408576698