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

Unified Diff: chrome/test/base/ui_test_utils.h

Issue 10915002: Convert the history pyauto tests to a browser_tests. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: make DEPS clearer/cleaner after discussion with erikwright Created 8 years, 4 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/find_bar/find_bar_host_browsertest.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/ui_test_utils.h
===================================================================
--- chrome/test/base/ui_test_utils.h (revision 153884)
+++ chrome/test/base/ui_test_utils.h (working copy)
@@ -169,6 +169,9 @@
// Blocks until the |history_service|'s history finishes loading.
void WaitForHistoryToLoad(HistoryService* history_service);
+// Download the given file and waits for the download to complete.
+void DownloadURL(Browser* browser, const GURL& download_url);
+
// Brings the native window for |browser| to the foreground. Returns true on
// success.
bool BringBrowserWindowToFront(const Browser* browser) WARN_UNUSED_RESULT;
@@ -435,21 +438,25 @@
} // namespace internal
-// Enumerates all history contents on the backend thread.
-class HistoryEnumerator : public HistoryService::URLEnumerator {
+// Enumerates all history contents on the backend thread. Returns them in
+// descending order by time.
+class HistoryEnumerator {
public:
- explicit HistoryEnumerator(HistoryService* history);
- virtual ~HistoryEnumerator();
+ explicit HistoryEnumerator(Profile* profile);
+ ~HistoryEnumerator();
- // HistoryService::URLEnumerator:
- virtual void OnURL(const GURL& url) OVERRIDE;
- virtual void OnComplete(bool success) OVERRIDE;
-
std::vector<GURL>& urls() { return urls_; }
private:
+ void HistoryQueryComplete(
+ const base::Closure& quit_task,
+ HistoryService::Handle request_handle,
+ history::QueryResults* results);
+
std::vector<GURL> urls_;
+ CancelableRequestConsumer consumer_;
+
DISALLOW_COPY_AND_ASSIGN(HistoryEnumerator);
};
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_host_browsertest.cc ('k') | chrome/test/base/ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698