| Index: components/visitedlink/test/visitedlink_unittest.cc
|
| diff --git a/components/visitedlink/test/visitedlink_unittest.cc b/components/visitedlink/test/visitedlink_unittest.cc
|
| index e5f61eebf8334e68dbd3b85e400cf63c133e0f06..d53c5a4db908611ba1b660d3766306d6db0fc1f4 100644
|
| --- a/components/visitedlink/test/visitedlink_unittest.cc
|
| +++ b/components/visitedlink/test/visitedlink_unittest.cc
|
| @@ -30,8 +30,6 @@
|
| #include "content/public/browser/browser_thread.h"
|
| #include "content/public/browser/notification_service.h"
|
| #include "content/public/browser/notification_types.h"
|
| -#include "content/public/browser/render_widget_host_view.h"
|
| -#include "content/public/browser/web_contents.h"
|
| #include "content/public/test/mock_render_process_host.h"
|
| #include "content/public/test/test_browser_context.h"
|
| #include "content/public/test/test_browser_thread_bundle.h"
|
| @@ -789,7 +787,7 @@
|
| EXPECT_EQ(1, context()->reset_event_count());
|
|
|
| // Simulate tab becoming inactive.
|
| - web_contents()->GetRenderWidgetHostView()->Hide();
|
| + RenderViewHostTester::For(rvh())->SimulateWasHidden();
|
|
|
| // Add a few URLs.
|
| master()->AddURL(GURL("http://acidtests.org/"));
|
| @@ -804,7 +802,7 @@
|
| EXPECT_EQ(1, context()->reset_event_count());
|
|
|
| // Simulate the tab becoming active.
|
| - web_contents()->GetRenderWidgetHostView()->Show();
|
| + RenderViewHostTester::For(rvh())->SimulateWasShown();
|
| context()->WaitForUpdate();
|
|
|
| // We should now have 3 add events, still no reset events.
|
| @@ -812,7 +810,7 @@
|
| EXPECT_EQ(1, context()->reset_event_count());
|
|
|
| // Deactivate the tab again.
|
| - web_contents()->GetRenderWidgetHostView()->Hide();
|
| + RenderViewHostTester::For(rvh())->SimulateWasHidden();
|
|
|
| // Add a bunch of URLs (over 50) to exhaust the link event buffer.
|
| for (int i = 0; i < 100; i++)
|
| @@ -827,7 +825,7 @@
|
| EXPECT_EQ(1, context()->reset_event_count());
|
|
|
| // Activate the tab.
|
| - web_contents()->GetRenderWidgetHostView()->Show();
|
| + RenderViewHostTester::For(rvh())->SimulateWasShown();
|
| EXPECT_FALSE(timer_->IsRunning());
|
| context()->WaitForUpdate();
|
|
|
|
|