https://bugs.webkit.org/show_bug.cgi?id=80135
Patch by Jonathan Dong <jonathan.dong@torchmobile.com.cn> on 2012-03-31
Reviewed by Rob Buis.
.:
RIM PR: 145660
Added manual test for testing the behavior of http authentication
challenge dialog. Both of these two files should be served over http.
* ManualTests/blackberry/http-auth-challenge.html: Added.
* ManualTests/blackberry/http-auth-challenge.php: Added.
Source/WebCore:
RIM PR: 145660
Fixed a regression introduced by r111810, we should cancel the new
request when user press cancel button in http authentication challenge
dialog, and we should also allow sending empty username and password
with the request.
Also removed redundant codes which checked the existence of the
FrameLoaderClient pointer, as we've already moved authenticationChallenge()
out of class FrameLoaderClient, it is not needed.
Manual test added. Testing http authentication dialog relies on user interaction.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::sendRequestWithCredentials):
Source/WebKit/blackberry:
RIM PR: 145660
Fixed a regression introduced by r111810, which used the wrong
credential object.
* Api/WebPage.cpp:
(BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112794
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-31 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
+ https://bugs.webkit.org/show_bug.cgi?id=80135
+
+ Reviewed by Rob Buis.
+
+ RIM PR: 145660
+ Added manual test for testing the behavior of http authentication
+ challenge dialog. Both of these two files should be served over http.
+
+ * ManualTests/blackberry/http-auth-challenge.html: Added.
+ * ManualTests/blackberry/http-auth-challenge.php: Added.
+
2012-03-30 Eli Fidler <efidler@rim.com>
Enable OpenType Sanitizer for BlackBerry port.
--- /dev/null
+<html>
+ <body>
+ <p>To run this test, both http-auth-challenge.html and http-auth-challenge.php must be served over http.</p>
+ <p>This test case is to test the behavior of http authentication challenge dialog. This is for <a href="https://bugs.webkit.org/show_bug.cgi?id=80135">https://bugs.webkit.org/show_bug.cgi?id=80135</a></p>
+ <p>
+ Please follow the following test procedure:
+ <ol>
+ <li>Test dialog behavior when press Cancel button</li>
+ <ol>
+ <li>Start test case, then press Cancel button when authentication dialog pops up;</li>
+ </ol>
+ <li>Test dialog behavior when press OK button</li>
+ <ol>
+ <li>Navigate back to the privious page;</li>
+ <li>Start test case again, then press Ok button without input anything when authentication dialog pops up;</li>
+ <li>When dialog pops up again, enter fake credential and press Ok button: username:"qqqq", password:"qqqq"</li>
+ <li>When dialog pops up agian, enter real credential and press Ok button: username:"aaaa", password:"aaaa"</li>
+ </ol>
+ </ol>
+ <a href="http-auth-challenge.php">Start test here</a>
+ </p>
+
+ </body>
+</html>
--- /dev/null
+<?php
+ session_start();
+ if (isset($_SESSION['triedTimes']))
+ $_SESSION['triedTimes'] = $_SESSION['triedTimes'] + 1;
+ else
+ $_SESSION['triedTimes'] = 1;
+
+ $username = $password = "aaaa";
+
+ if ($_SERVER['PHP_AUTH_USER'] == $username && $_SERVER['PHP_AUTH_PW'] == $password){
+ echo "Auth dialog behavior when press OK button: ";
+ if ($_SESSION['triedTimes'] == 5)
+ echo "<span style='color:green'>PASS</span>";
+ else
+ echo "<span style='color:red'>FAIL</span>";
+ exit;
+ } else {
+ header('WWW-Authenticate: Basic realm="My Realm"');
+ header('HTTP/1.0 401 Unauthorized');
+ echo "Auth dialog behavior when press Cancel button: ";
+ if ($_SESSION['triedTimes'] == 1)
+ echo "<span style='color:green'>PASS</span>";
+ else
+ echo "<span style='color:red'>FAIL</span>";
+ exit;
+ }
+?>
+2012-03-31 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
+ https://bugs.webkit.org/show_bug.cgi?id=80135
+
+ Reviewed by Rob Buis.
+
+ RIM PR: 145660
+ Fixed a regression introduced by r111810, we should cancel the new
+ request when user press cancel button in http authentication challenge
+ dialog, and we should also allow sending empty username and password
+ with the request.
+ Also removed redundant codes which checked the existence of the
+ FrameLoaderClient pointer, as we've already moved authenticationChallenge()
+ out of class FrameLoaderClient, it is not needed.
+
+ Manual test added. Testing http authentication dialog relies on user interaction.
+
+ * platform/network/blackberry/NetworkJob.cpp:
+ (WebCore::NetworkJob::sendRequestWithCredentials):
+
2012-03-31 Charles Wei <charles.wei@torchmobile.com.cn>
[BlackBerry] Upstream BlackBerry change to PlatformTouchEvent and PlatformTouchPoint
String username;
String password;
- if (!m_frame || !m_frame->loader() || !m_frame->loader()->client())
- return false;
-
// Before asking the user for credentials, we check if the URL contains that.
if (!m_handle->getInternal()->m_user.isEmpty() && !m_handle->getInternal()->m_pass.isEmpty()) {
username = m_handle->getInternal()->m_user.utf8().data();
m_handle->getInternal()->m_pass = "";
} else {
Credential inputCredential;
- bool isConfirmed = false;
- do {
- isConfirmed = m_frame->page()->chrome()->client()->platformPageClient()->authenticationChallenge(newURL, protectionSpace, inputCredential);
- username = inputCredential.user();
- password = inputCredential.password();
- } while (isConfirmed && username.isEmpty() && password.isEmpty());
+ bool isConfirmed = m_frame->page()->chrome()->client()->platformPageClient()->authenticationChallenge(newURL, protectionSpace, inputCredential);
+ username = inputCredential.user();
+ password = inputCredential.password();
+
+ if (!isConfirmed)
+ return false;
}
credential = Credential(username, password, CredentialPersistenceForSession);
#if ENABLE(BLACKBERRY_CREDENTIAL_PERSIST)
Credential credential(username, password, CredentialPersistencePermanent);
if (!m_webSettings->isPrivateBrowsingEnabled())
- credentialManager().saveCredentialIfConfirmed(this, CredentialTransformData(url, protectionSpace, inputCredential));
+ credentialManager().saveCredentialIfConfirmed(this, CredentialTransformData(url, protectionSpace, credential));
#else
Credential credential(username, password, CredentialPersistenceNone);
#endif
+2012-03-31 Jonathan Dong <jonathan.dong@torchmobile.com.cn>
+
+ [BlackBerry] http authenticate dialog popup only once no matter authentication pass or fail
+ https://bugs.webkit.org/show_bug.cgi?id=80135
+
+ Reviewed by Rob Buis.
+
+ RIM PR: 145660
+ Fixed a regression introduced by r111810, which used the wrong
+ credential object.
+
+ * Api/WebPage.cpp:
+ (BlackBerry::WebKit::WebPagePrivate::authenticationChallenge):
+
2012-03-30 Mike Fenton <mifenton@rim.com>
[BlackBerry] Speed up processing of Selection region generation.