From deb27ae20cd7d59fba58ad530a72b2dbf8a099ee Mon Sep 17 00:00:00 2001 From: "ben@chromium.org" Date: Fri, 10 Apr 2009 02:37:22 +0000 Subject: Scrape search definitions from forms that have onsubmit handlers. The scraping is done after submit events are handled by the page DOM so doing this is safe. Adds test infrastructure for determining that scraping occurs on submit: - allow testserver to be configured to serve pages from / on the server - provide a ui test util that navigates and waits for N subsequent redirections/navigations before returning control to the test to handle automated submission Eric, please review the test server changes. Scott, please look over everything else. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=13444 Review URL: http://codereview.chromium.org/62145 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13491 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/in_process_browser_test.cc | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'chrome/test/in_process_browser_test.cc') diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index 39114ee..6699144 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -125,12 +125,7 @@ void InProcessBrowserTest::SetUp() { scoped_refptr host_mapper( new net::RuleBasedHostMapper()); - // TODO(sky): Don't make a real dns lookup here or simulate a failing - // lookup. - host_mapper->AllowDirectLookup("*.google.com"); - // See http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol - // We don't want the test code to use it. - host_mapper->AddSimulatedFailure("wpad"); + ConfigureHostMapper(host_mapper.get()); net::ScopedHostMapper scoped_host_mapper(host_mapper.get()); BrowserMain(params); } @@ -221,3 +216,11 @@ void InProcessBrowserTest::RunTestOnMainThreadLoop() { MessageLoopForUI::current()->Quit(); } + +void InProcessBrowserTest::ConfigureHostMapper( + net::RuleBasedHostMapper* host_mapper) { + host_mapper->AllowDirectLookup("*.google.com"); + // See http://en.wikipedia.org/wiki/Web_Proxy_Autodiscovery_Protocol + // We don't want the test code to use it. + host_mapper->AddSimulatedFailure("wpad"); +} -- cgit v1.1