Changeset 207321 in webkit
- Timestamp:
- Oct 13, 2016 9:09:33 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r207319 r207321 1 2016-10-13 Alex Christensen <achristensen@webkit.org> 2 3 Hosts of URLs with non-special schemes should be case-sensitive, and non-ASCII characters in such hosts should be punycode-encoded 4 https://bugs.webkit.org/show_bug.cgi?id=163413 5 6 Reviewed by Tim Horton. 7 8 * contentfiltering/block-after-add-data-then-allow-unblock-expected.txt: 9 * contentfiltering/block-after-add-data-then-deny-unblock-expected.txt: 10 * contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.txt: 11 * contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.txt: 12 * contentfiltering/block-after-response-then-allow-unblock-expected.txt: 13 * contentfiltering/block-after-response-then-deny-unblock-expected.txt: 14 * contentfiltering/block-after-will-send-request-then-allow-unblock-expected.txt: 15 * contentfiltering/block-after-will-send-request-then-deny-unblock-expected.txt: 16 * fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt: 17 * fast/backgrounds/background-shorthand-after-set-backgroundSize.html: 18 * fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt: 19 * fast/backgrounds/background-shorthand-with-backgroundSize-style.html: 20 * fast/css/getComputedStyle/computed-style-border-image-expected.txt: 21 * fast/css/getComputedStyle/computed-style-border-image.html: 22 * fast/css/getComputedStyle/computed-style-cross-fade-expected.txt: 23 * fast/css/getComputedStyle/computed-style-cross-fade.html: 24 * fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt: 25 * fast/css/getComputedStyle/getComputedStyle-background-shorthand.html: 26 * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt: 27 * fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html: 28 * fast/loader/url-parse-1-expected.txt: 29 * fast/url/host-lowercase-per-scheme-expected.txt: 30 * fast/url/safari-extension-expected.txt: 31 * http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt: 32 Update test expectations. This is how they were before r207162, showing that this change to the URLParser increases compatibility. 33 1 34 2016-10-13 Chris Dumez <cdumez@apple.com> 2 35 -
trunk/LayoutTests/contentfiltering/block-after-add-data-then-allow-unblock-expected.txt
r207162 r207321 14 14 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 15 15 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame 16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock /16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock 17 17 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 18 18 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame -
trunk/LayoutTests/contentfiltering/block-after-add-data-then-deny-unblock-expected.txt
r207162 r207321 14 14 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 15 15 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame 16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock /16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock 17 17 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 18 18 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame -
trunk/LayoutTests/contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.txt
r207162 r207321 14 14 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 15 15 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame 16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock /16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock 17 17 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 18 18 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame -
trunk/LayoutTests/contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.txt
r207162 r207321 14 14 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 15 15 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame 16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock /16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock 17 17 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 18 18 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame -
trunk/LayoutTests/contentfiltering/block-after-response-then-allow-unblock-expected.txt
r207162 r207321 14 14 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 15 15 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame 16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock /16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock 17 17 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 18 18 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame -
trunk/LayoutTests/contentfiltering/block-after-response-then-deny-unblock-expected.txt
r207162 r207321 14 14 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 15 15 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame 16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock /16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock 17 17 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 18 18 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame -
trunk/LayoutTests/contentfiltering/block-after-will-send-request-then-allow-unblock-expected.txt
r207162 r207321 14 14 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 15 15 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame 16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock /16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock 17 17 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 18 18 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame -
trunk/LayoutTests/contentfiltering/block-after-will-send-request-then-deny-unblock-expected.txt
r207162 r207321 14 14 frame "<!--framePath //<!--frame0-->-->" - didCommitLoadForFrame 15 15 frame "<!--framePath //<!--frame0-->-->" - didFinishDocumentLoadForFrame 16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock /16 frame "<!--framePath //<!--frame0-->-->" - willPerformClientRedirectToURL: x-apple-content-filter://mock-unblock 17 17 frame "<!--framePath //<!--frame0-->-->" - didHandleOnloadEventsForFrame 18 18 frame "<!--framePath //<!--frame0-->-->" - didFinishLoadForFrame -
trunk/LayoutTests/fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt
r207162 r207321 4 4 5 5 6 PASS e.style.background is 'url(dummy://test.png /) 50% 50% / cover no-repeat border-box border-box red'6 PASS e.style.background is 'url(dummy://test.png) 50% 50% / cover no-repeat border-box border-box red' 7 7 PASS e.style.backgroundSize is 'cover' 8 8 -
trunk/LayoutTests/fast/backgrounds/background-shorthand-after-set-backgroundSize.html
r207162 r207321 13 13 e.style.backgroundSize = "cover"; 14 14 e.style.background = "center red url(dummy://test.png) no-repeat border-box"; 15 shouldBe("e.style.background", "'url(dummy://test.png /) 50% 50% / cover no-repeat border-box border-box red'")15 shouldBe("e.style.background", "'url(dummy://test.png) 50% 50% / cover no-repeat border-box border-box red'") 16 16 shouldBe("e.style.backgroundSize", "'cover'"); 17 17 debug("") -
trunk/LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt
r207162 r207321 4 4 5 5 6 PASS e.style.background is 'url(dummy://test.png /) 50% 50% / cover no-repeat border-box border-box red'6 PASS e.style.background is 'url(dummy://test.png) 50% 50% / cover no-repeat border-box border-box red' 7 7 PASS e.style.backgroundSize is 'cover' 8 8 PASS checkStyle() is true 9 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 50% 50% / cover border-box border-box'9 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 50% 50% / cover border-box border-box' 10 10 PASS computedStyle.getPropertyValue("background-size") is 'cover' 11 11 PASS checkComputedStyleValue() is true 12 12 13 PASS e.style.background is 'url(dummy://test.png /) 20px 50% / contain no-repeat padding-box padding-box red'13 PASS e.style.background is 'url(dummy://test.png) 20px 50% / contain no-repeat padding-box padding-box red' 14 14 PASS e.style.backgroundSize is 'contain' 15 15 PASS checkStyle() is true 16 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 20px 50% / contain padding-box padding-box'16 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 20px 50% / contain padding-box padding-box' 17 17 PASS computedStyle.getPropertyValue("background-size") is 'contain' 18 18 PASS checkComputedStyleValue() is true 19 19 20 PASS e.style.background is 'url(dummy://test.png /) 50px 60px / 50% 75% no-repeat red'20 PASS e.style.background is 'url(dummy://test.png) 50px 60px / 50% 75% no-repeat red' 21 21 PASS e.style.backgroundSize is '50% 75%' 22 22 PASS checkStyle() is true 23 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 50px 60px / 50% 75% padding-box border-box'23 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 50px 60px / 50% 75% padding-box border-box' 24 24 PASS computedStyle.getPropertyValue("background-size") is '50% 75%' 25 25 PASS checkComputedStyleValue() is true 26 26 27 PASS e.style.background is 'url(dummy://test.png /) 0% 0% / 100px 200px repeat border-box content-box red'27 PASS e.style.background is 'url(dummy://test.png) 0% 0% / 100px 200px repeat border-box content-box red' 28 28 PASS e.style.backgroundSize is '100px 200px' 29 29 PASS checkStyle() is true 30 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 0% 0% / 100px 200px border-box content-box'30 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / 100px 200px border-box content-box' 31 31 PASS computedStyle.getPropertyValue("background-size") is '100px 200px' 32 32 PASS checkComputedStyleValue() is true 33 33 34 PASS e.style.background is 'url(dummy://test.png /) 50% 50% / auto repeat content-box padding-box red'34 PASS e.style.background is 'url(dummy://test.png) 50% 50% / auto repeat content-box padding-box red' 35 35 PASS e.style.backgroundSize is 'auto' 36 36 PASS checkStyle() is true 37 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 50% 50% / auto content-box padding-box'37 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 50% 50% / auto content-box padding-box' 38 38 PASS computedStyle.getPropertyValue("background-size") is 'auto' 39 39 PASS checkComputedStyleValue() is true 40 40 41 PASS e.style.background is 'url(dummy://test.png /) 50px 60px / 50% no-repeat fixed red'41 PASS e.style.background is 'url(dummy://test.png) 50px 60px / 50% no-repeat fixed red' 42 42 PASS e.style.backgroundSize is '50%' 43 43 PASS checkStyle() is true 44 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 50px 60px / 50% padding-box border-box'44 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 50px 60px / 50% padding-box border-box' 45 45 PASS computedStyle.getPropertyValue("background-size") is '50%' 46 46 PASS checkComputedStyleValue() is true 47 47 48 PASS e.style.background is 'url(dummy://test.png /) 0% 0% / 100px repeat scroll padding-box border-box red'48 PASS e.style.background is 'url(dummy://test.png) 0% 0% / 100px repeat scroll padding-box border-box red' 49 49 PASS e.style.backgroundSize is '100px' 50 50 PASS checkStyle() is true 51 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 0% 0% / 100px padding-box border-box'51 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / 100px padding-box border-box' 52 52 PASS computedStyle.getPropertyValue("background-size") is '100px' 53 53 PASS checkComputedStyleValue() is true 54 54 55 PASS e.style.background is 'url(dummy://test.png /) 50% 50% / auto repeat fixed content-box content-box red'55 PASS e.style.background is 'url(dummy://test.png) 50% 50% / auto repeat fixed content-box content-box red' 56 56 PASS e.style.backgroundSize is 'auto' 57 57 PASS checkStyle() is true 58 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png /) repeat fixed 50% 50% / auto content-box content-box'58 PASS computedStyle.getPropertyValue("background") is 'rgb(255, 0, 0) url(dummy://test.png) repeat fixed 50% 50% / auto content-box content-box' 59 59 PASS computedStyle.getPropertyValue("background-size") is 'auto' 60 60 PASS checkComputedStyleValue() is true -
trunk/LayoutTests/fast/backgrounds/background-shorthand-with-backgroundSize-style.html
r207162 r207321 24 24 25 25 e.style.background = "center / cover red url(dummy://test.png) no-repeat border-box"; 26 shouldBe("e.style.background", "'url(dummy://test.png /) 50% 50% / cover no-repeat border-box border-box red'");26 shouldBe("e.style.background", "'url(dummy://test.png) 50% 50% / cover no-repeat border-box border-box red'"); 27 27 shouldBe("e.style.backgroundSize", "'cover'"); 28 28 shouldBe("checkStyle()", "true"); 29 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 50% 50% / cover border-box border-box'");29 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 50% 50% / cover border-box border-box'"); 30 30 shouldBe('computedStyle.getPropertyValue("background-size")', "'cover'"); 31 31 shouldBe("checkComputedStyleValue()", "true"); 32 32 debug("") 33 33 34 e.style.background = "red 20px / contain url(dummy://test.png /) no-repeat padding-box";35 shouldBe("e.style.background", "'url(dummy://test.png /) 20px 50% / contain no-repeat padding-box padding-box red'");34 e.style.background = "red 20px / contain url(dummy://test.png) no-repeat padding-box"; 35 shouldBe("e.style.background", "'url(dummy://test.png) 20px 50% / contain no-repeat padding-box padding-box red'"); 36 36 shouldBe("e.style.backgroundSize", "'contain'"); 37 37 shouldBe("checkStyle()", "true"); 38 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 20px 50% / contain padding-box padding-box'");38 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 20px 50% / contain padding-box padding-box'"); 39 39 shouldBe('computedStyle.getPropertyValue("background-size")', "'contain'"); 40 40 shouldBe("checkComputedStyleValue()", "true"); … … 42 42 43 43 e.style.background = "red url(dummy://test.png) 50px 60px / 50% 75% no-repeat"; 44 shouldBe("e.style.background", "'url(dummy://test.png /) 50px 60px / 50% 75% no-repeat red'");44 shouldBe("e.style.background", "'url(dummy://test.png) 50px 60px / 50% 75% no-repeat red'"); 45 45 shouldBe("e.style.backgroundSize", "'50% 75%'"); 46 46 shouldBe("checkStyle()", "true"); 47 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 50px 60px / 50% 75% padding-box border-box'");47 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 50px 60px / 50% 75% padding-box border-box'"); 48 48 shouldBe('computedStyle.getPropertyValue("background-size")', "'50% 75%'"); 49 49 shouldBe("checkComputedStyleValue()", "true"); … … 51 51 52 52 e.style.background = "red url(dummy://test.png) repeat top left / 100px 200px border-box content-box"; 53 shouldBe("e.style.background", "'url(dummy://test.png /) 0% 0% / 100px 200px repeat border-box content-box red'");53 shouldBe("e.style.background", "'url(dummy://test.png) 0% 0% / 100px 200px repeat border-box content-box red'"); 54 54 shouldBe("e.style.backgroundSize", "'100px 200px'"); 55 55 shouldBe("checkStyle()", "true"); 56 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 0% 0% / 100px 200px border-box content-box'");56 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / 100px 200px border-box content-box'"); 57 57 shouldBe('computedStyle.getPropertyValue("background-size")', "'100px 200px'"); 58 58 shouldBe("checkComputedStyleValue()", "true"); … … 60 60 61 61 e.style.background = "red url(dummy://test.png) repeat 50% / auto auto content-box padding-box"; 62 shouldBe("e.style.background", "'url(dummy://test.png /) 50% 50% / auto repeat content-box padding-box red'");62 shouldBe("e.style.background", "'url(dummy://test.png) 50% 50% / auto repeat content-box padding-box red'"); 63 63 shouldBe("e.style.backgroundSize", "'auto'"); 64 64 shouldBe("checkStyle()", "true"); 65 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 50% 50% / auto content-box padding-box'");65 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 50% 50% / auto content-box padding-box'"); 66 66 shouldBe('computedStyle.getPropertyValue("background-size")', "'auto'"); 67 67 shouldBe("checkComputedStyleValue()", "true"); … … 69 69 70 70 e.style.background = "url(dummy://test.png) red 50px 60px / 50% no-repeat fixed"; 71 shouldBe("e.style.background", "'url(dummy://test.png /) 50px 60px / 50% no-repeat fixed red'");71 shouldBe("e.style.background", "'url(dummy://test.png) 50px 60px / 50% no-repeat fixed red'"); 72 72 shouldBe("e.style.backgroundSize", "'50%'"); 73 73 shouldBe("checkStyle()", "true"); 74 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 50px 60px / 50% padding-box border-box'");74 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 50px 60px / 50% padding-box border-box'"); 75 75 shouldBe('computedStyle.getPropertyValue("background-size")', "'50%'"); 76 76 shouldBe("checkComputedStyleValue()", "true"); 77 77 debug("") 78 78 79 e.style.background = "red repeat scroll padding-box border-box top left / 100px url(dummy://test.png /)";80 shouldBe("e.style.background", "'url(dummy://test.png /) 0% 0% / 100px repeat scroll padding-box border-box red'");79 e.style.background = "red repeat scroll padding-box border-box top left / 100px url(dummy://test.png)"; 80 shouldBe("e.style.background", "'url(dummy://test.png) 0% 0% / 100px repeat scroll padding-box border-box red'"); 81 81 shouldBe("e.style.backgroundSize", "'100px'"); 82 82 shouldBe("checkStyle()", "true"); 83 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 0% 0% / 100px padding-box border-box'");83 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / 100px padding-box border-box'"); 84 84 shouldBe('computedStyle.getPropertyValue("background-size")', "'100px'"); 85 85 shouldBe("checkComputedStyleValue()", "true"); … … 87 87 88 88 e.style.background = "50% / auto fixed url(dummy://test.png) repeat content-box red"; 89 shouldBe("e.style.background", "'url(dummy://test.png /) 50% 50% / auto repeat fixed content-box content-box red'");89 shouldBe("e.style.background", "'url(dummy://test.png) 50% 50% / auto repeat fixed content-box content-box red'"); 90 90 shouldBe("e.style.backgroundSize", "'auto'"); 91 91 shouldBe("checkStyle()", "true"); 92 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png /) repeat fixed 50% 50% / auto content-box content-box'");92 shouldBe('computedStyle.getPropertyValue("background")', "'rgb(255, 0, 0) url(dummy://test.png) repeat fixed 50% 50% / auto content-box content-box'"); 93 93 shouldBe('computedStyle.getPropertyValue("background-size")', "'auto'"); 94 94 shouldBe("checkComputedStyleValue()", "true"); … … 114 114 115 115 e.style.background = ""; 116 e.style.background = "red / cover url(dummy://test.png /) repeat";116 e.style.background = "red / cover url(dummy://test.png) repeat"; 117 117 shouldBe("e.style.background", "''"); 118 118 shouldBe("e.style.backgroundSize", "''"); -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-border-image-expected.txt
r207162 r207321 5 5 PASS checkComputedStyleValue() is true 6 6 PASS computedBorderImageStyle('url(test.png) 12 11 repeat stretch', 'border-image-slice') is '12 11' 7 PASS computedBorderImageStyle('url(dummy://test.png /) 12 11 repeat stretch', 'border-image') is 'url(dummy://test.png/) 12 11 / 1 / 0px repeat stretch'7 PASS computedBorderImageStyle('url(dummy://test.png) 12 11 repeat stretch', 'border-image') is 'url(dummy://test.png) 12 11 / 1 / 0px repeat stretch' 8 8 PASS checkComputedStyleValue() is true 9 9 PASS computedBorderImageStyle('url(test.png) 1 2 3 4 repeat stretch', 'border-image-slice') is '1 2 3 4' 10 PASS computedBorderImageStyle('url(dummy://test.png) 1 2 3 4 repeat stretch', 'border-image') is 'url(dummy://test.png /) 1 2 3 4 / 1 / 0px repeat stretch'10 PASS computedBorderImageStyle('url(dummy://test.png) 1 2 3 4 repeat stretch', 'border-image') is 'url(dummy://test.png) 1 2 3 4 / 1 / 0px repeat stretch' 11 11 PASS checkComputedStyleValue() is true 12 12 PASS computedBorderImageStyle('url(test.png) 12 repeat stretch', 'border-image-slice') is '12' … … 16 16 PASS checkComputedStyleValue() is true 17 17 PASS computedBorderImageStyle('url(test.png) 10 20 fill', 'border-image-slice') is '10 20 fill' 18 PASS computedBorderImageStyle('url(dummy://test.png) 10 20 fill', 'border-image') is 'url(dummy://test.png /) 10 20 fill / 1 / 0px stretch'18 PASS computedBorderImageStyle('url(dummy://test.png) 10 20 fill', 'border-image') is 'url(dummy://test.png) 10 20 fill / 1 / 0px stretch' 19 19 PASS checkComputedStyleValue() is true 20 PASS computedBorderImageStyle('url(dummy://test.png) 10 10 10 10 repeat stretch', 'border-image-source') is 'url(dummy://test.png /)'21 PASS computedBorderImageStyle('url(dummy://test.png) 10 10 10 10 repeat stretch', 'border-image') is 'url(dummy://test.png /) 10 / 1 / 0px repeat stretch'20 PASS computedBorderImageStyle('url(dummy://test.png) 10 10 10 10 repeat stretch', 'border-image-source') is 'url(dummy://test.png)' 21 PASS computedBorderImageStyle('url(dummy://test.png) 10 10 10 10 repeat stretch', 'border-image') is 'url(dummy://test.png) 10 / 1 / 0px repeat stretch' 22 22 PASS checkComputedStyleValue() is true 23 23 PASS computedBorderImageStyle('url(test.png) 10', 'border-image-repeat') is 'stretch' 24 PASS computedBorderImageStyle('url(dummy://test.png) 10', 'border-image') is 'url(dummy://test.png /) 10 / 1 / 0px stretch'24 PASS computedBorderImageStyle('url(dummy://test.png) 10', 'border-image') is 'url(dummy://test.png) 10 / 1 / 0px stretch' 25 25 PASS checkComputedStyleValue() is true 26 26 PASS computedBorderImageStyle('url(test.png) 10 stretch', 'border-image-repeat') is 'stretch' 27 PASS computedBorderImageStyle('url(dummy://test.png) 10 stretch', 'border-image') is 'url(dummy://test.png /) 10 / 1 / 0px stretch'27 PASS computedBorderImageStyle('url(dummy://test.png) 10 stretch', 'border-image') is 'url(dummy://test.png) 10 / 1 / 0px stretch' 28 28 PASS checkComputedStyleValue() is true 29 29 PASS computedBorderImageStyle('url(test.png) 10 kittens', 'border-image-repeat') is 'stretch' … … 34 34 PASS checkComputedStyleValue() is true 35 35 PASS computedBorderImageStyle('url(test.png) 10 repeat stretch', 'border-image-repeat') is 'repeat stretch' 36 PASS computedBorderImageStyle('url(dummy://test.png) 10 repeat stretch', 'border-image') is 'url(dummy://test.png /) 10 / 1 / 0px repeat stretch'36 PASS computedBorderImageStyle('url(dummy://test.png) 10 repeat stretch', 'border-image') is 'url(dummy://test.png) 10 / 1 / 0px repeat stretch' 37 37 PASS checkComputedStyleValue() is true 38 38 PASS computedBorderImageStyle('url(test.png) 10 round space', 'border-image-repeat') is 'round space' 39 PASS computedBorderImageStyle('url(dummy://test.png) 10 round space', 'border-image') is 'url(dummy://test.png /) 10 / 1 / 0px round space'39 PASS computedBorderImageStyle('url(dummy://test.png) 10 round space', 'border-image') is 'url(dummy://test.png) 10 / 1 / 0px round space' 40 40 PASS checkComputedStyleValue() is true 41 41 PASS computedBorderImageStyle('url(test.png) 10 / 13px 1.5em 1em 10px', 'border-image-width') is '13px 24px 16px 10px' 42 PASS computedBorderImageStyle('url(dummy://test.png) 10 / 13px 1.5em 1em 10px', 'border-image') is 'url(dummy://test.png /) 10 / 13px 24px 16px 10px / 0px stretch'42 PASS computedBorderImageStyle('url(dummy://test.png) 10 / 13px 1.5em 1em 10px', 'border-image') is 'url(dummy://test.png) 10 / 13px 24px 16px 10px / 0px stretch' 43 43 PASS checkComputedStyleValue() is true 44 44 PASS computedBorderImageStyle('url(test.png) 10 / 14px 10%', 'border-image-width') is '14px 10%' 45 PASS computedBorderImageStyle('url(dummy://test.png) 10 / 14px 10%', 'border-image') is 'url(dummy://test.png /) 10 / 14px 10% / 0px stretch'45 PASS computedBorderImageStyle('url(dummy://test.png) 10 / 14px 10%', 'border-image') is 'url(dummy://test.png) 10 / 14px 10% / 0px stretch' 46 46 PASS checkComputedStyleValue() is true 47 47 PASS computedBorderImageStyle('url(test.png) 10 / 13px / 11px', 'border-image-outset') is '11px' 48 PASS computedBorderImageStyle('url(dummy://test.png) 10 / 13px / 11px', 'border-image') is 'url(dummy://test.png /) 10 / 13px / 11px stretch'48 PASS computedBorderImageStyle('url(dummy://test.png) 10 / 13px / 11px', 'border-image') is 'url(dummy://test.png) 10 / 13px / 11px stretch' 49 49 PASS checkComputedStyleValue() is true 50 50 PASS computedBorderImageStyle('url(test.png) 10 / 13px / 11px repeat stretch', 'border-image-outset') is '11px' 51 PASS computedBorderImageStyle('url(dummy://test.png) 10 / 13px / 11px repeat stretch', 'border-image') is 'url(dummy://test.png /) 10 / 13px / 11px repeat stretch'51 PASS computedBorderImageStyle('url(dummy://test.png) 10 / 13px / 11px repeat stretch', 'border-image') is 'url(dummy://test.png) 10 / 13px / 11px repeat stretch' 52 52 PASS checkComputedStyleValue() is true 53 53 PASS successfullyParsed is true -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-border-image.html
r207162 r207321 31 31 shouldBe("checkComputedStyleValue()", "true"); 32 32 shouldBe("computedBorderImageStyle('url(test.png) 12 11 repeat stretch', 'border-image-slice')", "'12 11'"); 33 shouldBe("computedBorderImageStyle('url(dummy://test.png /) 12 11 repeat stretch', 'border-image')", "'url(dummy://test.png/) 12 11 / 1 / 0px repeat stretch'");33 shouldBe("computedBorderImageStyle('url(dummy://test.png) 12 11 repeat stretch', 'border-image')", "'url(dummy://test.png) 12 11 / 1 / 0px repeat stretch'"); 34 34 shouldBe("checkComputedStyleValue()", "true"); 35 35 shouldBe("computedBorderImageStyle('url(test.png) 1 2 3 4 repeat stretch', 'border-image-slice')", "'1 2 3 4'"); 36 shouldBe("computedBorderImageStyle('url(dummy://test.png) 1 2 3 4 repeat stretch', 'border-image')", "'url(dummy://test.png /) 1 2 3 4 / 1 / 0px repeat stretch'");36 shouldBe("computedBorderImageStyle('url(dummy://test.png) 1 2 3 4 repeat stretch', 'border-image')", "'url(dummy://test.png) 1 2 3 4 / 1 / 0px repeat stretch'"); 37 37 shouldBe("checkComputedStyleValue()", "true"); 38 38 shouldBe("computedBorderImageStyle('url(test.png) 12 repeat stretch', 'border-image-slice')", "'12'"); … … 42 42 shouldBe("checkComputedStyleValue()", "true"); 43 43 shouldBe("computedBorderImageStyle('url(test.png) 10 20 fill', 'border-image-slice')", "'10 20 fill'"); 44 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 20 fill', 'border-image')", "'url(dummy://test.png /) 10 20 fill / 1 / 0px stretch'");44 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 20 fill', 'border-image')", "'url(dummy://test.png) 10 20 fill / 1 / 0px stretch'"); 45 45 shouldBe("checkComputedStyleValue()", "true"); 46 46 47 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 10 10 10 repeat stretch', 'border-image-source')", "'url(dummy://test.png /)'");48 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 10 10 10 repeat stretch', 'border-image')", "'url(dummy://test.png /) 10 / 1 / 0px repeat stretch'");47 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 10 10 10 repeat stretch', 'border-image-source')", "'url(dummy://test.png)'"); 48 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 10 10 10 repeat stretch', 'border-image')", "'url(dummy://test.png) 10 / 1 / 0px repeat stretch'"); 49 49 shouldBe("checkComputedStyleValue()", "true"); 50 50 51 51 shouldBe("computedBorderImageStyle('url(test.png) 10', 'border-image-repeat')", "'stretch'"); 52 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10', 'border-image')", "'url(dummy://test.png /) 10 / 1 / 0px stretch'");52 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10', 'border-image')", "'url(dummy://test.png) 10 / 1 / 0px stretch'"); 53 53 shouldBe("checkComputedStyleValue()", "true"); 54 54 shouldBe("computedBorderImageStyle('url(test.png) 10 stretch', 'border-image-repeat')", "'stretch'"); 55 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 stretch', 'border-image')", "'url(dummy://test.png /) 10 / 1 / 0px stretch'");55 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 stretch', 'border-image')", "'url(dummy://test.png) 10 / 1 / 0px stretch'"); 56 56 shouldBe("checkComputedStyleValue()", "true"); 57 57 shouldBe("computedBorderImageStyle('url(test.png) 10 kittens', 'border-image-repeat')", "'stretch'"); … … 62 62 shouldBe("checkComputedStyleValue()", "true"); 63 63 shouldBe("computedBorderImageStyle('url(test.png) 10 repeat stretch', 'border-image-repeat')", "'repeat stretch'"); 64 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 repeat stretch', 'border-image')", "'url(dummy://test.png /) 10 / 1 / 0px repeat stretch'");64 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 repeat stretch', 'border-image')", "'url(dummy://test.png) 10 / 1 / 0px repeat stretch'"); 65 65 shouldBe("checkComputedStyleValue()", "true"); 66 66 shouldBe("computedBorderImageStyle('url(test.png) 10 round space', 'border-image-repeat')", "'round space'"); 67 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 round space', 'border-image')", "'url(dummy://test.png /) 10 / 1 / 0px round space'");67 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 round space', 'border-image')", "'url(dummy://test.png) 10 / 1 / 0px round space'"); 68 68 shouldBe("checkComputedStyleValue()", "true"); 69 69 70 70 shouldBe("computedBorderImageStyle('url(test.png) 10 / 13px 1.5em 1em 10px', 'border-image-width')", "'13px 24px 16px 10px'"); 71 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 / 13px 1.5em 1em 10px', 'border-image')", "'url(dummy://test.png /) 10 / 13px 24px 16px 10px / 0px stretch'");71 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 / 13px 1.5em 1em 10px', 'border-image')", "'url(dummy://test.png) 10 / 13px 24px 16px 10px / 0px stretch'"); 72 72 shouldBe("checkComputedStyleValue()", "true"); 73 73 shouldBe("computedBorderImageStyle('url(test.png) 10 / 14px 10%', 'border-image-width')", "'14px 10%'"); 74 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 / 14px 10%', 'border-image')", "'url(dummy://test.png /) 10 / 14px 10% / 0px stretch'");74 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 / 14px 10%', 'border-image')", "'url(dummy://test.png) 10 / 14px 10% / 0px stretch'"); 75 75 shouldBe("checkComputedStyleValue()", "true"); 76 76 shouldBe("computedBorderImageStyle('url(test.png) 10 / 13px / 11px', 'border-image-outset')", "'11px'"); 77 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 / 13px / 11px', 'border-image')", "'url(dummy://test.png /) 10 / 13px / 11px stretch'");77 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 / 13px / 11px', 'border-image')", "'url(dummy://test.png) 10 / 13px / 11px stretch'"); 78 78 shouldBe("checkComputedStyleValue()", "true"); 79 79 80 80 shouldBe("computedBorderImageStyle('url(test.png) 10 / 13px / 11px repeat stretch', 'border-image-outset')", "'11px'"); 81 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 / 13px / 11px repeat stretch', 'border-image')", "'url(dummy://test.png /) 10 / 13px / 11px repeat stretch'");81 shouldBe("computedBorderImageStyle('url(dummy://test.png) 10 / 13px / 11px repeat stretch', 'border-image')", "'url(dummy://test.png) 10 / 13px / 11px repeat stretch'"); 82 82 shouldBe("checkComputedStyleValue()", "true"); 83 83 -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade-expected.txt
r207162 r207321 4 4 PASS testCrossfade("opacity: 500%", "opacity") is "1" 5 5 Prefixed 6 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), 50%)", "background-image") is "-webkit-cross-fade(url(dummy://example.png/), url(dummy://example.png/), 0.5)"7 PASS testCrossfade("background-image: -webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png /), url(dummy://b.png/), 25%), url(dummy://example.png/), 50%)", "background-image") is "-webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), url(dummy://example.png/), 0.5)"8 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://c.png /), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png/), 25%), 50%)", "background-image") is "-webkit-cross-fade(url(dummy://c.png/), -webkit-cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), 0.5)"9 PASS testCrossfade("background-image: -webkit-cross-fade(-webkit-linear-gradient(black, white), url(dummy://example.png), 10%)", "background-image") is "-webkit-cross-fade(-webkit-linear-gradient(top, black, white), url(dummy://example.png /), 0.1)"10 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png /), 1.0)", "background-image") is "-webkit-cross-fade(url(dummy://example.png/), url(dummy://example.png/), 1)"11 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)", "background-image") is "-webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), 0.5)"12 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 5.0)", "background-image") is "-webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), 1)"13 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 700%)", "background-image") is "-webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), 1)"14 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), -20)", "background-image") is "-webkit-cross-fade(url(dummy://example.png/), url(dummy://example.png/), 0)"6 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)", "background-image") is "-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)" 7 PASS testCrossfade("background-image: -webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), url(dummy://example.png), 50%)", "background-image") is "-webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), url(dummy://example.png), 0.5)" 8 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://c.png), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image") is "-webkit-cross-fade(url(dummy://c.png), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)" 9 PASS testCrossfade("background-image: -webkit-cross-fade(-webkit-linear-gradient(black, white), url(dummy://example.png), 10%)", "background-image") is "-webkit-cross-fade(-webkit-linear-gradient(top, black, white), url(dummy://example.png), 0.1)" 10 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1.0)", "background-image") is "-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1)" 11 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)", "background-image") is "-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)" 12 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 5.0)", "background-image") is "-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1)" 13 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 700%)", "background-image") is "-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1)" 14 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), -20)", "background-image") is "-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0)" 15 15 Unprefixed 16 16 17 17 18 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png /), 50%)", "background-image") is "cross-fade(url(dummy://example.png/), url(dummy://example.png/), 0.5)"19 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 1.0)", "background-image") is "cross-fade(url(dummy://example.png /), url(dummy://example.png/), 1)"18 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)", "background-image") is "cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)" 19 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 1.0)", "background-image") is "cross-fade(url(dummy://example.png), url(dummy://example.png), 1)" 20 20 Mixed 21 21 22 22 23 PASS testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png /), 25%), url(dummy://example.png), 50%)", "background-image") is "-webkit-cross-fade(cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), url(dummy://example.png/), 0.5)"24 PASS testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png /), url(dummy://b.png/), 25%), cross-fade(url(dummy://a.png/), url(dummy://b.png/), 25%), 50%)", "background-image") is "-webkit-cross-fade(cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), 0.5)"25 PASS testCrossfade("background-image: cross-fade(cross-fade(url(dummy://a.png /), url(dummy://b.png/), 25%), -webkit-cross-fade(url(dummy://a.png/), url(dummy://b.png/), 25%), 50%)", "background-image") is "cross-fade(cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), -webkit-cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), 0.5)"23 PASS testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), url(dummy://example.png), 50%)", "background-image") is "-webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), url(dummy://example.png), 0.5)" 24 PASS testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image") is "-webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)" 25 PASS testCrossfade("background-image: cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image") is "cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)" 26 26 Invalid values 27 27 28 28 29 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/))", "background-image") is "none"30 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png),)", "background-image") is "none"31 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png /), url(dummy://example.png))", "background-image") is "none"32 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png /),)", "background-image") is "none"29 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png))", "background-image") is "none" 30 PASS testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png),)", "background-image") is "none" 31 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png))", "background-image") is "none" 32 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png),)", "background-image") is "none" 33 33 PASS testCrossfade("background-image: cross-fade(url(dummy://example.png))", "background-image") is "none" 34 34 PASS testCrossfade("background-image: cross-fade(), url(dummy://example.png))", "background-image") is "none" … … 36 36 PASS testCrossfade("background-image: cross-fade(10px 20% 5px #bbb)", "background-image") is "none" 37 37 PASS testCrossfade("background-image: cross-fade(cross-fade(cross-fade()))", "background-image") is "none" 38 PASS testCrossfade("background-image: cross-fade(20%, url(dummy://a.png /), url(dummy://b.png/))", "background-image") is "none"39 PASS testCrossfade("background-image: cross-fade(url(dummy://a.png /),)", "background-image") is "none"38 PASS testCrossfade("background-image: cross-fade(20%, url(dummy://a.png), url(dummy://b.png))", "background-image") is "none" 39 PASS testCrossfade("background-image: cross-fade(url(dummy://a.png),)", "background-image") is "none" 40 40 PASS testCrossfade("background-image: cross-fade(,)", "background-image") is "none" 41 PASS testCrossfade("background-image: cross-fade(,url(dummy://a.png /))", "background-image") is "none"41 PASS testCrossfade("background-image: cross-fade(,url(dummy://a.png))", "background-image") is "none" 42 42 PASS testCrossfade("background-image: cross-fade(,,,,,)", "background-image") is "none" 43 43 PASS successfullyParsed is true -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-cross-fade.html
r207162 r207321 26 26 debug('Prefixed'); 27 27 28 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), 50%)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png/), url(dummy://example.png/), 0.5)"');29 shouldBe('testCrossfade("background-image: -webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png /), url(dummy://b.png/), 25%), url(dummy://example.png/), 50%)", "background-image")', '"-webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), url(dummy://example.png/), 0.5)"');30 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://c.png /), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png/), 25%), 50%)", "background-image")',31 '"-webkit-cross-fade(url(dummy://c.png /), -webkit-cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), 0.5)"');32 shouldBe('testCrossfade("background-image: -webkit-cross-fade(-webkit-linear-gradient(black, white), url(dummy://example.png), 10%)", "background-image")', '"-webkit-cross-fade(-webkit-linear-gradient(top, black, white), url(dummy://example.png /), 0.1)"');33 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png /), 1.0)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png/), url(dummy://example.png/), 1)"');34 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), 0.5)"');28 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)"'); 29 shouldBe('testCrossfade("background-image: -webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), url(dummy://example.png), 50%)", "background-image")', '"-webkit-cross-fade(-webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), url(dummy://example.png), 0.5)"'); 30 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://c.png), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image")', 31 '"-webkit-cross-fade(url(dummy://c.png), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)"'); 32 shouldBe('testCrossfade("background-image: -webkit-cross-fade(-webkit-linear-gradient(black, white), url(dummy://example.png), 10%)", "background-image")', '"-webkit-cross-fade(-webkit-linear-gradient(top, black, white), url(dummy://example.png), 0.1)"'); 33 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1.0)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1)"'); 34 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)"'); 35 35 36 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 5.0)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), 1)"');37 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 700%)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), 1)"');36 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 5.0)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1)"'); 37 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 700%)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 1)"'); 38 38 39 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/), -20)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png/), url(dummy://example.png/), 0)"');39 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), -20)", "background-image")', '"-webkit-cross-fade(url(dummy://example.png), url(dummy://example.png), 0)"'); 40 40 41 41 debug('<h2>Unprefixed</h2>'); 42 42 43 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png /), 50%)", "background-image")', '"cross-fade(url(dummy://example.png/), url(dummy://example.png/), 0.5)"');44 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 1.0)", "background-image")', '"cross-fade(url(dummy://example.png /), url(dummy://example.png/), 1)"');43 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 50%)", "background-image")', '"cross-fade(url(dummy://example.png), url(dummy://example.png), 0.5)"'); 44 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png), 1.0)", "background-image")', '"cross-fade(url(dummy://example.png), url(dummy://example.png), 1)"'); 45 45 46 46 debug('<h2>Mixed</h2>'); 47 47 48 shouldBe('testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png /), 25%), url(dummy://example.png), 50%)", "background-image")',49 '"-webkit-cross-fade(cross-fade(url(dummy://a.png /), url(dummy://b.png/), 0.25), url(dummy://example.png/), 0.5)"');50 shouldBe('testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png /), url(dummy://b.png/), 25%), cross-fade(url(dummy://a.png/), url(dummy://b.png/), 25%), 50%)", "background-image")',51 '"-webkit-cross-fade(cross-fade(url(dummy://a.png /), url(dummy://b.png/), 0.25), cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), 0.5)"');52 shouldBe('testCrossfade("background-image: cross-fade(cross-fade(url(dummy://a.png /), url(dummy://b.png/), 25%), -webkit-cross-fade(url(dummy://a.png/), url(dummy://b.png/), 25%), 50%)", "background-image")',53 '"cross-fade(cross-fade(url(dummy://a.png /), url(dummy://b.png/), 0.25), -webkit-cross-fade(url(dummy://a.png/), url(dummy://b.png/), 0.25), 0.5)"');48 shouldBe('testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), url(dummy://example.png), 50%)", "background-image")', 49 '"-webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), url(dummy://example.png), 0.5)"'); 50 shouldBe('testCrossfade("background-image: -webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image")', 51 '"-webkit-cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)"'); 52 shouldBe('testCrossfade("background-image: cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 25%), 50%)", "background-image")', 53 '"cross-fade(cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), -webkit-cross-fade(url(dummy://a.png), url(dummy://b.png), 0.25), 0.5)"'); 54 54 55 55 debug('<h2>Invalid values</h2>'); 56 56 57 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png/))", "background-image")', '"none"');58 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png /), url(dummy://example.png),)", "background-image")', '"none"');57 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png))", "background-image")', '"none"'); 58 shouldBe('testCrossfade("background-image: -webkit-cross-fade(url(dummy://example.png), url(dummy://example.png),)", "background-image")', '"none"'); 59 59 60 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png /), url(dummy://example.png))", "background-image")', '"none"');61 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png /),)", "background-image")', '"none"');60 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png))", "background-image")', '"none"'); 61 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png), url(dummy://example.png),)", "background-image")', '"none"'); 62 62 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://example.png))", "background-image")', '"none"'); 63 63 shouldBe('testCrossfade("background-image: cross-fade(), url(dummy://example.png))", "background-image")', '"none"'); … … 65 65 shouldBe('testCrossfade("background-image: cross-fade(10px 20% 5px #bbb)", "background-image")', '"none"'); 66 66 shouldBe('testCrossfade("background-image: cross-fade(cross-fade(cross-fade()))", "background-image")', '"none"'); 67 shouldBe('testCrossfade("background-image: cross-fade(20%, url(dummy://a.png /), url(dummy://b.png/))", "background-image")', '"none"');68 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://a.png /),)", "background-image")', '"none"');67 shouldBe('testCrossfade("background-image: cross-fade(20%, url(dummy://a.png), url(dummy://b.png))", "background-image")', '"none"'); 68 shouldBe('testCrossfade("background-image: cross-fade(url(dummy://a.png),)", "background-image")', '"none"'); 69 69 shouldBe('testCrossfade("background-image: cross-fade(,)", "background-image")', '"none"'); 70 shouldBe('testCrossfade("background-image: cross-fade(,url(dummy://a.png /))", "background-image")', '"none"');70 shouldBe('testCrossfade("background-image: cross-fade(,url(dummy://a.png))", "background-image")', '"none"'); 71 71 shouldBe('testCrossfade("background-image: cross-fade(,,,,,)", "background-image")', '"none"'); 72 72 -
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt
r207162 r207321 23 23 PASS computedStyle.getPropertyCSSValue('background').item(1).item(2).getStringValue() is 'border-box' 24 24 PASS checkComputedStyleValue() is true 25 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 0% 0% / auto padding-box border-box'25 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / auto padding-box border-box' 26 26 PASS computedStyle.getPropertyCSSValue('background').toString() is '[object CSSValueList]' 27 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 0% 0% / auto padding-box border-box'27 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / auto padding-box border-box' 28 28 PASS computedStyle.getPropertyCSSValue('background').length is 2 29 29 PASS computedStyle.getPropertyCSSValue('background').item(0).length is 5 … … 32 32 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 33 33 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 34 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png /'34 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png' 35 35 PASS computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue() is 'repeat' 36 36 PASS computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue() is 'scroll' … … 42 42 PASS computedStyle.getPropertyCSSValue('background').item(1).item(2).getStringValue() is 'border-box' 43 43 PASS checkComputedStyleValue() is true 44 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 0% 0% / auto padding-box border-box'44 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 0% 0% / auto padding-box border-box' 45 45 PASS computedStyle.getPropertyCSSValue('background').toString() is '[object CSSValueList]' 46 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 0% 0% / auto padding-box border-box'46 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 0% 0% / auto padding-box border-box' 47 47 PASS computedStyle.getPropertyCSSValue('background').length is 2 48 48 PASS computedStyle.getPropertyCSSValue('background').item(0).length is 5 … … 51 51 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 52 52 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 53 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png /'53 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png' 54 54 PASS computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue() is 'no-repeat' 55 55 PASS computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue() is 'scroll' … … 61 61 PASS computedStyle.getPropertyCSSValue('background').item(1).item(2).getStringValue() is 'border-box' 62 62 PASS checkComputedStyleValue() is true 63 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 0% 0% / auto padding-box border-box'63 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 0% 0% / auto padding-box border-box' 64 64 PASS computedStyle.getPropertyCSSValue('background').toString() is '[object CSSValueList]' 65 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 0% 0% / auto padding-box border-box'65 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 0% 0% / auto padding-box border-box' 66 66 PASS computedStyle.getPropertyCSSValue('background').length is 2 67 67 PASS computedStyle.getPropertyCSSValue('background').item(0).length is 5 … … 70 70 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 71 71 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 72 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png /'72 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png' 73 73 PASS computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue() is 'no-repeat' 74 74 PASS computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue() is 'fixed' … … 80 80 PASS computedStyle.getPropertyCSSValue('background').item(1).item(2).getStringValue() is 'border-box' 81 81 PASS checkComputedStyleValue() is true 82 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / auto padding-box border-box'82 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / auto padding-box border-box' 83 83 PASS computedStyle.getPropertyCSSValue('background').toString() is '[object CSSValueList]' 84 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / auto padding-box border-box'84 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / auto padding-box border-box' 85 85 PASS computedStyle.getPropertyCSSValue('background').length is 2 86 86 PASS computedStyle.getPropertyCSSValue('background').item(0).length is 5 … … 89 89 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 90 90 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 91 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png /'91 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png' 92 92 PASS computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue() is 'no-repeat' 93 93 PASS computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue() is 'fixed' … … 99 99 PASS computedStyle.getPropertyCSSValue('background').item(1).item(2).getStringValue() is 'border-box' 100 100 PASS checkComputedStyleValue() is true 101 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover padding-box border-box'101 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover padding-box border-box' 102 102 PASS computedStyle.getPropertyCSSValue('background').toString() is '[object CSSValueList]' 103 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover padding-box border-box'103 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover padding-box border-box' 104 104 PASS computedStyle.getPropertyCSSValue('background').length is 2 105 105 PASS computedStyle.getPropertyCSSValue('background').item(0).length is 5 … … 108 108 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 109 109 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 110 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png /'110 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png' 111 111 PASS computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue() is 'no-repeat' 112 112 PASS computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue() is 'fixed' … … 118 118 PASS computedStyle.getPropertyCSSValue('background').item(1).item(2).getStringValue() is 'border-box' 119 119 PASS checkComputedStyleValue() is true 120 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover content-box border-box'120 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box border-box' 121 121 PASS computedStyle.getPropertyCSSValue('background').toString() is '[object CSSValueList]' 122 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover content-box border-box'122 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box border-box' 123 123 PASS computedStyle.getPropertyCSSValue('background').length is 2 124 124 PASS computedStyle.getPropertyCSSValue('background').item(0).length is 5 … … 127 127 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 128 128 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 129 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png /'129 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png' 130 130 PASS computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue() is 'no-repeat' 131 131 PASS computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue() is 'fixed' … … 137 137 PASS computedStyle.getPropertyCSSValue('background').item(1).item(2).getStringValue() is 'border-box' 138 138 PASS checkComputedStyleValue() is true 139 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover content-box padding-box'139 PASS computedStyle.getPropertyValue('background') is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box padding-box' 140 140 PASS computedStyle.getPropertyCSSValue('background').toString() is '[object CSSValueList]' 141 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover content-box padding-box'141 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box padding-box' 142 142 PASS computedStyle.getPropertyCSSValue('background').length is 2 143 143 PASS computedStyle.getPropertyCSSValue('background').item(0).length is 5 … … 146 146 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 147 147 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 148 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png /'148 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png' 149 149 PASS computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue() is 'no-repeat' 150 150 PASS computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue() is 'fixed' … … 156 156 PASS computedStyle.getPropertyCSSValue('background').item(1).item(2).getStringValue() is 'padding-box' 157 157 PASS checkComputedStyleValue() is true 158 PASS computedStyle.getPropertyValue('background') is 'rgb(0, 128, 0) url(dummy://test.png /) repeat fixed 45% 50% / contain border-box padding-box'158 PASS computedStyle.getPropertyValue('background') is 'rgb(0, 128, 0) url(dummy://test.png) repeat fixed 45% 50% / contain border-box padding-box' 159 159 PASS computedStyle.getPropertyCSSValue('background').toString() is '[object CSSValueList]' 160 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(0, 128, 0) url(dummy://test.png /) repeat fixed 45% 50% / contain border-box padding-box'160 PASS computedStyle.getPropertyCSSValue('background').cssText is 'rgb(0, 128, 0) url(dummy://test.png) repeat fixed 45% 50% / contain border-box padding-box' 161 161 PASS computedStyle.getPropertyCSSValue('background').length is 2 162 162 PASS computedStyle.getPropertyCSSValue('background').item(0).length is 5 … … 165 165 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 128 166 166 PASS computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER) is 0 167 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png /'167 PASS computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue() is 'dummy://test.png' 168 168 PASS computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue() is 'repeat' 169 169 PASS computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue() is 'fixed' -
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-background-shorthand.html
r207162 r207321 48 48 49 49 e.style.backgroundImage = "url(dummy://test.png)"; 50 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 0% 0% / auto padding-box border-box'");51 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 52 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png /) repeat scroll 0% 0% / auto padding-box border-box'");53 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 54 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 55 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 56 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 57 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 58 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 59 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png /'");50 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / auto padding-box border-box'"); 51 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 52 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) repeat scroll 0% 0% / auto padding-box border-box'"); 53 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 54 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 55 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 56 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 57 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 58 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 59 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png'"); 60 60 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue()", "'repeat'"); 61 61 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue()", "'scroll'"); … … 69 69 70 70 e.style.backgroundRepeat = "no-repeat"; 71 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 0% 0% / auto padding-box border-box'");72 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 73 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat scroll 0% 0% / auto padding-box border-box'");74 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 75 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 76 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 77 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 78 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 79 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 80 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png /'");71 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 0% 0% / auto padding-box border-box'"); 72 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 73 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat scroll 0% 0% / auto padding-box border-box'"); 74 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 75 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 76 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 77 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 78 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 79 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 80 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png'"); 81 81 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue()", "'no-repeat'"); 82 82 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue()", "'scroll'"); … … 90 90 91 91 e.style.backgroundAttachment = "fixed"; 92 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 0% 0% / auto padding-box border-box'");93 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 94 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 0% 0% / auto padding-box border-box'");95 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 96 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 97 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 98 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 99 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 100 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 101 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png /'");92 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 0% 0% / auto padding-box border-box'"); 93 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 94 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 0% 0% / auto padding-box border-box'"); 95 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 96 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 97 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 98 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 99 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 100 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 101 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png'"); 102 102 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue()", "'no-repeat'"); 103 103 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue()", "'fixed'"); … … 111 111 112 112 e.style.backgroundPosition = "right bottom"; 113 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / auto padding-box border-box'");114 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 115 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / auto padding-box border-box'");116 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 117 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 118 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 119 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 120 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 121 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 122 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png /'");113 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / auto padding-box border-box'"); 114 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 115 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / auto padding-box border-box'"); 116 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 117 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 118 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 119 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 120 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 121 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 122 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png'"); 123 123 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue()", "'no-repeat'"); 124 124 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue()", "'fixed'"); … … 132 132 133 133 e.style.backgroundSize = "cover"; 134 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover padding-box border-box'");135 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 136 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover padding-box border-box'");137 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 138 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 139 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 140 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 141 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 142 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 143 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png /'");134 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover padding-box border-box'"); 135 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 136 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover padding-box border-box'"); 137 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 138 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 139 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 140 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 141 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 142 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 143 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png'"); 144 144 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue()", "'no-repeat'"); 145 145 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue()", "'fixed'"); … … 153 153 154 154 e.style.backgroundOrigin = "content-box"; 155 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover content-box border-box'");156 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 157 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover content-box border-box'");158 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 159 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 160 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 161 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 162 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 163 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 164 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png /'");155 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box border-box'"); 156 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 157 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box border-box'"); 158 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 159 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 160 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 161 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 162 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 163 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 164 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png'"); 165 165 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue()", "'no-repeat'"); 166 166 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue()", "'fixed'"); … … 174 174 175 175 e.style.backgroundClip = "padding-box"; 176 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover content-box padding-box'");177 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 178 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png /) no-repeat fixed 100% 100% / cover content-box padding-box'");179 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 180 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 181 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 182 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 183 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 184 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 185 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png /'");176 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box padding-box'"); 177 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 178 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(255, 0, 0) url(dummy://test.png) no-repeat fixed 100% 100% / cover content-box padding-box'"); 179 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 180 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); 181 shouldBe("computedStyle.getPropertyCSSValue('background').item(1).length", "3"); 182 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().red.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "255"); 183 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 184 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 185 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png'"); 186 186 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue()", "'no-repeat'"); 187 187 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue()", "'fixed'"); … … 194 194 shouldBe("checkComputedStyleValue()", "true"); 195 195 196 e.style.background = "border-box padding-box url(dummy://test.png /) green 45% / contain repeat fixed";197 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(0, 128, 0) url(dummy://test.png /) repeat fixed 45% 50% / contain border-box padding-box'");198 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 199 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(0, 128, 0) url(dummy://test.png /) repeat fixed 45% 50% / contain border-box padding-box'");196 e.style.background = "border-box padding-box url(dummy://test.png) green 45% / contain repeat fixed"; 197 shouldBe("computedStyle.getPropertyValue('background')", "'rgb(0, 128, 0) url(dummy://test.png) repeat fixed 45% 50% / contain border-box padding-box'"); 198 shouldBe("computedStyle.getPropertyCSSValue('background').toString()", "'[object CSSValueList]'"); 199 shouldBe("computedStyle.getPropertyCSSValue('background').cssText", "'rgb(0, 128, 0) url(dummy://test.png) repeat fixed 45% 50% / contain border-box padding-box'"); 200 200 shouldBe("computedStyle.getPropertyCSSValue('background').length", "2"); 201 201 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).length", "5"); … … 204 204 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().green.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "128"); 205 205 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(0).getRGBColorValue().blue.getFloatValue(CSSPrimitiveValue.CSS_NUMBER)", "0"); 206 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png /'");206 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(1).getStringValue()", "'dummy://test.png'"); 207 207 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(2).getStringValue()", "'repeat'"); 208 208 shouldBe("computedStyle.getPropertyCSSValue('background').item(0).item(3).getStringValue()", "'fixed'"); -
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt
r207162 r207321 4 4 5 5 6 PASS computedStyle.getPropertyValue('list-style') is 'circle outside url(dummy://test.png /)'6 PASS computedStyle.getPropertyValue('list-style') is 'circle outside url(dummy://test.png)' 7 7 PASS computedStyle.getPropertyCSSValue('list-style').toString() is '[object CSSValueList]' 8 8 PASS computedStyle.getPropertyCSSValue('list-style').length is 3 9 PASS computedStyle.getPropertyCSSValue('list-style').cssText is 'circle outside url(dummy://test.png /)'9 PASS computedStyle.getPropertyCSSValue('list-style').cssText is 'circle outside url(dummy://test.png)' 10 10 PASS computedStyle.getPropertyCSSValue('list-style').item(0).getStringValue() is 'circle' 11 11 PASS computedStyle.getPropertyCSSValue('list-style').item(1).getStringValue() is 'outside' 12 PASS computedStyle.getPropertyCSSValue('list-style').item(2).getStringValue() is 'dummy://test.png /'12 PASS computedStyle.getPropertyCSSValue('list-style').item(2).getStringValue() is 'dummy://test.png' 13 13 PASS computedStyle.getPropertyValue('list-style') is 'disc outside none' 14 14 PASS computedStyle.getPropertyCSSValue('list-style').toString() is '[object CSSValueList]' … … 32 32 PASS computedStyle.getPropertyCSSValue('list-style').item(1).getStringValue() is 'outside' 33 33 PASS computedStyle.getPropertyCSSValue('list-style').item(2).getStringValue() is 'none' 34 PASS computedStyle.getPropertyValue('list-style') is 'circle outside url(dummy://test.png /)'34 PASS computedStyle.getPropertyValue('list-style') is 'circle outside url(dummy://test.png)' 35 35 PASS computedStyle.getPropertyCSSValue('list-style').toString() is '[object CSSValueList]' 36 36 PASS computedStyle.getPropertyCSSValue('list-style').length is 3 37 PASS computedStyle.getPropertyCSSValue('list-style').cssText is 'circle outside url(dummy://test.png /)'37 PASS computedStyle.getPropertyCSSValue('list-style').cssText is 'circle outside url(dummy://test.png)' 38 38 PASS computedStyle.getPropertyCSSValue('list-style').item(0).getStringValue() is 'circle' 39 39 PASS computedStyle.getPropertyCSSValue('list-style').item(1).getStringValue() is 'outside' 40 PASS computedStyle.getPropertyCSSValue('list-style').item(2).getStringValue() is 'dummy://test.png /'40 PASS computedStyle.getPropertyCSSValue('list-style').item(2).getStringValue() is 'dummy://test.png' 41 41 PASS successfullyParsed is true 42 42 -
trunk/LayoutTests/fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html
r207162 r207321 20 20 21 21 e.style.listStyle = "circle outside url(dummy://test.png)"; 22 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside url(dummy://test.png /)'");22 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside url(dummy://test.png)'"); 23 23 shouldBe("computedStyle.getPropertyCSSValue('list-style').toString()", "'[object CSSValueList]'"); 24 24 shouldBe("computedStyle.getPropertyCSSValue('list-style').length", "3"); 25 shouldBe("computedStyle.getPropertyCSSValue('list-style').cssText", "'circle outside url(dummy://test.png /)'");25 shouldBe("computedStyle.getPropertyCSSValue('list-style').cssText", "'circle outside url(dummy://test.png)'"); 26 26 shouldBe("computedStyle.getPropertyCSSValue('list-style').item(0).getStringValue()", "'circle'"); 27 27 shouldBe("computedStyle.getPropertyCSSValue('list-style').item(1).getStringValue()", "'outside'"); 28 shouldBe("computedStyle.getPropertyCSSValue('list-style').item(2).getStringValue()", "'dummy://test.png /'");28 shouldBe("computedStyle.getPropertyCSSValue('list-style').item(2).getStringValue()", "'dummy://test.png'"); 29 29 30 30 e.style.listStyle = "" … … 60 60 e.style.listStylePosition = "outside"; 61 61 e.style.listStyleImage = "url(dummy://test.png)"; 62 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside url(dummy://test.png /)'");62 shouldBe("computedStyle.getPropertyValue('list-style')", "'circle outside url(dummy://test.png)'"); 63 63 shouldBe("computedStyle.getPropertyCSSValue('list-style').toString()", "'[object CSSValueList]'"); 64 64 shouldBe("computedStyle.getPropertyCSSValue('list-style').length", "3"); 65 shouldBe("computedStyle.getPropertyCSSValue('list-style').cssText", "'circle outside url(dummy://test.png /)'");65 shouldBe("computedStyle.getPropertyCSSValue('list-style').cssText", "'circle outside url(dummy://test.png)'"); 66 66 shouldBe("computedStyle.getPropertyCSSValue('list-style').item(0).getStringValue()", "'circle'"); 67 67 shouldBe("computedStyle.getPropertyCSSValue('list-style').item(1).getStringValue()", "'outside'"); 68 shouldBe("computedStyle.getPropertyCSSValue('list-style').item(2).getStringValue()", "'dummy://test.png /'");68 shouldBe("computedStyle.getPropertyCSSValue('list-style').item(2).getStringValue()", "'dummy://test.png'"); 69 69 70 70 document.body.removeChild(testContainer); -
trunk/LayoutTests/fast/loader/url-parse-1-expected.txt
r207162 r207321 42 42 x-webkit:/test x-webkit:/test /test 43 43 x-webkit:// x-webkit:// // 44 x-webkit://test x-webkit://test / test /44 x-webkit://test x-webkit://test test 45 45 x-webkit:/// x-webkit:/// /// 46 46 x-webkit:///test x-webkit:///test ///test -
trunk/LayoutTests/fast/url/host-lowercase-per-scheme-expected.txt
r207162 r207321 26 26 PASS src is expected 27 27 PASS src is expected 28 FAIL src should be ghost://CamelCase/. Was ghost://camelcase/. 28 PASS src is expected 29 29 FAIL src should be ghost://UnicodeF%C3%AAte/. Was ghost://xn--unicodefte-t7a/. 30 30 PASS successfullyParsed is true -
trunk/LayoutTests/fast/url/safari-extension-expected.txt
r207162 r207321 6 6 PASS src is expected 7 7 PASS src is expected 8 FAIL src should be safari-extension://com.ApPlE/. Was safari-extension://com.apple/. 8 PASS src is expected 9 9 FAIL src should be safari-extension://com.f%C3%AAte/. Was safari-extension://com.xn--fte-fma/. 10 10 PASS successfullyParsed is true -
trunk/LayoutTests/http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt
r207162 r207321 1 1 CONSOLE MESSAGE: Cross-origin redirection to http://localhost:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi denied by Cross-Origin Resource Sharing policy: Origin http://127.0.0.1:8000 is not allowed by Access-Control-Allow-Origin. 2 2 CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/redirect-cors.php?url=http://localhost:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi due to access control checks. 3 CONSOLE MESSAGE: Cross-origin redirection to foo://bar.cgi /denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials.3 CONSOLE MESSAGE: Cross-origin redirection to foo://bar.cgi denied by Cross-Origin Resource Sharing policy: URL is either a non-HTTP URL or contains credentials. 4 4 CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/redirect-cors.php?url=foo://bar.cgi&%20%20access-control-allow-origin=http://127.0.0.1:8000 due to access control checks. 5 5 CONSOLE MESSAGE: XMLHttpRequest cannot load http://localhost:8000/xmlhttprequest/resources/redirect-cors.php?redirect-preflight=true&%20%20url=http://localhost:8000/xmlhttprequest/resources/access-control-basic-allow-star.cgi&%20%20access-control-allow-origin=*. Preflight response is not successful -
trunk/LayoutTests/imported/w3c/ChangeLog
r207181 r207321 1 2016-10-13 Alex Christensen <achristensen@webkit.org> 2 3 Hosts of URLs with non-special schemes should be case-sensitive, and non-ASCII characters in such hosts should be punycode-encoded 4 https://bugs.webkit.org/show_bug.cgi?id=163413 5 6 Reviewed by Tim Horton. 7 8 * web-platform-tests/url/url-setters-expected.txt: 9 Update results. Some more tests are failing, but if my proposal in https://github.com/whatwg/url/issues/148 is accepted, 10 then these web platform tests will need to be changed. These web platform tests were also failing with the old URL::parse. 11 1 12 2016-10-11 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt
r207162 r207321 1 1 2 2 PASS Loading data… 3 PASS Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged. 4 PASS Setting <a://example.net>.protocol = 'b' 5 PASS Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased 6 PASS Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected 7 PASS Setting <a://example.net>.protocol = '0b' No leading digit 8 PASS Setting <a://example.net>.protocol = '+b' No leading punctuation 9 PASS Setting <a://example.net>.protocol = 'bC0+-.' 10 PASS Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable 11 PASS Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected 3 FAIL Setting <a://example.net>.protocol = '' The empty string is not a valid scheme. Setter leaves the URL unchanged. assert_equals: expected "a://example.net/" but got "a://example.net" 4 FAIL Setting <a://example.net>.protocol = 'b' assert_equals: expected "b://example.net/" but got "b://example.net" 5 FAIL Setting <a://example.net>.protocol = 'B' Upper-case ASCII is lower-cased assert_equals: expected "b://example.net/" but got "b://example.net" 6 FAIL Setting <a://example.net>.protocol = 'é' Non-ASCII is rejected assert_equals: expected "a://example.net/" but got "a://example.net" 7 FAIL Setting <a://example.net>.protocol = '0b' No leading digit assert_equals: expected "a://example.net/" but got "a://example.net" 8 FAIL Setting <a://example.net>.protocol = '+b' No leading punctuation assert_equals: expected "a://example.net/" but got "a://example.net" 9 FAIL Setting <a://example.net>.protocol = 'bC0+-.' assert_equals: expected "bc0+-.://example.net/" but got "bc0+-.://example.net" 10 FAIL Setting <a://example.net>.protocol = 'b,c' Only some punctuation is acceptable assert_equals: expected "a://example.net/" but got "a://example.net" 11 FAIL Setting <a://example.net>.protocol = 'bé' Non-ASCII is rejected assert_equals: expected "a://example.net/" but got "a://example.net" 12 12 FAIL Setting <http://example.net>.protocol = 'b' Can’t switch from special scheme to non-special. Note: this may change, see https://github.com/whatwg/url/issues/104 assert_equals: expected "http://example.net/" but got "b://example.net/" 13 13 FAIL Setting <mailto:me@example.net>.protocol = 'http' Cannot-be-a-base URL doesn’t have a host, but URL in a special scheme must. assert_equals: expected "mailto:me@example.net" but got "http://me@example.net/" … … 17 17 FAIL Setting <file:///home/you/index.html>.username = 'me' No host means no username assert_equals: expected "file:///home/you/index.html" but got "file://me@/home/you/index.html" 18 18 FAIL Setting <unix:/run/foo.socket>.username = 'me' No host means no username assert_equals: expected "unix:/run/foo.socket" but got "unix://me@/run/foo.socket" 19 FAIL Setting <mailto:you@example.net>.username = 'me' Cannot-be-a-base means no username assert_equals: expected "mailto:you@example.net" but got "mailto://me%40you@example.net /"19 FAIL Setting <mailto:you@example.net>.username = 'me' Cannot-be-a-base means no username assert_equals: expected "mailto:you@example.net" but got "mailto://me%40you@example.net" 20 20 PASS Setting <http://example.net>.username = 'me' 21 21 PASS Setting <http://:secret@example.net>.username = 'me' -
trunk/Source/WebCore/ChangeLog
r207319 r207321 1 2016-10-13 Alex Christensen <achristensen@webkit.org> 2 3 Hosts of URLs with non-special schemes should be case-sensitive, and non-ASCII characters in such hosts should be punycode-encoded 4 https://bugs.webkit.org/show_bug.cgi?id=163413 5 6 Reviewed by Tim Horton. 7 8 This retains compatibility with the canonicalization Chrome, Firefox, and Safari with uppercase characters 9 in the hosts of URLs with unrecognized schemes. Safari treats such characters as the host, while Firefox 10 and Chrome treat such characters as part of the path, starting with the "//" after the ':' 11 Behavior of non-ASCII characters is inconsistent, and since we need to have a host, we should punycode-encode 12 the host to be consistent with special schemes because percent-encoding hosts sometimes is inconsistent. 13 14 This solution was proposed to the spec in https://github.com/whatwg/url/issues/148 15 16 Covered by updated API and layout tests. 17 18 * platform/URLParser.cpp: 19 (WebCore::URLParser::parse): 20 (WebCore::URLParser::percentDecode): 21 (WebCore::URLParser::domainToASCII): 22 (WebCore::URLParser::hasInvalidDomainCharacter): 23 (WebCore::URLParser::parseHostAndPort): 24 (WebCore::URLParser::formURLDecode): 25 (WebCore::percentDecode): Deleted. 26 (WebCore::domainToASCII): Deleted. 27 (WebCore::hasInvalidDomainCharacter): Deleted. 28 (WebCore::formURLDecode): Deleted. 29 * platform/URLParser.h: 30 1 31 2016-10-13 Chris Dumez <cdumez@apple.com> 2 32 -
trunk/Source/WebCore/platform/URLParser.cpp
r207305 r207321 1872 1872 return; 1873 1873 } else { 1874 syntaxViolation(c); 1875 appendToASCIIBuffer('/'); 1876 m_url.m_pathEnd = m_url.m_portEnd + 1; 1874 if (m_urlIsSpecial) { 1875 syntaxViolation(c); 1876 appendToASCIIBuffer('/'); 1877 m_url.m_pathEnd = m_url.m_portEnd + 1; 1878 } else 1879 m_url.m_pathEnd = m_url.m_portEnd; 1877 1880 } 1878 1881 m_url.m_pathAfterLastSlash = m_url.m_pathEnd; … … 1886 1889 return; 1887 1890 } 1888 syntaxViolation(c); 1889 appendToASCIIBuffer('/'); 1890 m_url.m_pathEnd = m_url.m_portEnd + 1; 1891 if (m_urlIsSpecial) { 1892 syntaxViolation(c); 1893 appendToASCIIBuffer('/'); 1894 m_url.m_pathEnd = m_url.m_portEnd + 1; 1895 } else 1896 m_url.m_pathEnd = m_url.m_portEnd; 1891 1897 m_url.m_pathAfterLastSlash = m_url.m_pathEnd; 1892 1898 m_url.m_queryEnd = m_url.m_pathEnd; … … 2423 2429 } 2424 2430 2425 const size_t defaultInlineBufferSize = 2048; 2426 2427 static Vector<LChar, defaultInlineBufferSize> percentDecode(const LChar* input, size_t length) 2431 template<typename CharacterType> 2432 Vector<LChar, URLParser::defaultInlineBufferSize> URLParser::percentDecode(const LChar* input, size_t length, const CodePointIterator<CharacterType>& iteratorForSyntaxViolationPosition) 2433 { 2434 Vector<LChar, defaultInlineBufferSize> output; 2435 output.reserveInitialCapacity(length); 2436 2437 for (size_t i = 0; i < length; ++i) { 2438 uint8_t byte = input[i]; 2439 if (byte != '%') 2440 output.uncheckedAppend(byte); 2441 else if (length > 2 && i < length - 2) { 2442 if (isASCIIHexDigit(input[i + 1]) && isASCIIHexDigit(input[i + 2])) { 2443 syntaxViolation(iteratorForSyntaxViolationPosition); 2444 output.uncheckedAppend(toASCIIHexValue(input[i + 1], input[i + 2])); 2445 i += 2; 2446 } else 2447 output.uncheckedAppend(byte); 2448 } else 2449 output.uncheckedAppend(byte); 2450 } 2451 return output; 2452 } 2453 2454 Vector<LChar, URLParser::defaultInlineBufferSize> URLParser::percentDecode(const LChar* input, size_t length) 2428 2455 { 2429 2456 Vector<LChar, defaultInlineBufferSize> output; … … 2453 2480 } 2454 2481 2455 static Optional<Vector<LChar, defaultInlineBufferSize>> domainToASCII(const String& domain) 2482 template<typename CharacterType> 2483 Optional<Vector<LChar, URLParser::defaultInlineBufferSize>> URLParser::domainToASCII(const String& domain, const CodePointIterator<CharacterType>& iteratorForSyntaxViolationPosition) 2456 2484 { 2457 2485 Vector<LChar, defaultInlineBufferSize> ascii; … … 2461 2489 const LChar* characters = domain.characters8(); 2462 2490 ascii.reserveInitialCapacity(length); 2463 for (size_t i = 0; i < length; ++i) 2464 ascii.uncheckedAppend(toASCIILower(characters[i])); 2491 if (m_urlIsSpecial) { 2492 for (size_t i = 0; i < length; ++i) { 2493 if (UNLIKELY(isASCIIUpper(characters[i]))) 2494 syntaxViolation(iteratorForSyntaxViolationPosition); 2495 ascii.uncheckedAppend(toASCIILower(characters[i])); 2496 } 2497 } else { 2498 for (size_t i = 0; i < length; ++i) 2499 ascii.uncheckedAppend(characters[i]); 2500 } 2465 2501 } else { 2466 2502 const UChar* characters = domain.characters16(); 2467 2503 ascii.reserveInitialCapacity(length); 2468 for (size_t i = 0; i < length; ++i) 2469 ascii.uncheckedAppend(toASCIILower(characters[i])); 2504 if (m_urlIsSpecial) { 2505 for (size_t i = 0; i < length; ++i) { 2506 if (UNLIKELY(isASCIIUpper(characters[i]))) 2507 syntaxViolation(iteratorForSyntaxViolationPosition); 2508 ascii.uncheckedAppend(toASCIILower(characters[i])); 2509 } 2510 } else { 2511 for (size_t i = 0; i < length; ++i) 2512 ascii.uncheckedAppend(characters[i]); 2513 } 2470 2514 } 2471 2515 return ascii; … … 2492 2536 } 2493 2537 ascii.append(hostnameBuffer, numCharactersConverted); 2538 if (domain != StringView(ascii.data(), ascii.size())) 2539 syntaxViolation(iteratorForSyntaxViolationPosition); 2494 2540 return ascii; 2495 2541 } … … 2499 2545 } 2500 2546 2501 static bool hasInvalidDomainCharacter(const Vector<LChar,defaultInlineBufferSize>& asciiDomain)2547 bool URLParser::hasInvalidDomainCharacter(const Vector<LChar, URLParser::defaultInlineBufferSize>& asciiDomain) 2502 2548 { 2503 2549 for (size_t i = 0; i < asciiDomain.size(); ++i) { … … 2607 2653 for (; hostIterator != iterator; ++hostIterator) { 2608 2654 if (LIKELY(!isTabOrNewline(*hostIterator))) { 2609 if (UNLIKELY(isASCIIUpper(*hostIterator))) 2610 syntaxViolation(hostIterator); 2611 appendToASCIIBuffer(toASCIILower(*hostIterator)); 2655 if (m_urlIsSpecial) { 2656 if (UNLIKELY(isASCIIUpper(*hostIterator))) 2657 syntaxViolation(hostIterator); 2658 appendToASCIIBuffer(toASCIILower(*hostIterator)); 2659 } else 2660 appendToASCIIBuffer(*hostIterator); 2612 2661 } else 2613 2662 syntaxViolation(hostIterator); … … 2620 2669 } 2621 2670 2622 syntaxViolation(iterator);2671 auto hostBegin = iterator; 2623 2672 2624 2673 Vector<LChar, defaultInlineBufferSize> utf8Encoded; 2625 2674 for (; !iterator.atEnd(); ++iterator) { 2626 if (isTabOrNewline(*iterator)) 2675 if (UNLIKELY(isTabOrNewline(*iterator))) { 2676 syntaxViolation(hostBegin); 2627 2677 continue; 2678 } 2628 2679 if (*iterator == ':') 2629 2680 break; 2681 if (UNLIKELY(!isASCII(*iterator))) 2682 syntaxViolation(hostBegin); 2683 2630 2684 uint8_t buffer[U8_MAX_LENGTH]; 2631 2685 int32_t offset = 0; … … 2636 2690 utf8Encoded.append(buffer, offset); 2637 2691 } 2638 Vector<LChar, defaultInlineBufferSize> percentDecoded = percentDecode(utf8Encoded.data(), utf8Encoded.size() );2692 Vector<LChar, defaultInlineBufferSize> percentDecoded = percentDecode(utf8Encoded.data(), utf8Encoded.size(), hostBegin); 2639 2693 String domain = String::fromUTF8(percentDecoded.data(), percentDecoded.size()); 2640 auto asciiDomain = domainToASCII(domain); 2694 if (domain != StringView(percentDecoded.data(), percentDecoded.size())) 2695 syntaxViolation(hostBegin); 2696 auto asciiDomain = domainToASCII(domain, hostBegin); 2641 2697 if (!asciiDomain || hasInvalidDomainCharacter(asciiDomain.value())) 2642 2698 return false; … … 2662 2718 } 2663 2719 2664 static Optional<String>formURLDecode(StringView input)2720 Optional<String> URLParser::formURLDecode(StringView input) 2665 2721 { 2666 2722 auto utf8 = input.utf8(StrictConversion); -
trunk/Source/WebCore/platform/URLParser.h
r207305 r207321 58 58 59 59 bool m_didSeeSyntaxViolation { false }; 60 const static size_t defaultInlineBufferSize = 2048; 60 61 61 62 template<typename CharacterType> void parse(const CharacterType*, const unsigned length, const URL&, const TextEncoding&); … … 87 88 template<bool(*isInCodeSet)(UChar32), typename CharacterType> void utf8PercentEncode(const CodePointIterator<CharacterType>&); 88 89 template<typename CharacterType> void utf8QueryEncode(const CodePointIterator<CharacterType>&); 90 template<typename CharacterType> Optional<Vector<LChar, defaultInlineBufferSize>> domainToASCII(const String&, const CodePointIterator<CharacterType>& iteratorForSyntaxViolationPosition); 91 template<typename CharacterType> Vector<LChar, defaultInlineBufferSize> percentDecode(const LChar*, size_t, const CodePointIterator<CharacterType>& iteratorForSyntaxViolationPosition); 92 static Vector<LChar, defaultInlineBufferSize> percentDecode(const LChar*, size_t); 93 static Optional<String> formURLDecode(StringView input); 94 static bool hasInvalidDomainCharacter(const Vector<LChar, defaultInlineBufferSize>&); 89 95 void percentEncodeByte(uint8_t); 90 96 void appendToASCIIBuffer(UChar32); -
trunk/Tools/ChangeLog
r207315 r207321 1 2016-10-13 Alex Christensen <achristensen@webkit.org> 2 3 Hosts of URLs with non-special schemes should be case-sensitive, and non-ASCII characters in such hosts should be punycode-encoded 4 https://bugs.webkit.org/show_bug.cgi?id=163413 5 6 Reviewed by Tim Horton. 7 8 * TestWebKitAPI/Tests/WebCore/URLParser.cpp: 9 (TestWebKitAPI::TEST_F): 10 Update parsing results. There are now fewer differences between the new URLParser and the old URL::parse. 11 1 12 2016-10-13 Alex Christensen <achristensen@webkit.org> 2 13 -
trunk/Tools/TestWebKitAPI/Tests/WebCore/URLParser.cpp
r207273 r207321 657 657 {"notspecial", "", "", "example.org", 0, "/foo/:foo.com\\", "", "", "notspecial://example.org/foo/:foo.com\\"}, 658 658 {"notspecial", "", "", "example.org", 0, "/foo/:foo.com/", "", "", "notspecial://example.org/foo/:foo.com/"}); 659 checkURLDifferences("sc://pa", 660 {"sc", "", "", "pa", 0, "/", "", "", "sc://pa/"}, 661 {"sc", "", "", "pa", 0, "", "", "", "sc://pa"}); 659 checkURL("sc://pa", {"sc", "", "", "pa", 0, "", "", "", "sc://pa"}); 662 660 checkRelativeURLDifferences("notspecial:\\\\foo.com\\", "http://example.org/foo/bar", 663 661 {"notspecial", "", "", "", 0, "\\\\foo.com\\", "", "", "notspecial:\\\\foo.com\\"}, … … 790 788 {"", "", "", "", 0, "", "", "", "notspecial://@test@test@example:800/path@end"}); 791 789 checkURLDifferences("notspecial://@test@test@example:800\\path@end", 792 {"notspecial", "@test@test@example", "800\\path", "end", 0, " /", "", "", "notspecial://%40test%40test%40example:800%5Cpath@end/"},790 {"notspecial", "@test@test@example", "800\\path", "end", 0, "", "", "", "notspecial://%40test%40test%40example:800%5Cpath@end"}, 793 791 {"", "", "", "", 0, "", "", "", "notspecial://@test@test@example:800\\path@end"}); 794 792 checkURLDifferences("http://%48OsT", … … 894 892 {"http", "", "", "f", 10, "/c", "", "", "http://f:10/c"}, 895 893 {"http", "", "", "f", 10, "/c", "", "", "http://f:010/c"}); 896 checkURLDifferences("notspecial://HoSt", 897 {"notspecial", "", "", "host", 0, "/", "", "", "notspecial://host/"}, 898 {"notspecial", "", "", "HoSt", 0, "", "", "", "notspecial://HoSt"}); 894 checkURL("notspecial://HoSt", {"notspecial", "", "", "HoSt", 0, "", "", "", "notspecial://HoSt"}); 895 checkURLDifferences("notspecial://H%6FSt", 896 {"notspecial", "", "", "HoSt", 0, "", "", "", "notspecial://HoSt"}, 897 {"notspecial", "", "", "H%6FSt", 0, "", "", "", "notspecial://H%6FSt"}); 899 898 checkURLDifferences("notspecial://H%4fSt", 900 {"notspecial", "", "", " host", 0, "/", "", "", "notspecial://host/"},899 {"notspecial", "", "", "HOSt", 0, "", "", "", "notspecial://HOSt"}, 901 900 {"notspecial", "", "", "H%4fSt", 0, "", "", "", "notspecial://H%4fSt"}); 902 checkURLDifferences(utf16String(u"notspecial://H😍ßt"), 903 {"notspecial", "", "", "xn--hsst-qc83c", 0, "/", "", "", "notspecial://xn--hsst-qc83c/"}, 904 {"notspecial", "", "", "xn--hsst-qc83c", 0, "", "", "", "notspecial://xn--hsst-qc83c"}, testTabsValueForSurrogatePairs); 901 checkURL(utf16String(u"notspecial://H😍ßt"), {"notspecial", "", "", "xn--hsst-qc83c", 0, "", "", "", "notspecial://xn--hsst-qc83c"}, testTabsValueForSurrogatePairs); 905 902 checkURLDifferences("http://[ffff:aaaa:cccc:eeee:bbbb:dddd:255.255.255.255]/", 906 903 {"http", "", "", "[ffff:aaaa:cccc:eeee:bbbb:dddd:ffff:ffff]", 0, "/", "", "", "http://[ffff:aaaa:cccc:eeee:bbbb:dddd:ffff:ffff]/"}, … … 1047 1044 {"wss", "", "", "host", 444, "", "", "", "wss://host:444"}); 1048 1045 1049 // 990 is the default ftps port in URL::parse, but it's not in the URL spec. Maybe it should be.1050 1046 checkURL("fTpS://host:990/", {"ftps", "", "", "host", 990, "/", "", "", "ftps://host:990/"}); 1051 1047 checkURL("ftps://host:990/", {"ftps", "", "", "host", 990, "/", "", "", "ftps://host:990/"}); 1052 1048 checkURL("ftps://host:991/", {"ftps", "", "", "host", 991, "/", "", "", "ftps://host:991/"}); 1053 checkURLDifferences("ftps://host:990", 1054 {"ftps", "", "", "host", 990, "/", "", "", "ftps://host:990/"}, 1055 {"ftps", "", "", "host", 990, "", "", "", "ftps://host:990"}); 1056 checkURLDifferences("ftps://host:991", 1057 {"ftps", "", "", "host", 991, "/", "", "", "ftps://host:991/"}, 1058 {"ftps", "", "", "host", 991, "", "", "", "ftps://host:991"}); 1049 checkURL("ftps://host:990", {"ftps", "", "", "host", 990, "", "", "", "ftps://host:990"}); 1050 checkURL("ftps://host:991", {"ftps", "", "", "host", 991, "", "", "", "ftps://host:991"}); 1059 1051 1060 1052 checkURL("uNkNoWn://host:80/", {"unknown", "", "", "host", 80, "/", "", "", "unknown://host:80/"}); 1061 1053 checkURL("unknown://host:80/", {"unknown", "", "", "host", 80, "/", "", "", "unknown://host:80/"}); 1062 1054 checkURL("unknown://host:81/", {"unknown", "", "", "host", 81, "/", "", "", "unknown://host:81/"}); 1063 checkURLDifferences("unknown://host:80", 1064 {"unknown", "", "", "host", 80, "/", "", "", "unknown://host:80/"}, 1065 {"unknown", "", "", "host", 80, "", "", "", "unknown://host:80"}); 1066 checkURLDifferences("unknown://host:81", 1067 {"unknown", "", "", "host", 81, "/", "", "", "unknown://host:81/"}, 1068 {"unknown", "", "", "host", 81, "", "", "", "unknown://host:81"}); 1055 checkURL("unknown://host:80", {"unknown", "", "", "host", 80, "", "", "", "unknown://host:80"}); 1056 checkURL("unknown://host:81", {"unknown", "", "", "host", 81, "", "", "", "unknown://host:81"}); 1069 1057 1070 1058 checkURL("file://host:0", {"file", "", "", "host", 0, "/", "", "", "file://host:0/"}); … … 1142 1130 shouldFail("http://[a:b:c:d:e:f:127.0.0.0x11]"); // Chrome treats this as hex, Firefox and the spec fail 1143 1131 shouldFail("http://[a:b:c:d:e:f:127.0.-0.1]"); 1132 shouldFail("asdf://space InHost"); 1144 1133 } 1145 1134 … … 1149 1138 checkURL("about:\a\aabc", {"about", "", "", "", 0, "%07%07abc", "", "", "about:%07%07abc"}); 1150 1139 checkURL("notspecial:\t\t\n\t", {"notspecial", "", "", "", 0, "", "", "", "notspecial:"}); 1151 checkURLDifferences("notspecial\t\t\n\t:\t\t\n\t/\t\t\n\t/\t\t\n\thost", 1152 {"notspecial", "", "", "host", 0, "/", "", "", "notspecial://host/"}, 1153 {"notspecial", "", "", "host", 0, "", "", "", "notspecial://host"}); 1140 checkURL("notspecial\t\t\n\t:\t\t\n\t/\t\t\n\t/\t\t\n\thost", {"notspecial", "", "", "host", 0, "", "", "", "notspecial://host"}); 1154 1141 checkRelativeURL("http:", "http://example.org/foo/bar?query#fragment", {"http", "", "", "example.org", 0, "/foo/bar", "query", "", "http://example.org/foo/bar?query"}); 1155 1142 checkRelativeURLDifferences("ws:", "http://example.org/foo/bar",
Note: See TracChangeset
for help on using the changeset viewer.