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

Unified Diff: content/test/test_web_contents.h

Issue 2697803003: Improve test coverage for ContentFaviconDriver (Closed)
Patch Set: Minor test renames. Created 3 years, 10 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 | « content/public/test/web_contents_tester.h ('k') | content/test/test_web_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_web_contents.h
diff --git a/content/test/test_web_contents.h b/content/test/test_web_contents.h
index 1deb67a8404a98c6ba0b230a6c18820a0b97ef95..82d719dea9a0161df41a750fb77b0a7c1288e305 100644
--- a/content/test/test_web_contents.h
+++ b/content/test/test_web_contents.h
@@ -7,6 +7,8 @@
#include <stdint.h>
+#include <list>
+#include <map>
#include <string>
#include "content/browser/web_contents/web_contents_impl.h"
@@ -17,6 +19,11 @@
class GURL;
class Referrer;
+class SkBitmap;
+
+namespace gfx {
+class Size;
+}
namespace content {
@@ -73,6 +80,12 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester {
int item_sequence_number,
int document_sequence_number);
const std::string& GetSaveFrameHeaders() override;
+ bool HasPendingDownloadImage(const GURL& url) override;
+ bool TestDidDownloadImage(
+ const GURL& url,
+ int http_status_code,
+ const std::vector<SkBitmap>& bitmaps,
+ const std::vector<gfx::Size>& original_bitmap_sizes) override;
// True if a cross-site navigation is pending.
bool CrossProcessNavigationPending();
@@ -161,6 +174,9 @@ class TestWebContents : public WebContentsImpl, public WebContentsTester {
int expect_set_history_offset_and_length_history_offset_;
int expect_set_history_offset_and_length_history_length_;
std::string save_frame_headers_;
+ // Map keyed by image URL. Values are <id, callback> pairs.
+ std::map<GURL, std::list<std::pair<int, ImageDownloadCallback>>>
+ pending_image_downloads_;
};
} // namespace content
« no previous file with comments | « content/public/test/web_contents_tester.h ('k') | content/test/test_web_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698