| Index: chrome/browser/views/find_bar_win_unittest.cc
|
| diff --git a/chrome/browser/views/find_bar_win_unittest.cc b/chrome/browser/views/find_bar_win_unittest.cc
|
| index 4ef345c6593f93aa8d8d1961dcf53434703f3da6..f2d2f744b584c629e0e0b76aa974632c9c132343 100644
|
| --- a/chrome/browser/views/find_bar_win_unittest.cc
|
| +++ b/chrome/browser/views/find_bar_win_unittest.cc
|
| @@ -13,6 +13,7 @@
|
| #include "chrome/common/notification_service.h"
|
| #include "chrome/test/in_process_browser_test.h"
|
| #include "chrome/test/ui_test_utils.h"
|
| +#include "net/base/host_resolver_unittest.h"
|
|
|
| const std::wstring kFramePage = L"files/find_in_page/frames.html";
|
| const std::wstring kFrameData = L"files/find_in_page/framedata_general.html";
|
| @@ -79,7 +80,13 @@ typedef enum FindInPageCase { IGNORE_CASE = 0, CASE_SENSITIVE = 1 };
|
|
|
| class FindInPageControllerTest : public InProcessBrowserTest {
|
| public:
|
| - FindInPageControllerTest() {}
|
| + FindInPageControllerTest() {
|
| + host_mapper_ = new net::RuleBasedHostMapper();
|
| + // Avoid making external DNS lookups. In this test we don't need this
|
| + // to succeed.
|
| + host_mapper_->AddSimulatedFailure("*.google.com");
|
| + scoped_host_mapper_.Init(host_mapper_.get());
|
| + }
|
|
|
| protected:
|
| int FindInPage(const std::wstring& search_string,
|
| @@ -99,6 +106,10 @@ class FindInPageControllerTest : public InProcessBrowserTest {
|
| }
|
| return 0;
|
| }
|
| +
|
| + private:
|
| + scoped_refptr<net::RuleBasedHostMapper> host_mapper_;
|
| + net::ScopedHostMapper scoped_host_mapper_;
|
| };
|
|
|
| // This test loads a page with frames and starts FindInPage requests
|
|
|