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

Unified Diff: content/browser/host_zoom_map_impl_browsertest.cc

Issue 1804023002: Fix page zoom to be frame-centric for out-of-process frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't use WeakPtr for PostTask on UI thread. Created 4 years, 9 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
Index: content/browser/host_zoom_map_impl_browsertest.cc
diff --git a/content/browser/host_zoom_map_impl_browsertest.cc b/content/browser/host_zoom_map_impl_browsertest.cc
index fbfdc3c62e54886f54c3c429c3dfd4062217baa8..d0b9a8d8cf223cdfa3f6fbac0e26baecf0afc28a 100644
--- a/content/browser/host_zoom_map_impl_browsertest.cc
+++ b/content/browser/host_zoom_map_impl_browsertest.cc
@@ -8,12 +8,19 @@
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/content_browser_test.h"
+#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
+#include "net/dns/mock_host_resolver.h"
#include "url/gurl.h"
namespace content {
class HostZoomMapImplBrowserTest : public ContentBrowserTest {
+ protected:
+ void SetUpOnMainThread() override {
+ host_resolver()->AddRule("*", "127.0.0.1");
+ ASSERT_TRUE(embedded_test_server()->Start());
+ }
};
void RunTestForURL(const GURL& url,
@@ -51,6 +58,9 @@ void RunTestForURL(const GURL& url,
IN_PROC_BROWSER_TEST_F(HostZoomMapImplBrowserTest, GetZoomForView_Host) {
GURL url("http://abc.com");
+ // We must navigate so the WebContents has a committed entry.
+ EXPECT_TRUE(NavigateToURL(shell(), url));
alexmos 2016/04/05 18:00:53 It seems RunTestForURL will now redundantly naviga
wjmaclean 2016/04/05 20:22:00 Hmmm, I missed that ... I'll remove it from RunTes
+
HostZoomMap* host_zoom_map =
HostZoomMap::GetForWebContents(shell()->web_contents());
@@ -70,6 +80,9 @@ IN_PROC_BROWSER_TEST_F(HostZoomMapImplBrowserTest,
GetZoomForView_HostAndScheme) {
GURL url("http://abc.com");
+ // We must navigate so the WebContents has a committed entry.
+ EXPECT_TRUE(NavigateToURL(shell(), url));
+
HostZoomMap* host_zoom_map =
HostZoomMap::GetForWebContents(shell()->web_contents());

Powered by Google App Engine
This is Rietveld 408576698