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

Side by Side Diff: chrome/browser/ui/panels/panel_browsertest.cc

Issue 7796014: Make cancel remove cancelled download from active queues at time of cancel. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix to try to get past main waterfall failure. Created 9 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/prefs/pref_service.h" 5 #include "chrome/browser/prefs/pref_service.h"
6 #include "chrome/browser/profiles/profile.h" 6 #include "chrome/browser/profiles/profile.h"
7 #include "chrome/browser/ui/browser_list.h" 7 #include "chrome/browser/ui/browser_list.h"
8 #include "chrome/browser/ui/browser_window.h" 8 #include "chrome/browser/ui/browser_window.h"
9 #include "chrome/browser/ui/find_bar/find_bar.h" 9 #include "chrome/browser/ui/find_bar/find_bar.h"
10 #include "chrome/browser/ui/find_bar/find_bar_controller.h" 10 #include "chrome/browser/ui/find_bar/find_bar_controller.h"
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 } 883 }
884 884
885 // DownloadManager::Observer 885 // DownloadManager::Observer
886 virtual void ModelChanged() { 886 virtual void ModelChanged() {
887 std::vector<DownloadItem*> downloads; 887 std::vector<DownloadItem*> downloads;
888 download_manager_->SearchDownloads(string16(), &downloads); 888 download_manager_->SearchDownloads(string16(), &downloads);
889 if (downloads.empty()) 889 if (downloads.empty())
890 return; 890 return;
891 891
892 EXPECT_EQ(1U, downloads.size()); 892 EXPECT_EQ(1U, downloads.size());
893 downloads.front()->Cancel(false); // Don't actually need to download it. 893 downloads.front()->Cancel(); // Don't actually need to download it.
894 894
895 saw_download_ = true; 895 saw_download_ = true;
896 EXPECT_TRUE(waiting_); 896 EXPECT_TRUE(waiting_);
897 MessageLoopForUI::current()->Quit(); 897 MessageLoopForUI::current()->Quit();
898 } 898 }
899 899
900 private: 900 private:
901 DownloadManager* download_manager_; 901 DownloadManager* download_manager_;
902 bool saw_download_; 902 bool saw_download_;
903 bool waiting_; 903 bool waiting_;
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 EXPECT_EQ(1, tabbed_browser->tab_count()); 996 EXPECT_EQ(1, tabbed_browser->tab_count());
997 ASSERT_TRUE(tabbed_browser->window()->IsDownloadShelfVisible()); 997 ASSERT_TRUE(tabbed_browser->window()->IsDownloadShelfVisible());
998 tabbed_browser->CloseWindow(); 998 tabbed_browser->CloseWindow();
999 #endif 999 #endif
1000 1000
1001 EXPECT_EQ(1, panel_browser->tab_count()); 1001 EXPECT_EQ(1, panel_browser->tab_count());
1002 ASSERT_FALSE(panel_browser->window()->IsDownloadShelfVisible()); 1002 ASSERT_FALSE(panel_browser->window()->IsDownloadShelfVisible());
1003 1003
1004 panel_browser->CloseWindow(); 1004 panel_browser->CloseWindow();
1005 } 1005 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/download/download_item_gtk.cc ('k') | chrome/browser/ui/views/download/download_item_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698