Diff
Modified: trunk/LayoutTests/ChangeLog (94078 => 94079)
--- trunk/LayoutTests/ChangeLog 2011-08-30 15:28:03 UTC (rev 94078)
+++ trunk/LayoutTests/ChangeLog 2011-08-30 16:00:46 UTC (rev 94079)
@@ -1,3 +1,14 @@
+2011-08-30 Ben Wells <[email protected]>
+
+ Update registerProtocolHandler scheme whitelist to match spec
+ https://bugs.webkit.org/show_bug.cgi?id=67104
+
+ Reviewed by Darin Adler.
+
+ * fast/dom/register-protocol-handler-expected.txt:
+ * fast/dom/register-protocol-handler.html:
+ * platform/chromium/fast/dom/register-protocol-handler-expected.txt:
+
2011-08-30 Sheriff Bot <[email protected]>
Unreviewed, rolling out r94076.
Modified: trunk/LayoutTests/fast/dom/register-protocol-handler-expected.txt (94078 => 94079)
--- trunk/LayoutTests/fast/dom/register-protocol-handler-expected.txt 2011-08-30 15:28:03 UTC (rev 94078)
+++ trunk/LayoutTests/fast/dom/register-protocol-handler-expected.txt 2011-08-30 16:00:46 UTC (rev 94079)
@@ -4,6 +4,16 @@
Fail: Invalid protocol "http" allowed.
Fail: Invalid protocol "https" allowed.
Fail: Invalid protocol "file" allowed.
+Fail: Valid protocol "irc" failed.
+Fail: Valid protocol "mailto" failed.
+Fail: Valid protocol "mms" failed.
+Fail: Valid protocol "news" failed.
+Fail: Valid protocol "nntp" failed.
+Fail: Valid protocol "sms" failed.
+Fail: Valid protocol "smsto" failed.
+Fail: Valid protocol "tel" failed.
+Fail: Valid protocol "urn" failed.
+Fail: Valid protocol "webcal" failed.
Fail: Invalid url "" allowed.
Fail: Invalid url "%S" allowed.
Fail: Invalid call did not succeed.
Modified: trunk/LayoutTests/fast/dom/register-protocol-handler.html (94078 => 94079)
--- trunk/LayoutTests/fast/dom/register-protocol-handler.html 2011-08-30 15:28:03 UTC (rev 94078)
+++ trunk/LayoutTests/fast/dom/register-protocol-handler.html 2011-08-30 16:00:46 UTC (rev 94079)
@@ -32,6 +32,22 @@
debug('Fail: Invalid protocol "' + protocol + '" allowed.');
});
+var valid_protocols = ['irc', 'mailto', 'mms', 'news', 'nntp', 'sms', 'smsto', 'tel', 'urn', 'webcal'];
+valid_protocols.forEach(function (protocol) {
+ var succeeded = false;
+ try {
+ window.navigator.registerProtocolHandler(protocol, "valid protocol %s", "title");
+ succeeded = true;
+ } catch (e) {
+ succeeded = false;
+ }
+
+ if (succeeded)
+ debug('Pass: Valid protocol "' + protocol + '" allowed.');
+ else
+ debug('Fail: Valid protocol "' + protocol + '" failed.');
+});
+
var invalid_urls = ["", "%S"];
invalid_urls.forEach(function (url) {
var succeeded = false;
Modified: trunk/LayoutTests/platform/chromium/fast/dom/register-protocol-handler-expected.txt (94078 => 94079)
--- trunk/LayoutTests/platform/chromium/fast/dom/register-protocol-handler-expected.txt 2011-08-30 15:28:03 UTC (rev 94078)
+++ trunk/LayoutTests/platform/chromium/fast/dom/register-protocol-handler-expected.txt 2011-08-30 16:00:46 UTC (rev 94079)
@@ -4,6 +4,16 @@
Pass: Invalid protocol "http" threw SECURITY_ERR exception.
Pass: Invalid protocol "https" threw SECURITY_ERR exception.
Pass: Invalid protocol "file" threw SECURITY_ERR exception.
+Pass: Valid protocol "irc" allowed.
+Pass: Valid protocol "mailto" allowed.
+Pass: Valid protocol "mms" allowed.
+Pass: Valid protocol "news" allowed.
+Pass: Valid protocol "nntp" allowed.
+Pass: Valid protocol "sms" allowed.
+Pass: Valid protocol "smsto" allowed.
+Pass: Valid protocol "tel" allowed.
+Pass: Valid protocol "urn" allowed.
+Pass: Valid protocol "webcal" allowed.
Pass: Invalid url "" threw SYNTAX_ERR exception.
Pass: Invalid url "%S" threw SYNTAX_ERR exception.
Pass: Valid call succeeded.
Modified: trunk/Source/WebCore/ChangeLog (94078 => 94079)
--- trunk/Source/WebCore/ChangeLog 2011-08-30 15:28:03 UTC (rev 94078)
+++ trunk/Source/WebCore/ChangeLog 2011-08-30 16:00:46 UTC (rev 94079)
@@ -1,3 +1,13 @@
+2011-08-30 Ben Wells <[email protected]>
+
+ Update registerProtocolHandler scheme whitelist to match spec
+ https://bugs.webkit.org/show_bug.cgi?id=67104
+
+ Reviewed by Darin Adler.
+
+ * page/Navigator.cpp:
+ (WebCore::initProtocolHandlerWhitelist):
+
2011-08-30 Vsevolod Vlasov <[email protected]>
Web Inspector: Inspected page sometimes crashes in InspectorResourceAgent::didFailLoading
Modified: trunk/Source/WebCore/page/Navigator.cpp (94078 => 94079)
--- trunk/Source/WebCore/page/Navigator.cpp 2011-08-30 15:28:03 UTC (rev 94078)
+++ trunk/Source/WebCore/page/Navigator.cpp 2011-08-30 16:00:46 UTC (rev 94079)
@@ -190,10 +190,15 @@
{
protocolWhitelist = new HashSet<String>;
static const char* protocols[] = {
+ "irc",
"mailto",
"mms",
+ "news",
"nntp",
- "rtsp",
+ "sms",
+ "smsto",
+ "tel",
+ "urn",
"webcal",
};
for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i)