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

Unified Diff: chrome/browser/ui/webui/downloads_ui_browsertest.js

Issue 702353002: downloads: add "No downloads" and "No search results" messages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: benjhayden@ review Created 6 years, 1 month 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
« no previous file with comments | « chrome/browser/ui/webui/downloads_ui.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/downloads_ui_browsertest.js
diff --git a/chrome/browser/ui/webui/downloads_ui_browsertest.js b/chrome/browser/ui/webui/downloads_ui_browsertest.js
index dfa5e89f82e6b51d1a417d791ebe69278d1b4b7f..b4b724c4be860c48d4f8bf0030d6d1e259c8fe3b 100644
--- a/chrome/browser/ui/webui/downloads_ui_browsertest.js
+++ b/chrome/browser/ui/webui/downloads_ui_browsertest.js
@@ -13,6 +13,33 @@ TEST_F('BaseDownloadsWebUITest', 'DeleteAllowed', function() {
testDone();
});
+TEST_F('BaseDownloadsWebUITest', 'NoResultsHiddenWhenDownloads', function() {
+ assertNotEquals(0, downloads.size());
+ expectFalse($('downloads-display').hidden);
+ expectTrue($('no-downloads-or-results').hidden);
+});
+
+/**
+ * @constructor
+ * @extends {BaseDownloadsWebUITest}
+ */
+function EmptyDownloadsWebUITest() {}
+
+EmptyDownloadsWebUITest.prototype = {
+ __proto__: BaseDownloadsWebUITest.prototype,
+
+ /** @override */
+ setUp: function() {
+ // Doesn't create any fake downloads.
+ assertEquals(0, downloads.size());
+ },
+};
+
+TEST_F('EmptyDownloadsWebUITest', 'NoDownloadsMessageShowing', function() {
+ expectTrue($('downloads-display').hidden);
+ expectFalse($('no-downloads-or-results').hidden);
+});
+
/**
* Fixture for Downloads WebUI testing when deletions are prohibited.
* @extends {BaseDownloadsWebUITest}
« no previous file with comments | « chrome/browser/ui/webui/downloads_ui.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698