From b520d4e30f4987dc7bebc5526a5ba1be3831f92a Mon Sep 17 00:00:00 2001 From: "adamk@chromium.org" Date: Fri, 25 Mar 2011 19:11:43 +0000 Subject: Run the Worker tests for resolveLocalFileSystemURL that were added in http://trac.webkit.org/changeset/81640. Includes updates to the testing framework to mirror the way NRWT runs HTTP tests. R=michaeln@chromium.org Review URL: http://codereview.chromium.org/6727001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79434 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/automation/proxy_launcher.cc | 5 ++++- chrome/test/ui/ui_layout_test.cc | 2 +- chrome/test/ui/ui_test.cc | 9 +++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) (limited to 'chrome') diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc index baeff496..90a62b2 100644 --- a/chrome/test/automation/proxy_launcher.cc +++ b/chrome/test/automation/proxy_launcher.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -419,6 +419,9 @@ void ProxyLauncher::PrepareTestCommandline(CommandLine* command_line, // Allow file:// access on ChromeOS. command_line->AppendSwitch(switches::kAllowFileAccess); + + // Allow testing File API over http. + command_line->AppendSwitch(switches::kUnlimitedQuotaForFiles); } bool ProxyLauncher::LaunchBrowserHelper(const LaunchState& state, bool wait, diff --git a/chrome/test/ui/ui_layout_test.cc b/chrome/test/ui/ui_layout_test.cc index 222358b..1322276 100644 --- a/chrome/test/ui/ui_layout_test.cc +++ b/chrome/test/ui/ui_layout_test.cc @@ -212,7 +212,7 @@ void UILayoutTest::RunLayoutTest(const std::string& test_case_file_name, scoped_ptr new_test_url; if (port != kNoHttpPort) new_test_url.reset(new GURL( - StringPrintf("http://localhost:%d/", port) + + StringPrintf("http://127.0.0.1:%d/", port) + url_path + "/" + test_case_file_name)); else new_test_url.reset(new GURL(net::FilePathToFileURL(new_test_file_path))); diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 98e6bec..6c10ea1 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -560,6 +560,15 @@ void UITest::StartHttpServerWithPort(const FilePath& root_directory, cmd_line->AppendSwitch("register_cygwin"); cmd_line->AppendSwitchPath("root", root_directory); + FilePath layout_tests_dir; + PathService::Get(base::DIR_SOURCE_ROOT, &layout_tests_dir); + layout_tests_dir = layout_tests_dir.AppendASCII("chrome") + .AppendASCII("test") + .AppendASCII("data") + .AppendASCII("layout_tests") + .AppendASCII("LayoutTests"); + cmd_line->AppendSwitchPath("layout_tests_dir", layout_tests_dir); + // For Windows 7, if we start the lighttpd server on the foreground mode, // it will mess up with the command window and cause conhost.exe to crash. To // work around this, we start the http server on the background mode. -- cgit v1.1