summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-27 16:55:39 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-27 16:55:39 +0000
commitece3c8b9e07afa6d820f5f51a06fe784646c4297 (patch)
treeecb542c46fdbe682a279884db0c4a5ed318ef1e4
parentbfcbc8140240a2207f98105e2025aff87d470495 (diff)
downloadchromium_src-ece3c8b9e07afa6d820f5f51a06fe784646c4297.zip
chromium_src-ece3c8b9e07afa6d820f5f51a06fe784646c4297.tar.gz
chromium_src-ece3c8b9e07afa6d820f5f51a06fe784646c4297.tar.bz2
Fix interactive_ui_tests failures by temporarily allowing direct dns lookup.
Review URL: http://codereview.chromium.org/56010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12662 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser_focus_uitest.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 7a492e1..58b56cd 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/message_loop.h"
+#include "base/ref_counted.h"
#include "chrome/browser/automation/ui_controls.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/dom_operation_notification_details.h"
@@ -20,7 +21,7 @@
#include "chrome/views/window/window.h"
#include "chrome/test/in_process_browser_test.h"
#include "chrome/test/ui_test_utils.h"
-
+#include "net/base/host_resolver_unittest.h"
namespace {
@@ -35,9 +36,19 @@ const wchar_t kTypicalPage[] = L"files/focus/typical_page.html";
class BrowserFocusTest : public InProcessBrowserTest {
public:
BrowserFocusTest() {
+ host_mapper_ = new net::RuleBasedHostMapper();
+ // TODO(phajdan.jr): Don't make a real dns lookup here.
+ // page_with_focus.html has a reference to google.com.
+ host_mapper_->AllowDirectLookup("*.google.com");
+ scoped_host_mapper_.Init(host_mapper_.get());
+
set_show_window(true);
EnableDOMAutomation();
}
+
+private:
+ scoped_refptr<net::RuleBasedHostMapper> host_mapper_;
+ net::ScopedHostMapper scoped_host_mapper_;
};
class JavaScriptRunner : public NotificationObserver {