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

Side by Side Diff: chrome/test/ui_test_utils.cc

Issue 3127008: Preliminary work on resuming downloads whose connections have expired.
Patch Set: Waiting to send download automation error message until after other downloads are canceled. Created 10 years, 2 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/test/ui_test_utils.h" 5 #include "chrome/test/ui_test_utils.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 177
178 // DownloadItem::Observer 178 // DownloadItem::Observer
179 virtual void OnDownloadUpdated(DownloadItem* download) { 179 virtual void OnDownloadUpdated(DownloadItem* download) {
180 if (download->state() == DownloadItem::COMPLETE) { 180 if (download->state() == DownloadItem::COMPLETE) {
181 CheckAllDownloadsComplete(); 181 CheckAllDownloadsComplete();
182 } 182 }
183 } 183 }
184 184
185 virtual void OnDownloadFileCompleted(DownloadItem* download) { } 185 virtual void OnDownloadFileCompleted(DownloadItem* download) { }
186 virtual void OnDownloadOpened(DownloadItem* download) {} 186 virtual void OnDownloadOpened(DownloadItem* download) {}
187 virtual void OnDownloadInterrupted(DownloadItem* download) { }
187 188
188 // DownloadManager::Observer 189 // DownloadManager::Observer
189 virtual void ModelChanged() { 190 virtual void ModelChanged() {
190 downloads_.clear(); 191 downloads_.clear();
191 download_manager_->SearchDownloads(string16(), &downloads_); 192 download_manager_->SearchDownloads(string16(), &downloads_);
192 193
193 if (CheckAllDownloadsComplete()) 194 if (CheckAllDownloadsComplete())
194 return; 195 return;
195 196
196 if (!waiting_) { 197 if (!waiting_) {
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after
675 676
676 TestWebSocketServer::~TestWebSocketServer() { 677 TestWebSocketServer::~TestWebSocketServer() {
677 scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine()); 678 scoped_ptr<CommandLine> cmd_line(CreateWebSocketServerCommandLine());
678 cmd_line->AppendSwitchASCII("server", "stop"); 679 cmd_line->AppendSwitchASCII("server", "stop");
679 cmd_line->AppendSwitch("chromium"); 680 cmd_line->AppendSwitch("chromium");
680 cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_); 681 cmd_line->AppendSwitchPath("pidfile", websocket_pid_file_);
681 base::LaunchApp(*cmd_line.get(), true, false, NULL); 682 base::LaunchApp(*cmd_line.get(), true, false, NULL);
682 } 683 }
683 684
684 } // namespace ui_test_utils 685 } // namespace ui_test_utils
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698