⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 94079 in webkit


Ignore:
Timestamp:
Aug 30, 2011, 9:00:46 AM (15 years ago)
Author:
commit-queue@webkit.org
Message:

Update registerProtocolHandler scheme whitelist to match spec
https://bugs.webkit.org/show_bug.cgi?id=67104

Patch by Ben Wells <benwells@chromium.org> on 2011-08-30
Reviewed by Darin Adler.

Source/WebCore:

  • page/Navigator.cpp:

(WebCore::initProtocolHandlerWhitelist):

LayoutTests:

  • fast/dom/register-protocol-handler-expected.txt:
  • fast/dom/register-protocol-handler.html:
  • platform/chromium/fast/dom/register-protocol-handler-expected.txt:
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r94077 r94079  
     12011-08-30  Ben Wells  <benwells@chromium.org>
     2
     3        Update registerProtocolHandler scheme whitelist to match spec
     4        https://bugs.webkit.org/show_bug.cgi?id=67104
     5
     6        Reviewed by Darin Adler.
     7
     8        * fast/dom/register-protocol-handler-expected.txt:
     9        * fast/dom/register-protocol-handler.html:
     10        * platform/chromium/fast/dom/register-protocol-handler-expected.txt:
     11
    1122011-08-30  Sheriff Bot  <webkit.review.bot@gmail.com>
    213
  • trunk/LayoutTests/fast/dom/register-protocol-handler-expected.txt

    r77607 r94079  
    55Fail: Invalid protocol "https" allowed.
    66Fail: Invalid protocol "file" allowed.
     7Fail: Valid protocol "irc" failed.
     8Fail: Valid protocol "mailto" failed.
     9Fail: Valid protocol "mms" failed.
     10Fail: Valid protocol "news" failed.
     11Fail: Valid protocol "nntp" failed.
     12Fail: Valid protocol "sms" failed.
     13Fail: Valid protocol "smsto" failed.
     14Fail: Valid protocol "tel" failed.
     15Fail: Valid protocol "urn" failed.
     16Fail: Valid protocol "webcal" failed.
    717Fail: Invalid url "" allowed.
    818Fail: Invalid url "%S" allowed.
  • trunk/LayoutTests/fast/dom/register-protocol-handler.html

    r87459 r94079  
    3333});
    3434
     35var valid_protocols = ['irc', 'mailto', 'mms', 'news', 'nntp', 'sms', 'smsto', 'tel', 'urn', 'webcal'];
     36valid_protocols.forEach(function (protocol) {
     37    var succeeded = false;
     38    try {
     39        window.navigator.registerProtocolHandler(protocol, "valid protocol %s", "title");
     40        succeeded = true;
     41    } catch (e) {
     42        succeeded = false;
     43    }
     44
     45    if (succeeded)
     46        debug('Pass: Valid protocol "' + protocol + '" allowed.');
     47    else
     48        debug('Fail: Valid protocol "' + protocol + '" failed.');
     49});
     50
    3551var invalid_urls = ["", "%S"];
    3652invalid_urls.forEach(function (url) {
  • trunk/LayoutTests/platform/chromium/fast/dom/register-protocol-handler-expected.txt

    r87713 r94079  
    55Pass: Invalid protocol "https" threw SECURITY_ERR exception.
    66Pass: Invalid protocol "file" threw SECURITY_ERR exception.
     7Pass: Valid protocol "irc" allowed.
     8Pass: Valid protocol "mailto" allowed.
     9Pass: Valid protocol "mms" allowed.
     10Pass: Valid protocol "news" allowed.
     11Pass: Valid protocol "nntp" allowed.
     12Pass: Valid protocol "sms" allowed.
     13Pass: Valid protocol "smsto" allowed.
     14Pass: Valid protocol "tel" allowed.
     15Pass: Valid protocol "urn" allowed.
     16Pass: Valid protocol "webcal" allowed.
    717Pass: Invalid url "" threw SYNTAX_ERR exception.
    818Pass: Invalid url "%S" threw SYNTAX_ERR exception.
  • trunk/Source/WebCore/ChangeLog

    r94078 r94079  
     12011-08-30  Ben Wells  <benwells@chromium.org>
     2
     3        Update registerProtocolHandler scheme whitelist to match spec
     4        https://bugs.webkit.org/show_bug.cgi?id=67104
     5
     6        Reviewed by Darin Adler.
     7
     8        * page/Navigator.cpp:
     9        (WebCore::initProtocolHandlerWhitelist):
     10
    1112011-08-30  Vsevolod Vlasov  <vsevik@chromium.org>
    212
  • trunk/Source/WebCore/page/Navigator.cpp

    r87713 r94079  
    191191    protocolWhitelist = new HashSet<String>;
    192192    static const char* protocols[] = {
     193        "irc",
    193194        "mailto",
    194195        "mms",
     196        "news",
    195197        "nntp",
    196         "rtsp",
     198        "sms",
     199        "smsto",
     200        "tel",
     201        "urn",
    197202        "webcal",
    198203    };
Note: See TracChangeset for help on using the changeset viewer.