Changeset 206630 in webkit


Ignore:
Timestamp:
Sep 29, 2016 10:05:35 PM (7 years ago)
Author:
Chris Dumez
Message:

Add support for download attribute on area elements
https://bugs.webkit.org/show_bug.cgi?id=162765

Reviewed by Brent Fulgham.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

  • web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

Add support for download attribute on area elements:

Because HTMLAreaElement inherits from HTMLAnchorElement on native side,
and because HTMLAnchorElement already supports the download attribute,
all that was needed was to add the download attribute to
HTMLAreaElement.idl file.

Test: http/tests/download/area-download.html

  • html/HTMLAreaElement.idl:

LayoutTests:

Add layout test coverage.

  • http/tests/download/area-download-expected.txt: Added.
  • http/tests/download/area-download.html: Added.
  • http/tests/download/resources/FAIL-notify-done.html: Added.
Location:
trunk
Files:
3 added
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206627 r206630  
     12016-09-29  Chris Dumez  <cdumez@apple.com>
     2
     3        Add support for download attribute on area elements
     4        https://bugs.webkit.org/show_bug.cgi?id=162765
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Add layout test coverage.
     9
     10        * http/tests/download/area-download-expected.txt: Added.
     11        * http/tests/download/area-download.html: Added.
     12        * http/tests/download/resources/FAIL-notify-done.html: Added.
     13
    1142016-09-29  Jiewen Tan  <jiewen_tan@apple.com>
    215
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r206588 r206630  
     12016-09-29  Chris Dumez  <cdumez@apple.com>
     2
     3        Add support for download attribute on area elements
     4        https://bugs.webkit.org/show_bug.cgi?id=162765
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Rebaseline W3C test now that more checks are passing.
     9
     10        * web-platform-tests/html/dom/reflection-embedded-expected.txt:
     11
    1122016-09-29  Chris Dumez  <cdumez@apple.com>
    213
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt

    r206260 r206630  
    22712271PASS HTMLAreaElement interface: attribute shape
    22722272PASS HTMLAreaElement interface: attribute target
    2273 FAIL HTMLAreaElement interface: attribute download assert_true: The prototype object must have a property "download" expected true got false
     2273PASS HTMLAreaElement interface: attribute download
    22742274PASS HTMLAreaElement interface: attribute ping
    22752275PASS HTMLAreaElement interface: attribute rel
     
    22942294PASS HTMLAreaElement interface: document.createElement("area") must inherit property "shape" with the proper type (2)
    22952295PASS HTMLAreaElement interface: document.createElement("area") must inherit property "target" with the proper type (3)
    2296 FAIL HTMLAreaElement interface: document.createElement("area") must inherit property "download" with the proper type (4) assert_inherits: property "download" not found in prototype chain
     2296PASS HTMLAreaElement interface: document.createElement("area") must inherit property "download" with the proper type (4)
    22972297PASS HTMLAreaElement interface: document.createElement("area") must inherit property "ping" with the proper type (5)
    22982298PASS HTMLAreaElement interface: document.createElement("area") must inherit property "rel" with the proper type (6)
  • trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt

    r206260 r206630  
    1470514705PASS area.target: IDL set to object "test-valueOf" followed by getAttribute()
    1470614706PASS area.target: IDL set to object "test-valueOf" followed by IDL get
    14707 FAIL area.download: typeof IDL attribute assert_equals: expected "string" but got "undefined"
    14708 FAIL area.download: IDL get with DOM attribute unset assert_equals: expected (string) "" but got (undefined) undefined
     14707PASS area.download: typeof IDL attribute
     14708PASS area.download: IDL get with DOM attribute unset
    1470914709PASS area.download: setAttribute() to "" followed by getAttribute()
    14710 FAIL area.download: setAttribute() to "" followed by IDL get assert_equals: expected (string) "" but got (undefined) undefined
     14710PASS area.download: setAttribute() to "" followed by IDL get
    1471114711PASS area.download: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute()
    14712 FAIL area.download: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get assert_equals: expected (string) " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " but got (undefined) undefined
     14712PASS area.download: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get
    1471314713PASS area.download: setAttribute() to undefined followed by getAttribute()
    14714 FAIL area.download: setAttribute() to undefined followed by IDL get assert_equals: expected (string) "undefined" but got (undefined) undefined
     14714PASS area.download: setAttribute() to undefined followed by IDL get
    1471514715PASS area.download: setAttribute() to 7 followed by getAttribute()
    14716 FAIL area.download: setAttribute() to 7 followed by IDL get assert_equals: expected (string) "7" but got (undefined) undefined
     14716PASS area.download: setAttribute() to 7 followed by IDL get
    1471714717PASS area.download: setAttribute() to 1.5 followed by getAttribute()
    14718 FAIL area.download: setAttribute() to 1.5 followed by IDL get assert_equals: expected (string) "1.5" but got (undefined) undefined
     14718PASS area.download: setAttribute() to 1.5 followed by IDL get
    1471914719PASS area.download: setAttribute() to true followed by getAttribute()
    14720 FAIL area.download: setAttribute() to true followed by IDL get assert_equals: expected (string) "true" but got (undefined) undefined
     14720PASS area.download: setAttribute() to true followed by IDL get
    1472114721PASS area.download: setAttribute() to false followed by getAttribute()
    14722 FAIL area.download: setAttribute() to false followed by IDL get assert_equals: expected (string) "false" but got (undefined) undefined
     14722PASS area.download: setAttribute() to false followed by IDL get
    1472314723PASS area.download: setAttribute() to object "[object Object]" followed by getAttribute()
    14724 FAIL area.download: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected (string) "[object Object]" but got (undefined) undefined
     14724PASS area.download: setAttribute() to object "[object Object]" followed by IDL get
    1472514725PASS area.download: setAttribute() to NaN followed by getAttribute()
    14726 FAIL area.download: setAttribute() to NaN followed by IDL get assert_equals: expected (string) "NaN" but got (undefined) undefined
     14726PASS area.download: setAttribute() to NaN followed by IDL get
    1472714727PASS area.download: setAttribute() to Infinity followed by getAttribute()
    14728 FAIL area.download: setAttribute() to Infinity followed by IDL get assert_equals: expected (string) "Infinity" but got (undefined) undefined
     14728PASS area.download: setAttribute() to Infinity followed by IDL get
    1472914729PASS area.download: setAttribute() to -Infinity followed by getAttribute()
    14730 FAIL area.download: setAttribute() to -Infinity followed by IDL get assert_equals: expected (string) "-Infinity" but got (undefined) undefined
     14730PASS area.download: setAttribute() to -Infinity followed by IDL get
    1473114731PASS area.download: setAttribute() to "\0" followed by getAttribute()
    14732 FAIL area.download: setAttribute() to "\0" followed by IDL get assert_equals: expected (string) "\0" but got (undefined) undefined
     14732PASS area.download: setAttribute() to "\0" followed by IDL get
    1473314733PASS area.download: setAttribute() to null followed by getAttribute()
    14734 FAIL area.download: setAttribute() to null followed by IDL get assert_equals: expected (string) "null" but got (undefined) undefined
     14734PASS area.download: setAttribute() to null followed by IDL get
    1473514735PASS area.download: setAttribute() to object "test-toString" followed by getAttribute()
    14736 FAIL area.download: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected (string) "test-toString" but got (undefined) undefined
     14736PASS area.download: setAttribute() to object "test-toString" followed by IDL get
    1473714737PASS area.download: setAttribute() to object "test-valueOf" followed by getAttribute()
    14738 FAIL area.download: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected (string) "test-valueOf" but got (undefined) undefined
     14738PASS area.download: setAttribute() to object "test-valueOf" followed by IDL get
    1473914739PASS area.download: IDL set to "" should not throw
    14740 FAIL area.download: IDL set to "" followed by getAttribute() assert_equals: expected "" but got "test-valueOf"
     14740PASS area.download: IDL set to "" followed by getAttribute()
    1474114741PASS area.download: IDL set to "" followed by IDL get
    1474214742PASS area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " should not throw
    14743 FAIL area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute() assert_equals: expected " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " but got "test-valueOf"
     14743PASS area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute()
    1474414744PASS area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get
    1474514745PASS area.download: IDL set to undefined should not throw
    14746 FAIL area.download: IDL set to undefined followed by getAttribute() assert_equals: expected "undefined" but got "test-valueOf"
    14747 FAIL area.download: IDL set to undefined followed by IDL get assert_equals: expected (string) "undefined" but got (undefined) undefined
     14746PASS area.download: IDL set to undefined followed by getAttribute()
     14747PASS area.download: IDL set to undefined followed by IDL get
    1474814748PASS area.download: IDL set to 7 should not throw
    14749 FAIL area.download: IDL set to 7 followed by getAttribute() assert_equals: expected "7" but got "test-valueOf"
    14750 FAIL area.download: IDL set to 7 followed by IDL get assert_equals: expected (string) "7" but got (number) 7
     14749PASS area.download: IDL set to 7 followed by getAttribute()
     14750PASS area.download: IDL set to 7 followed by IDL get
    1475114751PASS area.download: IDL set to 1.5 should not throw
    14752 FAIL area.download: IDL set to 1.5 followed by getAttribute() assert_equals: expected "1.5" but got "test-valueOf"
    14753 FAIL area.download: IDL set to 1.5 followed by IDL get assert_equals: expected (string) "1.5" but got (number) 1.5
     14752PASS area.download: IDL set to 1.5 followed by getAttribute()
     14753PASS area.download: IDL set to 1.5 followed by IDL get
    1475414754PASS area.download: IDL set to true should not throw
    14755 FAIL area.download: IDL set to true followed by getAttribute() assert_equals: expected "true" but got "test-valueOf"
    14756 FAIL area.download: IDL set to true followed by IDL get assert_equals: expected (string) "true" but got (boolean) true
     14755PASS area.download: IDL set to true followed by getAttribute()
     14756PASS area.download: IDL set to true followed by IDL get
    1475714757PASS area.download: IDL set to false should not throw
    14758 FAIL area.download: IDL set to false followed by getAttribute() assert_equals: expected "false" but got "test-valueOf"
    14759 FAIL area.download: IDL set to false followed by IDL get assert_equals: expected (string) "false" but got (boolean) false
     14758PASS area.download: IDL set to false followed by getAttribute()
     14759PASS area.download: IDL set to false followed by IDL get
    1476014760PASS area.download: IDL set to object "[object Object]" should not throw
    14761 FAIL area.download: IDL set to object "[object Object]" followed by getAttribute() assert_equals: expected "[object Object]" but got "test-valueOf"
    14762 FAIL area.download: IDL set to object "[object Object]" followed by IDL get assert_equals: expected (string) "[object Object]" but got (object) object "[object Object]"
     14761PASS area.download: IDL set to object "[object Object]" followed by getAttribute()
     14762PASS area.download: IDL set to object "[object Object]" followed by IDL get
    1476314763PASS area.download: IDL set to NaN should not throw
    14764 FAIL area.download: IDL set to NaN followed by getAttribute() assert_equals: expected "NaN" but got "test-valueOf"
    14765 FAIL area.download: IDL set to NaN followed by IDL get assert_equals: expected (string) "NaN" but got (number) NaN
     14764PASS area.download: IDL set to NaN followed by getAttribute()
     14765PASS area.download: IDL set to NaN followed by IDL get
    1476614766PASS area.download: IDL set to Infinity should not throw
    14767 FAIL area.download: IDL set to Infinity followed by getAttribute() assert_equals: expected "Infinity" but got "test-valueOf"
    14768 FAIL area.download: IDL set to Infinity followed by IDL get assert_equals: expected (string) "Infinity" but got (number) Infinity
     14767PASS area.download: IDL set to Infinity followed by getAttribute()
     14768PASS area.download: IDL set to Infinity followed by IDL get
    1476914769PASS area.download: IDL set to -Infinity should not throw
    14770 FAIL area.download: IDL set to -Infinity followed by getAttribute() assert_equals: expected "-Infinity" but got "test-valueOf"
    14771 FAIL area.download: IDL set to -Infinity followed by IDL get assert_equals: expected (string) "-Infinity" but got (number) -Infinity
     14770PASS area.download: IDL set to -Infinity followed by getAttribute()
     14771PASS area.download: IDL set to -Infinity followed by IDL get
    1477214772PASS area.download: IDL set to "\0" should not throw
    14773 FAIL area.download: IDL set to "\0" followed by getAttribute() assert_equals: expected "\0" but got "test-valueOf"
     14773PASS area.download: IDL set to "\0" followed by getAttribute()
    1477414774PASS area.download: IDL set to "\0" followed by IDL get
    1477514775PASS area.download: IDL set to null should not throw
    14776 FAIL area.download: IDL set to null followed by getAttribute() assert_equals: expected "null" but got "test-valueOf"
    14777 FAIL area.download: IDL set to null followed by IDL get assert_equals: expected (string) "null" but got (object) null
     14776PASS area.download: IDL set to null followed by getAttribute()
     14777PASS area.download: IDL set to null followed by IDL get
    1477814778PASS area.download: IDL set to object "test-toString" should not throw
    14779 FAIL area.download: IDL set to object "test-toString" followed by getAttribute() assert_equals: expected "test-toString" but got "test-valueOf"
    14780 FAIL area.download: IDL set to object "test-toString" followed by IDL get assert_equals: expected (string) "test-toString" but got (object) object "test-toString"
     14779PASS area.download: IDL set to object "test-toString" followed by getAttribute()
     14780PASS area.download: IDL set to object "test-toString" followed by IDL get
    1478114781PASS area.download: IDL set to object "test-valueOf" should not throw
    1478214782PASS area.download: IDL set to object "test-valueOf" followed by getAttribute()
    14783 FAIL area.download: IDL set to object "test-valueOf" followed by IDL get assert_equals: expected (string) "test-valueOf" but got (object) object "test-valueOf"
     14783PASS area.download: IDL set to object "test-valueOf" followed by IDL get
    1478414784PASS area.ping: typeof IDL attribute
    1478514785PASS area.ping: IDL get with DOM attribute unset
  • trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations

    r206356 r206630  
    13151315# <a download> is not supported in WK1 yet.
    13161316webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ]
     1317webkit.org/b/156069 http/tests/download/area-download.html [ Skip ]
    13171318webkit.org/b/156069 http/tests/security/anchor-download-allow-blob.html [ Skip ]
    13181319webkit.org/b/156069 http/tests/security/anchor-download-allow-data.html [ Skip ]
  • trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations

    r206605 r206630  
    742742fast/dom/Geolocation/permission-denied-stops-watches.html
    743743fast/dom/Geolocation/requestQueuingForHiddenPage.html
    744 fast/dom/HTMLAnchorElement/anchor-download-unset.html
    745 fast/dom/HTMLAnchorElement/anchor-download.html
    746 fast/dom/HTMLAnchorElement/anchor-nodownload-set.html
    747 fast/dom/HTMLAnchorElement/anchor-nodownload.html
    748744fast/dom/HTMLLinkElement/prefetch.html
    749745fast/dom/MutationObserver/end-of-task-delivery.html
     
    18071803webkit.org/b/155948 transitions/cancel-transition.html [ Pass Failure ]
    18081804
    1809 # <a download> is not supported with NETWORK_SESSION yet.
     1805# <a download> does not work on iOS.
     1806webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download-unset.html [ Skip ]
     1807webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-download.html [ Skip ]
     1808webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload-set.html [ Skip ]
     1809webkit.org/b/156067 fast/dom/HTMLAnchorElement/anchor-nodownload.html [ Skip ]
     1810webkit.org/b/156067 http/tests/download/area-download.html [ Skip ]
    18101811webkit.org/b/156067 http/tests/security/anchor-download-allow-blob.html [ Skip ]
    18111812webkit.org/b/156067 http/tests/security/anchor-download-allow-data.html [ Skip ]
  • trunk/LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt

    r206260 r206630  
    1470514705PASS area.target: IDL set to object "test-valueOf" followed by getAttribute()
    1470614706PASS area.target: IDL set to object "test-valueOf" followed by IDL get
    14707 FAIL area.download: typeof IDL attribute assert_equals: expected "string" but got "undefined"
    14708 FAIL area.download: IDL get with DOM attribute unset assert_equals: expected (string) "" but got (undefined) undefined
     14707PASS area.download: typeof IDL attribute
     14708PASS area.download: IDL get with DOM attribute unset
    1470914709PASS area.download: setAttribute() to "" followed by getAttribute()
    14710 FAIL area.download: setAttribute() to "" followed by IDL get assert_equals: expected (string) "" but got (undefined) undefined
     14710PASS area.download: setAttribute() to "" followed by IDL get
    1471114711PASS area.download: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute()
    14712 FAIL area.download: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get assert_equals: expected (string) " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " but got (undefined) undefined
     14712PASS area.download: setAttribute() to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get
    1471314713PASS area.download: setAttribute() to undefined followed by getAttribute()
    14714 FAIL area.download: setAttribute() to undefined followed by IDL get assert_equals: expected (string) "undefined" but got (undefined) undefined
     14714PASS area.download: setAttribute() to undefined followed by IDL get
    1471514715PASS area.download: setAttribute() to 7 followed by getAttribute()
    14716 FAIL area.download: setAttribute() to 7 followed by IDL get assert_equals: expected (string) "7" but got (undefined) undefined
     14716PASS area.download: setAttribute() to 7 followed by IDL get
    1471714717PASS area.download: setAttribute() to 1.5 followed by getAttribute()
    14718 FAIL area.download: setAttribute() to 1.5 followed by IDL get assert_equals: expected (string) "1.5" but got (undefined) undefined
     14718PASS area.download: setAttribute() to 1.5 followed by IDL get
    1471914719PASS area.download: setAttribute() to true followed by getAttribute()
    14720 FAIL area.download: setAttribute() to true followed by IDL get assert_equals: expected (string) "true" but got (undefined) undefined
     14720PASS area.download: setAttribute() to true followed by IDL get
    1472114721PASS area.download: setAttribute() to false followed by getAttribute()
    14722 FAIL area.download: setAttribute() to false followed by IDL get assert_equals: expected (string) "false" but got (undefined) undefined
     14722PASS area.download: setAttribute() to false followed by IDL get
    1472314723PASS area.download: setAttribute() to object "[object Object]" followed by getAttribute()
    14724 FAIL area.download: setAttribute() to object "[object Object]" followed by IDL get assert_equals: expected (string) "[object Object]" but got (undefined) undefined
     14724PASS area.download: setAttribute() to object "[object Object]" followed by IDL get
    1472514725PASS area.download: setAttribute() to NaN followed by getAttribute()
    14726 FAIL area.download: setAttribute() to NaN followed by IDL get assert_equals: expected (string) "NaN" but got (undefined) undefined
     14726PASS area.download: setAttribute() to NaN followed by IDL get
    1472714727PASS area.download: setAttribute() to Infinity followed by getAttribute()
    14728 FAIL area.download: setAttribute() to Infinity followed by IDL get assert_equals: expected (string) "Infinity" but got (undefined) undefined
     14728PASS area.download: setAttribute() to Infinity followed by IDL get
    1472914729PASS area.download: setAttribute() to -Infinity followed by getAttribute()
    14730 FAIL area.download: setAttribute() to -Infinity followed by IDL get assert_equals: expected (string) "-Infinity" but got (undefined) undefined
     14730PASS area.download: setAttribute() to -Infinity followed by IDL get
    1473114731PASS area.download: setAttribute() to "\0" followed by getAttribute()
    14732 FAIL area.download: setAttribute() to "\0" followed by IDL get assert_equals: expected (string) "\0" but got (undefined) undefined
     14732PASS area.download: setAttribute() to "\0" followed by IDL get
    1473314733PASS area.download: setAttribute() to null followed by getAttribute()
    14734 FAIL area.download: setAttribute() to null followed by IDL get assert_equals: expected (string) "null" but got (undefined) undefined
     14734PASS area.download: setAttribute() to null followed by IDL get
    1473514735PASS area.download: setAttribute() to object "test-toString" followed by getAttribute()
    14736 FAIL area.download: setAttribute() to object "test-toString" followed by IDL get assert_equals: expected (string) "test-toString" but got (undefined) undefined
     14736PASS area.download: setAttribute() to object "test-toString" followed by IDL get
    1473714737PASS area.download: setAttribute() to object "test-valueOf" followed by getAttribute()
    14738 FAIL area.download: setAttribute() to object "test-valueOf" followed by IDL get assert_equals: expected (string) "test-valueOf" but got (undefined) undefined
     14738PASS area.download: setAttribute() to object "test-valueOf" followed by IDL get
    1473914739PASS area.download: IDL set to "" should not throw
    14740 FAIL area.download: IDL set to "" followed by getAttribute() assert_equals: expected "" but got "test-valueOf"
     14740PASS area.download: IDL set to "" followed by getAttribute()
    1474114741PASS area.download: IDL set to "" followed by IDL get
    1474214742PASS area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " should not throw
    14743 FAIL area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute() assert_equals: expected " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " but got "test-valueOf"
     14743PASS area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by getAttribute()
    1474414744PASS area.download: IDL set to " \0\x01\x02\x03\x04\x05\x06\x07 \b\t\n\v\f\r\x0e\x0f \x10\x11\x12\x13\x14\x15\x16\x17 \x18\x19\x1a\x1b\x1c\x1d\x1e\x1f  foo " followed by IDL get
    1474514745PASS area.download: IDL set to undefined should not throw
    14746 FAIL area.download: IDL set to undefined followed by getAttribute() assert_equals: expected "undefined" but got "test-valueOf"
    14747 FAIL area.download: IDL set to undefined followed by IDL get assert_equals: expected (string) "undefined" but got (undefined) undefined
     14746PASS area.download: IDL set to undefined followed by getAttribute()
     14747PASS area.download: IDL set to undefined followed by IDL get
    1474814748PASS area.download: IDL set to 7 should not throw
    14749 FAIL area.download: IDL set to 7 followed by getAttribute() assert_equals: expected "7" but got "test-valueOf"
    14750 FAIL area.download: IDL set to 7 followed by IDL get assert_equals: expected (string) "7" but got (number) 7
     14749PASS area.download: IDL set to 7 followed by getAttribute()
     14750PASS area.download: IDL set to 7 followed by IDL get
    1475114751PASS area.download: IDL set to 1.5 should not throw
    14752 FAIL area.download: IDL set to 1.5 followed by getAttribute() assert_equals: expected "1.5" but got "test-valueOf"
    14753 FAIL area.download: IDL set to 1.5 followed by IDL get assert_equals: expected (string) "1.5" but got (number) 1.5
     14752PASS area.download: IDL set to 1.5 followed by getAttribute()
     14753PASS area.download: IDL set to 1.5 followed by IDL get
    1475414754PASS area.download: IDL set to true should not throw
    14755 FAIL area.download: IDL set to true followed by getAttribute() assert_equals: expected "true" but got "test-valueOf"
    14756 FAIL area.download: IDL set to true followed by IDL get assert_equals: expected (string) "true" but got (boolean) true
     14755PASS area.download: IDL set to true followed by getAttribute()
     14756PASS area.download: IDL set to true followed by IDL get
    1475714757PASS area.download: IDL set to false should not throw
    14758 FAIL area.download: IDL set to false followed by getAttribute() assert_equals: expected "false" but got "test-valueOf"
    14759 FAIL area.download: IDL set to false followed by IDL get assert_equals: expected (string) "false" but got (boolean) false
     14758PASS area.download: IDL set to false followed by getAttribute()
     14759PASS area.download: IDL set to false followed by IDL get
    1476014760PASS area.download: IDL set to object "[object Object]" should not throw
    14761 FAIL area.download: IDL set to object "[object Object]" followed by getAttribute() assert_equals: expected "[object Object]" but got "test-valueOf"
    14762 FAIL area.download: IDL set to object "[object Object]" followed by IDL get assert_equals: expected (string) "[object Object]" but got (object) object "[object Object]"
     14761PASS area.download: IDL set to object "[object Object]" followed by getAttribute()
     14762PASS area.download: IDL set to object "[object Object]" followed by IDL get
    1476314763PASS area.download: IDL set to NaN should not throw
    14764 FAIL area.download: IDL set to NaN followed by getAttribute() assert_equals: expected "NaN" but got "test-valueOf"
    14765 FAIL area.download: IDL set to NaN followed by IDL get assert_equals: expected (string) "NaN" but got (number) NaN
     14764PASS area.download: IDL set to NaN followed by getAttribute()
     14765PASS area.download: IDL set to NaN followed by IDL get
    1476614766PASS area.download: IDL set to Infinity should not throw
    14767 FAIL area.download: IDL set to Infinity followed by getAttribute() assert_equals: expected "Infinity" but got "test-valueOf"
    14768 FAIL area.download: IDL set to Infinity followed by IDL get assert_equals: expected (string) "Infinity" but got (number) Infinity
     14767PASS area.download: IDL set to Infinity followed by getAttribute()
     14768PASS area.download: IDL set to Infinity followed by IDL get
    1476914769PASS area.download: IDL set to -Infinity should not throw
    14770 FAIL area.download: IDL set to -Infinity followed by getAttribute() assert_equals: expected "-Infinity" but got "test-valueOf"
    14771 FAIL area.download: IDL set to -Infinity followed by IDL get assert_equals: expected (string) "-Infinity" but got (number) -Infinity
     14770PASS area.download: IDL set to -Infinity followed by getAttribute()
     14771PASS area.download: IDL set to -Infinity followed by IDL get
    1477214772PASS area.download: IDL set to "\0" should not throw
    14773 FAIL area.download: IDL set to "\0" followed by getAttribute() assert_equals: expected "\0" but got "test-valueOf"
     14773PASS area.download: IDL set to "\0" followed by getAttribute()
    1477414774PASS area.download: IDL set to "\0" followed by IDL get
    1477514775PASS area.download: IDL set to null should not throw
    14776 FAIL area.download: IDL set to null followed by getAttribute() assert_equals: expected "null" but got "test-valueOf"
    14777 FAIL area.download: IDL set to null followed by IDL get assert_equals: expected (string) "null" but got (object) null
     14776PASS area.download: IDL set to null followed by getAttribute()
     14777PASS area.download: IDL set to null followed by IDL get
    1477814778PASS area.download: IDL set to object "test-toString" should not throw
    14779 FAIL area.download: IDL set to object "test-toString" followed by getAttribute() assert_equals: expected "test-toString" but got "test-valueOf"
    14780 FAIL area.download: IDL set to object "test-toString" followed by IDL get assert_equals: expected (string) "test-toString" but got (object) object "test-toString"
     14779PASS area.download: IDL set to object "test-toString" followed by getAttribute()
     14780PASS area.download: IDL set to object "test-toString" followed by IDL get
    1478114781PASS area.download: IDL set to object "test-valueOf" should not throw
    1478214782PASS area.download: IDL set to object "test-valueOf" followed by getAttribute()
    14783 FAIL area.download: IDL set to object "test-valueOf" followed by IDL get assert_equals: expected (string) "test-valueOf" but got (object) object "test-valueOf"
     14783PASS area.download: IDL set to object "test-valueOf" followed by IDL get
    1478414784PASS area.ping: typeof IDL attribute
    1478514785PASS area.ping: IDL get with DOM attribute unset
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r206412 r206630  
    192192webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download.html [ Failure ]
    193193webkit.org/b/156069 fast/dom/HTMLAnchorElement/anchor-download-synthetic-click.html [ Skip ]
     194webkit.org/b/156069 http/tests/download/area-download.html [ Skip ]
    194195webkit.org/b/156069 http/tests/security/anchor-download-allow-blob.html [ Skip ]
    195196webkit.org/b/156069 http/tests/security/anchor-download-allow-data.html [ Skip ]
  • trunk/LayoutTests/platform/win/TestExpectations

    r206576 r206630  
    443443fast/dom/HTMLAnchorElement/anchor-nodownload-set.html [ Skip ]
    444444fast/dom/HTMLAnchorElement/anchor-download-unset.html [ Skip ]
     445http/tests/download/area-download.html [ Skip ]
     446http/tests/security/anchor-download-allow-data.html [ Skip ]
     447http/tests/security/anchor-download-allow-sameorigin.html [ Skip ]
    445448
    446449# TODO Expose title direction in WebKit API (Chromium Only)
     
    34453448http/tests/misc/favicon-loads-with-icon-loading-override.html [ Failure ]
    34463449http/tests/navigation/post-308-response.html [ Failure ]
    3447 http/tests/security/anchor-download-allow-data.html [ Failure ]
    3448 http/tests/security/anchor-download-allow-sameorigin.html [ Failure ]
    34493450http/tests/security/canvas-remote-read-remote-video-redirect.html [ Failure ]
    34503451http/tests/security/contentSecurityPolicy/1.1/plugintypes-affects-child.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r206629 r206630  
     12016-09-29  Chris Dumez  <cdumez@apple.com>
     2
     3        Add support for download attribute on area elements
     4        https://bugs.webkit.org/show_bug.cgi?id=162765
     5
     6        Reviewed by Brent Fulgham.
     7
     8        Add support for download attribute on area elements:
     9        - https://html.spec.whatwg.org/#htmlanchorelement
     10
     11        Because HTMLAreaElement inherits from HTMLAnchorElement on native side,
     12        and because HTMLAnchorElement already supports the download attribute,
     13        all that was needed was to add the download attribute to
     14        HTMLAreaElement.idl file.
     15
     16        Test: http/tests/download/area-download.html
     17
     18        * html/HTMLAreaElement.idl:
     19
    1202016-09-29  Ryosuke Niwa  <rniwa@webkit.org>
    221
  • trunk/Source/WebCore/html/HTMLAreaElement.idl

    r206561 r206630  
    2828    [Reflect] attribute DOMString target;
    2929
     30    [Conditional=DOWNLOAD_ATTRIBUTE, EnabledAtRuntime=DownloadAttribute, Reflect] attribute DOMString download;
     31
    3032    [PutForwards=value] readonly attribute DOMTokenList relList;
    3133};
Note: See TracChangeset for help on using the changeset viewer.