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); |
+ }); |
+}); |