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

Unified Diff: chrome/browser/ui/zoom/zoom_controller_unittest.cc

Issue 529993002: Use IsRenderViewLive() to test for SadTab in ZoomController. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to r292920. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/zoom/zoom_controller_unittest.cc
diff --git a/chrome/browser/ui/zoom/zoom_controller_unittest.cc b/chrome/browser/ui/zoom/zoom_controller_unittest.cc
index 53559e7cd87335479dadcdf4c8add4be8b986656..422a782c2249094cfc0077144bae9754f14fc7ab 100644
--- a/chrome/browser/ui/zoom/zoom_controller_unittest.cc
+++ b/chrome/browser/ui/zoom/zoom_controller_unittest.cc
@@ -14,6 +14,7 @@
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/common/frame_navigate_params.h"
+#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -39,6 +40,11 @@ class ZoomControllerTest : public ChromeRenderViewHostTestHarness {
ChromeRenderViewHostTestHarness::SetUp();
zoom_controller_.reset(new ZoomController(web_contents()));
zoom_controller_->AddObserver(&zoom_observer_);
+
+ // This call is needed so that the RenderViewHost reports being alive. This
+ // is only important for tests that call ZoomController::SetZoomLevel().
+ content::RenderViewHostTester::For(rvh())->CreateRenderView(
+ base::string16(), MSG_ROUTING_NONE, MSG_ROUTING_NONE, -1, false);
}
virtual void TearDown() OVERRIDE {
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698