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

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

Issue 977473002: downloads: break downloads.js into more classes/files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: thestig@ review Created 5 years, 9 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
« no previous file with comments | « chrome/browser/ui/webui/downloads_ui.cc ('k') | chrome/browser/ui/webui/downloads_ui_browsertest_base.js » ('j') | 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 1fc22a0a061fa61b4b6849a079f3e09179e8f90a..d7f1d4473e6e65ad7e7cc9edbe8d92f462ea44ad 100644
--- a/chrome/browser/ui/webui/downloads_ui_browsertest.js
+++ b/chrome/browser/ui/webui/downloads_ui_browsertest.js
@@ -14,7 +14,7 @@ TEST_F('BaseDownloadsWebUITest', 'DeleteAllowed', function() {
});
TEST_F('BaseDownloadsWebUITest', 'NoResultsHiddenWhenDownloads', function() {
- assertNotEquals(0, downloads.size());
+ assertNotEquals(0, downloads.Manager.size());
expectFalse($('downloads-display').hidden);
expectTrue($('no-downloads-or-results').hidden);
});
@@ -24,7 +24,7 @@ TEST_F('BaseDownloadsWebUITest', 'NoSearchResultsShown', function() {
var noResults = $('no-downloads-or-results');
expectTrue(noResults.hidden);
- setSearch('just try to search for me!');
+ downloads.Manager.setSearchText('just try to search for me!');
this.sendEmptyList();
expectTrue($('downloads-display').hidden);
@@ -36,7 +36,7 @@ TEST_F('BaseDownloadsWebUITest', 'NoDownloadsAfterClearAll', function() {
var noResults = $('no-downloads-or-results');
expectTrue(noResults.hidden);
- clearAll();
+ $('clear-all').click();
this.sendEmptyList();
expectTrue($('downloads-display').hidden);
@@ -55,7 +55,7 @@ EmptyDownloadsWebUITest.prototype = {
/** @override */
setUp: function() {
// Doesn't create any fake downloads.
- assertEquals(0, downloads.size());
+ assertEquals(0, downloads.Manager.size());
},
};
@@ -66,7 +66,7 @@ TEST_F('EmptyDownloadsWebUITest', 'NoDownloadsMessageShowing', function() {
});
TEST_F('EmptyDownloadsWebUITest', 'NoSearchResultsWithNoDownloads', function() {
- setSearch('bananas');
+ downloads.Manager.setSearchText('bananas');
this.sendEmptyList();
expectTrue($('downloads-display').hidden);
@@ -97,3 +97,9 @@ TEST_F('DownloadsWebUIDeleteProhibitedTest', 'DeleteProhibited', function() {
// single item.
testDone();
});
+
+TEST_F('DownloadsWebUIDeleteProhibitedTest', 'ClearLeavesSearch', function() {
+ downloads.Manager.setSearchText('muhahaha');
+ $('clear-all').click();
+ expectGE(downloads.Manager.getInstance().searchText_.length, 0);
+});
« no previous file with comments | « chrome/browser/ui/webui/downloads_ui.cc ('k') | chrome/browser/ui/webui/downloads_ui_browsertest_base.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698