diff options
Diffstat (limited to 'Tools/DumpRenderTree/blackberry')
3 files changed, 24 insertions, 12 deletions
diff --git a/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp b/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp index 620e6acd5..a19742c33 100644 --- a/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp +++ b/Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp @@ -24,6 +24,7 @@ #include "BackForwardController.h" #include "BackForwardListImpl.h" #include "CString.h" +#include "Credential.h" #include "DatabaseTracker.h" #include "DocumentLoader.h" #include "DumpRenderTree/GCController.h" @@ -124,6 +125,12 @@ static String drtFrameDescription(WebCore::Frame* frame) return "frame (anonymous)"; } +static WTF::String drtCredentialDescription(WebCore::Credential&) +{ + // TODO: Implementation needed. + return "<unknown>"; +} + static bool shouldLogFrameLoadDelegates(const String& url) { return url.contains("loading/"); @@ -857,6 +864,20 @@ void DumpRenderTree::didReceiveResponseForFrame(WebCore::Frame* frame, const Web printf("%s has MIME type %s\n", response.url().lastPathComponent().utf8().data(), response.mimeType().utf8().data()); } +bool DumpRenderTree::didReceiveAuthenticationChallenge(WebCore::Credential& credential) +{ + if (!gLayoutTestController->handlesAuthenticationChallenges()) { + credential = WebCore::Credential(); + printf("%s - didReceiveAuthenticationChallenge - Simulating cancelled authentication\n", drtCredentialDescription(credential).utf8().data()); + return false; + } + const char* user = gLayoutTestController->authenticationUsername().c_str(); + const char* password = gLayoutTestController->authenticationPassword().c_str(); + credential = WebCore::Credential(user, password, WebCore::CredentialPersistenceForSession); + printf("%s - didReceiveAuthenticationChallenge - Responding with %s:%s\n", drtCredentialDescription(credential).utf8().data(), user, password); + return true; +} + } } diff --git a/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h b/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h index 2ff69161c..c6eba9d19 100644 --- a/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h +++ b/Tools/DumpRenderTree/blackberry/DumpRenderTreeBlackBerry.h @@ -28,8 +28,9 @@ #include <wtf/Vector.h> namespace WebCore { -class Frame; +class Credential; class DOMWrapperWorld; +class Frame; class Range; } @@ -101,6 +102,7 @@ public: bool isSelectTrailingWhitespaceEnabled() const { return s_selectTrailingWhitespaceEnabled; } void setSelectTrailingWhitespaceEnabled(bool enabled) { s_selectTrailingWhitespaceEnabled = enabled; } + bool didReceiveAuthenticationChallenge(WebCore::Credential&); private: void runTest(const String& url); diff --git a/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp b/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp index aee4e6f20..c97ba39c1 100644 --- a/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp +++ b/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp @@ -234,12 +234,6 @@ void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled) notImplemented(); } -void LayoutTestController::setJavaScriptProfilingEnabled(bool profilingEnabled) -{ - UNUSED_PARAM(profilingEnabled); - notImplemented(); -} - void LayoutTestController::setMainFrameIsFirstResponder(bool flag) { UNUSED_PARAM(flag); @@ -705,11 +699,6 @@ void LayoutTestController::setTextDirection(JSStringRef) notImplemented(); } -void LayoutTestController::allowRoundingHacks() -{ - notImplemented(); -} - void LayoutTestController::goBack() { // FIXME: implement to enable loader/navigation-while-deferring-loads.html |