Changeset 152162 in webkit


Ignore:
Timestamp:
Jun 28, 2013 5:28:00 AM (11 years ago)
Author:
gyuyoung.kim@samsung.com
Message:

Add new schemes to content utils.
https://bugs.webkit.org/show_bug.cgi?id=118181

Reviewed by Christophe Dumez.

Source/WebCore:

According to latest content handler spec, new schemes are added to it.
Those are "geo, magnet, sip, ssh and xmpp".

http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers

Tests: fast/dom/register-protocol-handler.html

fast/dom/unregister-protocol-handler.html

  • Modules/navigatorcontentutils/NavigatorContentUtils.cpp:

(WebCore::initProtocolHandlerWhitelist):

LayoutTests:

Add new schemes as well as change SYNTAX_ERR, SECURITY_ERR.

  • fast/dom/register-protocol-handler-expected.txt:
  • fast/dom/register-protocol-handler.html:
  • fast/dom/unregister-protocol-handler-expected.txt:
  • fast/dom/unregister-protocol-handler.html:
  • platform/efl/fast/dom/register-protocol-handler-expected.txt:
  • platform/efl/fast/dom/unregister-protocol-handler-expected.txt:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r152160 r152162  
     12013-06-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        Add new schemes to content utils.
     4        https://bugs.webkit.org/show_bug.cgi?id=118181
     5
     6        Reviewed by Christophe Dumez.
     7
     8        Add new schemes as well as change SYNTAX_ERR, SECURITY_ERR.
     9
     10        * fast/dom/register-protocol-handler-expected.txt:
     11        * fast/dom/register-protocol-handler.html:
     12        * fast/dom/unregister-protocol-handler-expected.txt:
     13        * fast/dom/unregister-protocol-handler.html:
     14        * platform/efl/fast/dom/register-protocol-handler-expected.txt:
     15        * platform/efl/fast/dom/unregister-protocol-handler-expected.txt:
     16
    1172013-06-28  Simon Pena  <simon.pena@samsung.com>
    218
  • trunk/LayoutTests/fast/dom/register-protocol-handler-expected.txt

    r94079 r152162  
    66Fail: Invalid protocol "file" allowed.
    77Fail: Valid protocol "irc" failed.
     8Fail: Valid protocol "geo" failed.
    89Fail: Valid protocol "mailto" failed.
     10Fail: Valid protocol "magnet" failed.
    911Fail: Valid protocol "mms" failed.
    1012Fail: Valid protocol "news" failed.
    1113Fail: Valid protocol "nntp" failed.
     14Fail: Valid protocol "sip" failed.
    1215Fail: Valid protocol "sms" failed.
    1316Fail: Valid protocol "smsto" failed.
     17Fail: Valid protocol "ssh" failed.
    1418Fail: Valid protocol "tel" failed.
    1519Fail: Valid protocol "urn" failed.
    1620Fail: Valid protocol "webcal" failed.
     21Fail: Valid protocol "xmpp" failed.
    1722Fail: Invalid url "" allowed.
    1823Fail: Invalid url "%S" allowed.
  • trunk/LayoutTests/fast/dom/register-protocol-handler.html

    r135162 r152162  
    3333});
    3434
    35 var valid_protocols = ['irc', 'mailto', 'mms', 'news', 'nntp', 'sms', 'smsto', 'tel', 'urn', 'webcal'];
     35var valid_protocols = ['irc', 'geo', 'mailto', 'magnet', 'mms', 'news', 'nntp', 'sip', 'sms', 'smsto', 'ssh', 'tel', 'urn', 'webcal', 'xmpp'];
    3636valid_protocols.forEach(function (protocol) {
    3737    var succeeded = false;
  • trunk/LayoutTests/fast/dom/unregister-protocol-handler-expected.txt

    r119482 r152162  
    66Fail: Invalid protocol "file" allowed.
    77Fail: Valid protocol "irc" failed.
     8Fail: Valid protocol "geo" failed.
    89Fail: Valid protocol "mailto" failed.
     10Fail: Valid protocol "magnet" failed.
    911Fail: Valid protocol "mms" failed.
    1012Fail: Valid protocol "news" failed.
    1113Fail: Valid protocol "nntp" failed.
     14Fail: Valid protocol "sip" failed.
    1215Fail: Valid protocol "sms" failed.
    1316Fail: Valid protocol "smsto" failed.
     17Fail: Valid protocol "ssh" failed.
    1418Fail: Valid protocol "tel" failed.
    1519Fail: Valid protocol "urn" failed.
    1620Fail: Valid protocol "webcal" failed.
     21Fail: Valid protocol "xmpp" failed.
    1722Fail: Invalid url "" allowed.
    1823Fail: Invalid url "%S" allowed.
  • trunk/LayoutTests/fast/dom/unregister-protocol-handler.html

    r120792 r152162  
    2424        window.navigator.unregisterProtocolHandler(protocol, "invalid protocol %s", "title");
    2525    } catch (e) {
    26         succeeded = 'SECURITY_ERR' == e.name;
     26        succeeded = 'SecurityError' == e.name;
    2727    }
    2828
    2929    if (succeeded)
    30         debug('Pass: Invalid protocol "' + protocol + '" threw SECURITY_ERR exception.');
     30        debug('Pass: Invalid protocol "' + protocol + '" threw SecurityError exception.');
    3131    else
    3232        debug('Fail: Invalid protocol "' + protocol + '" allowed.');
    3333});
    3434
    35 var valid_protocols = ['irc', 'mailto', 'mms', 'news', 'nntp', 'sms', 'smsto', 'tel', 'urn', 'webcal'];
     35var valid_protocols = ['irc', 'geo', 'mailto', 'magnet', 'mms', 'news', 'nntp', 'sip', 'sms', 'smsto', 'ssh', 'tel', 'urn', 'webcal', 'xmpp'];
    3636valid_protocols.forEach(function (protocol) {
    3737    var succeeded = false;
     
    5555        window.navigator.unregisterProtocolHandler('web+myprotocol', url, 'title');
    5656    } catch (e) {
    57         succeeded = 'SYNTAX_ERR' == e.name;
     57        succeeded = 'SyntaxError' == e.name;
    5858    }
    5959
    6060    if (succeeded)
    61         debug('Pass: Invalid url "' + url + '" threw SYNTAX_ERR exception.');
     61        debug('Pass: Invalid url "' + url + '" threw SyntaxError exception.');
    6262    else
    6363        debug('Fail: Invalid url "' + url + '" allowed.');
  • trunk/LayoutTests/platform/efl/fast/dom/register-protocol-handler-expected.txt

    r152158 r152162  
    66Pass: Invalid protocol "file" threw SecurityError exception.
    77Pass: Valid protocol "irc" allowed.
     8Pass: Valid protocol "geo" allowed.
    89Pass: Valid protocol "mailto" allowed.
     10Pass: Valid protocol "magnet" allowed.
    911Pass: Valid protocol "mms" allowed.
    1012Pass: Valid protocol "news" allowed.
    1113Pass: Valid protocol "nntp" allowed.
     14Pass: Valid protocol "sip" allowed.
    1215Pass: Valid protocol "sms" allowed.
    1316Pass: Valid protocol "smsto" allowed.
     17Pass: Valid protocol "ssh" allowed.
    1418Pass: Valid protocol "tel" allowed.
    1519Pass: Valid protocol "urn" allowed.
    1620Pass: Valid protocol "webcal" allowed.
     21Pass: Valid protocol "xmpp" allowed.
    1722Pass: Invalid url "" threw SyntaxError exception.
    1823Pass: Invalid url "%S" threw SyntaxError exception.
  • trunk/LayoutTests/platform/efl/fast/dom/unregister-protocol-handler-expected.txt

    r152158 r152162  
    66Pass: Invalid protocol "file" threw SecurityError exception.
    77Pass: Valid protocol "irc" allowed.
     8Pass: Valid protocol "geo" allowed.
    89Pass: Valid protocol "mailto" allowed.
     10Pass: Valid protocol "magnet" allowed.
    911Pass: Valid protocol "mms" allowed.
    1012Pass: Valid protocol "news" allowed.
    1113Pass: Valid protocol "nntp" allowed.
     14Pass: Valid protocol "sip" allowed.
    1215Pass: Valid protocol "sms" allowed.
    1316Pass: Valid protocol "smsto" allowed.
     17Pass: Valid protocol "ssh" allowed.
    1418Pass: Valid protocol "tel" allowed.
    1519Pass: Valid protocol "urn" allowed.
    1620Pass: Valid protocol "webcal" allowed.
     21Pass: Valid protocol "xmpp" allowed.
    1722Pass: Invalid url "" threw SyntaxError exception.
    1823Pass: Invalid url "%S" threw SyntaxError exception.
  • trunk/Source/WebCore/ChangeLog

    r152161 r152162  
     12013-06-28  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
     2
     3        Add new schemes to content utils.
     4        https://bugs.webkit.org/show_bug.cgi?id=118181
     5
     6        Reviewed by Christophe Dumez.
     7
     8        According to latest content handler spec, new schemes are added to it.
     9        Those are "geo, magnet, sip, ssh and xmpp".
     10
     11        http://www.w3.org/html/wg/drafts/html/master/webappapis.html#custom-handlers
     12
     13        Tests: fast/dom/register-protocol-handler.html
     14               fast/dom/unregister-protocol-handler.html
     15
     16        * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
     17        (WebCore::initProtocolHandlerWhitelist):
     18
    1192013-06-28  Sanghyup Lee  <sh53.lee@samsung.com>
    220
  • trunk/Source/WebCore/Modules/navigatorcontentutils/NavigatorContentUtils.cpp

    r149794 r152162  
    4747    static const char* protocols[] = {
    4848        "irc",
     49        "geo",
    4950        "mailto",
     51        "magnet",
    5052        "mms",
    5153        "news",
    5254        "nntp",
     55        "sip",
    5356        "sms",
    5457        "smsto",
     58        "ssh",
    5559        "tel",
    5660        "urn",
    5761        "webcal",
     62        "xmpp"
    5863    };
    5964    for (size_t i = 0; i < WTF_ARRAY_LENGTH(protocols); ++i)
Note: See TracChangeset for help on using the changeset viewer.