summaryrefslogtreecommitdiffstats
path: root/chrome/browser/geolocation/geolocation_browsertest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:07:11 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 20:07:11 +0000
commit95409e1020037b0bbfbce17f861d3de090d10186 (patch)
tree90a893af1247b1d4a3767c5ab14aae797f467946 /chrome/browser/geolocation/geolocation_browsertest.cc
parent701e869b30deffda579c5c413cf1d73defee34fa (diff)
downloadchromium_src-95409e1020037b0bbfbce17f861d3de090d10186.zip
chromium_src-95409e1020037b0bbfbce17f861d3de090d10186.tar.gz
chromium_src-95409e1020037b0bbfbce17f861d3de090d10186.tar.bz2
Test server cleanup patch of death:
- reduce the number of different classes - clean up the internal code - modify the interface to expose less internal details (this will allow more flexibility with port numbers) TEST=many BUG=49680 Review URL: http://codereview.chromium.org/3080029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/geolocation/geolocation_browsertest.cc')
-rw-r--r--chrome/browser/geolocation/geolocation_browsertest.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index a9cee1f..9e975a9 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -205,14 +205,12 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
bool Initialize(InitializationOptions options) WARN_UNUSED_RESULT {
GeolocationArbitrator::SetProviderFactoryForTest(
&NewAutoSuccessMockNetworkLocationProvider);
- if (!server_.get()) {
- server_ = StartHTTPServer();
- EXPECT_TRUE(server_.get());
- if (!server_.get())
- return false;
- }
+ bool started = test_server()->Start();
+ EXPECT_TRUE(started);
+ if (!started)
+ return false;
- current_url_ = server_->TestServerPage(html_for_tests_);
+ current_url_ = test_server()->GetURL(html_for_tests_);
LOG(WARNING) << "before navigate";
if (options == INITIALIZATION_OFFTHERECORD) {
ui_test_utils::OpenURLOffTheRecord(browser()->profile(), current_url_);
@@ -330,7 +328,6 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
expected, function, current_browser_->GetSelectedTabContents());
}
- scoped_refptr<net::HTTPTestServer> server_;
InfoBarDelegate* infobar_;
Browser* current_browser_;
// path element of a URL referencing the html content for this test.