diff options
6 files changed, 8 insertions, 24 deletions
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/security/block-test-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/security/block-test-expected.txt index 8a1af1d..54e0571 100644 --- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/security/block-test-expected.txt +++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/security/block-test-expected.txt @@ -118,11 +118,11 @@ http://255.255.255.255:4045/test.jpg - didFailLoadingWithError: <NSError domain http://255.255.255.255:6000/test.jpg - willSendRequest <NSURLRequest URL http://255.255.255.255:6000/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null) http://255.255.255.255:6000/test.jpg - didFailLoadingWithError: <NSError domain WebKitErrorDomain, code 103, failing URL "http://255.255.255.255:6000/test.jpg"> ftp://255.255.255.255/test.jpg - willSendRequest <NSURLRequest URL ftp://255.255.255.255/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null) -ftp://255.255.255.255/test.jpg - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -1, failing URL "ftp://255.255.255.255/test.jpg"> +ftp://255.255.255.255/test.jpg - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -1004, failing URL "ftp://255.255.255.255/test.jpg"> ftp://255.255.255.255/test.jpg - willSendRequest <NSURLRequest URL ftp://255.255.255.255/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null) -ftp://255.255.255.255/test.jpg - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -1, failing URL "ftp://255.255.255.255/test.jpg"> +ftp://255.255.255.255/test.jpg - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -1004, failing URL "ftp://255.255.255.255/test.jpg"> ftp://255.255.255.255:22/test.jpg - willSendRequest <NSURLRequest URL ftp://255.255.255.255:22/test.jpg, main document URL block-test.html, http method GET> redirectResponse (null) -ftp://255.255.255.255:22/test.jpg - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -1, failing URL "ftp://255.255.255.255:22/test.jpg"> +ftp://255.255.255.255:22/test.jpg - didFailLoadingWithError: <NSError domain NSURLErrorDomain, code -1004, failing URL "ftp://255.255.255.255:22/test.jpg"> This test attempts to change the src of an IMG tag to all black listed ports to confirm that WebKit returns the correct error for them - blocked instead of cannot find. It also tries the FTP ports for exemptions. Due to the nature of this test, the results can only be processed automatically via DumpRenderTree diff --git a/webkit/tools/layout_tests/test_expectations.txt b/webkit/tools/layout_tests/test_expectations.txt index 7a8f630..6b4f9ad 100644 --- a/webkit/tools/layout_tests/test_expectations.txt +++ b/webkit/tools/layout_tests/test_expectations.txt @@ -3048,4 +3048,4 @@ BUG18656 MAC : LayoutTests/fast/dom/Window/window-lookup-precedence.html = FAIL BUG18659 WIN : LayoutTests/http/tests/loading/redirect-methods.html = PASS TIMEOUT BUG18665 MAC : LayoutTests/security/block-test.html = FAIL -BUG18665 MAC LINUX : LayoutTests/security/block-test-no-port.html = FAIL +BUG18665 MAC : LayoutTests/security/block-test-no-port.html = FAIL diff --git a/webkit/tools/test_shell/test_shell_request_context.cc b/webkit/tools/test_shell/test_shell_request_context.cc index 1d1c11c..d93bd36 100644 --- a/webkit/tools/test_shell/test_shell_request_context.cc +++ b/webkit/tools/test_shell/test_shell_request_context.cc @@ -4,13 +4,11 @@ #include "webkit/tools/test_shell/test_shell_request_context.h" -#include "base/command_line.h" #include "net/base/cookie_monster.h" #include "net/base/host_resolver.h" #include "net/ftp/ftp_network_layer.h" #include "net/proxy/proxy_service.h" #include "webkit/glue/webkit_glue.h" -#include "webkit/tools/test_shell/test_shell_switches.h" TestShellRequestContext::TestShellRequestContext() { Init(std::wstring(), net::HttpCache::NORMAL, false); @@ -58,14 +56,7 @@ void TestShellRequestContext::Init( cache->set_mode(cache_mode); http_transaction_factory_ = cache; - // The kNewFtp switch is Windows specific only because we have multiple FTP - // implementations on Windows. -#if defined(OS_WIN) - if (CommandLine::ForCurrentProcess()->HasSwitch(test_shell::kNewFtp)) - ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); -#else ftp_transaction_factory_ = new net::FtpNetworkLayer(host_resolver_); -#endif } TestShellRequestContext::~TestShellRequestContext() { diff --git a/webkit/tools/test_shell/test_shell_switches.cc b/webkit/tools/test_shell/test_shell_switches.cc index ccedc96..0884929 100644 --- a/webkit/tools/test_shell/test_shell_switches.cc +++ b/webkit/tools/test_shell/test_shell_switches.cc @@ -45,9 +45,6 @@ const wchar_t kDumpStatsTable[] = L"stats"; // Use a specified cache directory. const wchar_t kCacheDir[] = L"cache-dir"; -// Temparary option for new ftp implemetation. -const wchar_t kNewFtp[] = L"new-ftp"; - // When being run through a memory profiler, trigger memory in use dumps at // startup and just prior to shutdown. const wchar_t kDebugMemoryInUse[] = L"debug-memory-in-use"; diff --git a/webkit/tools/test_shell/test_shell_switches.h b/webkit/tools/test_shell/test_shell_switches.h index 402e722..be995d1 100644 --- a/webkit/tools/test_shell/test_shell_switches.h +++ b/webkit/tools/test_shell/test_shell_switches.h @@ -23,7 +23,6 @@ extern const wchar_t kPlaybackMode[]; extern const wchar_t kNoEvents[]; extern const wchar_t kDumpStatsTable[]; extern const wchar_t kCacheDir[]; -extern const wchar_t kNewFtp[]; extern const wchar_t kDebugMemoryInUse[]; extern const wchar_t kEnableFileCookies[]; extern const wchar_t kEnableTracing[]; diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 3bda3ef..5280c06 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -138,10 +138,10 @@ std::string GetResponseDescription(const WebURLResponse& response) { } std::string GetErrorDescription(const WebURLError& error) { - std::string domain; - int code; + std::string domain = UTF16ToASCII(error.domain); + int code = error.reason; - if (EqualsASCII(error.domain, net::kErrorDomain)) { + if (domain == net::kErrorDomain) { domain = "NSURLErrorDomain"; switch (error.reason) { case net::ERR_ABORTED: @@ -154,15 +154,12 @@ std::string GetErrorDescription(const WebURLError& error) { code = 103; break; case net::ERR_ADDRESS_INVALID: + case net::ERR_ADDRESS_UNREACHABLE: code = -1004; break; - default: - code = -1; } } else { DLOG(WARNING) << "Unknown error domain"; - domain = UTF16ToASCII(error.domain); - code = error.reason; } return StringPrintf("<NSError domain %s, code %d, failing URL \"%s\">", |