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

Unified Diff: chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc

Issue 722953002: downloads: add the ability to undo download removal. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: test fixes Created 6 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
« no previous file with comments | « chrome/browser/ui/webui/downloads_dom_handler.cc ('k') | ui/webui/resources/js/cr/ui/command.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
diff --git a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
index b02542bc30b0199c836865fa9d51a9554d41926f..804e65184e57f119f19d73ceed9a2bf9aac8fc4e 100644
--- a/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
+++ b/chrome/browser/ui/webui/downloads_dom_handler_browsertest.cc
@@ -37,7 +37,8 @@ bool ListMatches(base::ListValue* left_list, const std::string& right_json) {
if (left_dict->HasKey(iter.key()) &&
left_dict->Get(iter.key(), &left_value) &&
!iter.value().Equals(left_value)) {
- LOG(WARNING) << iter.key();
+ LOG(WARNING) << "key \"" << iter.key() << "\" doesn't match ("
+ << iter.value() << " vs. " << *left_value << ")";
return false;
}
}
@@ -161,7 +162,7 @@ class DownloadsDOMHandlerTest : public InProcessBrowserTest {
mock_handler_->downloads_list(),
"[{\"file_externally_removed\": false,"
" \"file_name\": \"file\","
- " \"id\": 1,"
+ " \"id\": \"1\","
" \"otr\": false,"
" \"since_string\": \"Today\","
" \"state\": \"COMPLETE\","
@@ -200,7 +201,7 @@ IN_PROC_BROWSER_TEST_F(DownloadsDOMHandlerTest, RemoveAll) {
IN_PROC_BROWSER_TEST_F(DownloadsDOMHandlerTest, RemoveOneItem) {
DownloadAnItem();
base::ListValue item;
- item.AppendInteger(1);
+ item.AppendString("1");
mock_handler_->reset_downloads_list();
browser()->profile()->GetPrefs()->SetBoolean(
@@ -231,7 +232,7 @@ IN_PROC_BROWSER_TEST_F(DownloadsDOMHandlerTest, DownloadsRelayed) {
EXPECT_TRUE(ListMatches(
mock_handler_->download_updated(),
"[{\"file_externally_removed\": true,"
- " \"id\": 1}]"));
+ " \"id\": \"1\"}]"));
mock_handler_->reset_downloads_list();
browser()->profile()->GetPrefs()->SetBoolean(
« no previous file with comments | « chrome/browser/ui/webui/downloads_dom_handler.cc ('k') | ui/webui/resources/js/cr/ui/command.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698