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 { |