diff options
Diffstat (limited to 'Tools/DumpRenderTree/chromium/WebViewHost.cpp')
| -rw-r--r-- | Tools/DumpRenderTree/chromium/WebViewHost.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Tools/DumpRenderTree/chromium/WebViewHost.cpp b/Tools/DumpRenderTree/chromium/WebViewHost.cpp index 1dca46053..ba5ecf0c8 100644 --- a/Tools/DumpRenderTree/chromium/WebViewHost.cpp +++ b/Tools/DumpRenderTree/chromium/WebViewHost.cpp @@ -1279,8 +1279,8 @@ void WebViewHost::willSendRequest(WebFrame* frame, unsigned identifier, WebURLRe GURL url = request.url(); string requestURL = url.possibly_invalid_spec(); + GURL mainDocumentURL = request.firstPartyForCookies(); if (layoutTestController()->shouldDumpResourceLoadCallbacks()) { - GURL mainDocumentURL = request.firstPartyForCookies(); printResourceDescription(identifier); printf(" - willSendRequest <NSURLRequest URL %s, main document URL %s," " http method %s> redirectResponse ", @@ -1306,9 +1306,8 @@ void WebViewHost::willSendRequest(WebFrame* frame, unsigned identifier, WebURLRe string host = url.host(); if (!host.empty() && (url.SchemeIs("http") || url.SchemeIs("https"))) { - GURL testURL = webView()->mainFrame()->document().url(); - const string& testHost = testURL.host(); - if (!isLocalhost(host) && !hostIsUsedBySomeTestsToGenerateError(host) && ((!testURL.SchemeIs("http") && !testURL.SchemeIs("https")) || isLocalhost(testHost)) + if (!isLocalhost(host) && !hostIsUsedBySomeTestsToGenerateError(host) + && ((!mainDocumentURL.SchemeIs("http") && !mainDocumentURL.SchemeIs("https")) || isLocalhost(mainDocumentURL.host())) && !m_shell->allowExternalPages()) { printf("Blocked access to external URL %s\n", requestURL.c_str()); blockRequest(request); @@ -1763,6 +1762,11 @@ void WebViewHost::setPendingExtraData(PassOwnPtr<TestShellExtraData> extraData) m_pendingExtraData = extraData; } +void WebViewHost::setGamepadData(const WebGamepads& pads) +{ + webkit_support::SetGamepadData(pads); +} + void WebViewHost::setPageTitle(const WebString&) { // Nothing to do in layout test. |
