Commit 46cf8492 authored by ossy@webkit.org's avatar ossy@webkit.org

[Qt] Some Unicode tests fail with Qt version >= 4.7.0

https://bugs.webkit.org/show_bug.cgi?id=46251

Patch by Joe Wild <joseph.wild@nokia.com> on 2011-03-24
Reviewed by Csaba Osztrogonác.

Updated tests the print out character 0xFFFF for Qt Platform.
QString.toUtf8() converts non-defined Unicode char values, like
0xFFFF to a replacement character ('?') as documented.  Other
platforms leave the character as 0xFFFF (but utf8 encoded).
Converting to a real printable char seems reasonable and may
be more reliable.

* platform/qt/Skipped:
* platform/qt/fast/js/regexp-range-bound-ffff-expected.txt: Added.
* platform/qt/fast/js/switch-behaviour-expected.txt: Added.
* platform/qt/fast/url: Added.
* platform/qt/fast/url/anchor-expected.txt: Added.
* platform/qt/fast/url/path-expected.txt: Added.
* platform/qt/http/tests/websocket: Added.
* platform/qt/http/tests/websocket/tests: Added.
* platform/qt/http/tests/websocket/tests/bad-sub-protocol-non-ascii-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@81866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 16addaf5
2011-03-24 Joe Wild <joseph.wild@nokia.com>
Reviewed by Csaba Osztrogonác.
[Qt] Some Unicode tests fail with Qt version >= 4.7.0
https://bugs.webkit.org/show_bug.cgi?id=46251
Updated tests the print out character 0xFFFF for Qt Platform.
QString.toUtf8() converts non-defined Unicode char values, like
0xFFFF to a replacement character ('?') as documented. Other
platforms leave the character as 0xFFFF (but utf8 encoded).
Converting to a real printable char seems reasonable and may
be more reliable.
* platform/qt/Skipped:
* platform/qt/fast/js/regexp-range-bound-ffff-expected.txt: Added.
* platform/qt/fast/js/switch-behaviour-expected.txt: Added.
* platform/qt/fast/url: Added.
* platform/qt/fast/url/anchor-expected.txt: Added.
* platform/qt/fast/url/path-expected.txt: Added.
* platform/qt/http/tests/websocket: Added.
* platform/qt/http/tests/websocket/tests: Added.
* platform/qt/http/tests/websocket/tests/bad-sub-protocol-non-ascii-expected.txt: Added.
2011-03-24 Pavel Feldman <pfeldman@chromium.org> 2011-03-24 Pavel Feldman <pfeldman@chromium.org>
Not reviewed: removing newly added inspector test that fails on release bots. Not reviewed: removing newly added inspector test that fails on release bots.
......
...@@ -2943,15 +2943,6 @@ svg/W3C-SVG-1.1/filters-light-04-f.svg ...@@ -2943,15 +2943,6 @@ svg/W3C-SVG-1.1/filters-light-04-f.svg
# Qt 4.7 related bugs # Qt 4.7 related bugs
# ============================================================================= # # ============================================================================= #
# [Qt] Some Unicode tests fail with Qt version >= 4.7.0
# https://bugs.webkit.org/show_bug.cgi?id=46251
fast/js/encode-URI-test.html
fast/js/regexp-range-bound-ffff.html
fast/js/switch-behaviour.html
fast/url/anchor.html
fast/url/path.html
http/tests/websocket/tests/bad-sub-protocol-non-ascii.html
# [Qt] editing/execCommand/move-selection-back-line.html fails with Qt 4.7.1 # [Qt] editing/execCommand/move-selection-back-line.html fails with Qt 4.7.1
# https://bugs.webkit.org/show_bug.cgi?id=50144 # https://bugs.webkit.org/show_bug.cgi?id=50144
editing/execCommand/move-selection-back-line.html editing/execCommand/move-selection-back-line.html
......
Test for rdar:/68455379, a case-insensitive regex containing a character class containing a range with an upper bound of ? can lead to an infinite-loop.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS ("A".match(/[-?]/i) == "A") is true
PASS successfullyParsed is true
TEST COMPLETE
This test covers the correctness and behaviour of switch statements.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS characterSwitch('\0') is "\0"
PASS characterSwitch('A') is "A"
PASS characterSwitch('a') is "a"
PASS characterSwitch('1') is "1"
PASS characterSwitch('-1') is "default"
PASS characterSwitch('B') is "B"
PASS characterSwitch('?') is "default"
PASS characterSwitch({toString: function(){return 'B'}}) is "default"
PASS characterSwitch(0) is "default"
PASS characterSwitch(-0) is "default"
PASS characterSwitch(1) is "default"
PASS characterSwitch(1.1) is "default"
PASS characterSwitch(-1) is "default"
PASS characterSwitch(-1000000000) is "default"
PASS characterSwitch(1000000000) is "default"
PASS characterSwitch({}) is "default"
PASS sparseCharacterSwitch('\0') is "\0"
PASS sparseCharacterSwitch('A') is "A"
PASS sparseCharacterSwitch('a') is "a"
PASS sparseCharacterSwitch('1') is "1"
PASS sparseCharacterSwitch('-1') is "default"
PASS sparseCharacterSwitch('B') is "B"
PASS sparseCharacterSwitch('?') is "?"
PASS sparseCharacterSwitch({toString: function(){return 'B'}}) is "default"
PASS sparseCharacterSwitch(0) is "default"
PASS sparseCharacterSwitch(-0) is "default"
PASS sparseCharacterSwitch(1) is "default"
PASS sparseCharacterSwitch(1.1) is "default"
PASS sparseCharacterSwitch(-1) is "default"
PASS sparseCharacterSwitch(-1000000000) is "default"
PASS sparseCharacterSwitch(1000000000) is "default"
PASS sparseCharacterSwitch({}) is "default"
PASS stringSwitch('\0') is "\0"
PASS stringSwitch('A') is "A"
PASS stringSwitch('a') is "a"
PASS stringSwitch('1') is "1"
PASS stringSwitch('-1') is "-1"
PASS stringSwitch('B') is "B"
PASS stringSwitch('?') is "?"
PASS stringSwitch('some string') is "some string"
PASS stringSwitch({toString: function(){return 'some string'}}) is "default"
PASS stringSwitch('s') is "default"
PASS stringSwitch(0) is "default"
PASS stringSwitch(-0) is "default"
PASS stringSwitch(1) is "default"
PASS stringSwitch(1.1) is "default"
PASS stringSwitch(-1) is "default"
PASS stringSwitch(-1000000000) is "default"
PASS stringSwitch(1000000000) is "default"
PASS stringSwitch({}) is "default"
PASS numberSwitch('\0') is "default"
PASS numberSwitch('A') is "default"
PASS numberSwitch('a') is "default"
PASS numberSwitch('1') is "default"
PASS numberSwitch('-1') is "default"
PASS numberSwitch('B') is "default"
PASS numberSwitch('?') is "default"
PASS numberSwitch('some string') is "default"
PASS numberSwitch({valueOf: function(){return 0}}) is "default"
PASS numberSwitch('s') is "default"
PASS numberSwitch(0) is 0
PASS numberSwitch(-0) is 0
PASS numberSwitch(1) is 1
PASS numberSwitch(1.1) is "default"
PASS numberSwitch(-1) is -1
PASS numberSwitch(-1000000000) is "default"
PASS numberSwitch(1000000000) is "default"
PASS numberSwitch({}) is "default"
PASS sparseNumberSwitch('\0') is "default"
PASS sparseNumberSwitch('A') is "default"
PASS sparseNumberSwitch('a') is "default"
PASS sparseNumberSwitch('1') is "default"
PASS sparseNumberSwitch('-1') is "default"
PASS sparseNumberSwitch('B') is "default"
PASS sparseNumberSwitch('?') is "default"
PASS sparseNumberSwitch('some string') is "default"
PASS sparseNumberSwitch({valueOf: function(){return 0}}) is "default"
PASS sparseNumberSwitch('s') is "default"
PASS sparseNumberSwitch(0) is 0
PASS sparseNumberSwitch(-0) is 0
PASS sparseNumberSwitch(1) is 1
PASS sparseNumberSwitch(1.1) is "default"
PASS sparseNumberSwitch(-1) is -1
PASS sparseNumberSwitch(-1000000000) is -1000000000
PASS sparseNumberSwitch(1000000000) is 1000000000
PASS sparseNumberSwitch({}) is "default"
PASS generalSwitch('\0') is "\0"
PASS generalSwitch('A') is "A"
PASS generalSwitch('a') is "a"
PASS generalSwitch('1') is "1"
PASS generalSwitch('-1') is "-1"
PASS generalSwitch('B') is "B"
PASS generalSwitch('?') is "?"
PASS generalSwitch('some string') is "some string"
PASS generalSwitch({valueOf: function(){return 0}}) is "default"
PASS generalSwitch('s') is "default"
PASS generalSwitch(0) is 0
PASS generalSwitch(-0) is 0
PASS generalSwitch(1) is 1
PASS generalSwitch(1.1) is "default"
PASS generalSwitch(-1) is -1
PASS generalSwitch(-1000000000) is -1000000000
PASS generalSwitch(1000000000) is 1000000000
PASS generalSwitch({}) is "default"
PASS successfullyParsed is true
TEST COMPLETE
Test URLs that have an anchor.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS canonicalize('http://www.example.com/#hello, world') is 'http://www.example.com/#hello, world'
FAIL canonicalize('http://www.example.com/#©') should be http://www.example.com/#©. Was http://www.example.com/#%C2%A9.
FAIL canonicalize('http://www.example.com/#𐌀ss') should be http://www.example.com/#𐌀ss. Was http://www.example.com/#%26%2366304%3Bss.
PASS canonicalize('http://www.example.com/#%41%a') is 'http://www.example.com/#%41%a'
FAIL canonicalize('http://www.example.com/#\ud800\u597d') should be http://www.example.com/#�好. Was http://www.example.com/#%26%2355296%3B%26%2322909%3B.
FAIL canonicalize('http://www.example.com/#a\uFDD0') should be http://www.example.com/#a?. Was http://www.example.com/#a%26%2364976%3B.
PASS canonicalize('http://www.example.com/#asdf#qwer') is 'http://www.example.com/#asdf#qwer'
PASS canonicalize('http://www.example.com/##asdf') is 'http://www.example.com/##asdf'
PASS canonicalize('http://www.example.com/#a\nb\rc\td') is 'http://www.example.com/#abcd'
PASS successfullyParsed is true
TEST COMPLETE
Canonicalization of paths.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS canonicalize('http://example.com/././foo') is 'http://example.com/foo'
PASS canonicalize('http://example.com/./.foo') is 'http://example.com/.foo'
PASS canonicalize('http://example.com/foo/.') is 'http://example.com/foo/'
PASS canonicalize('http://example.com/foo/./') is 'http://example.com/foo/'
PASS canonicalize('http://example.com/foo/bar/..') is 'http://example.com/foo/'
PASS canonicalize('http://example.com/foo/bar/../') is 'http://example.com/foo/'
PASS canonicalize('http://example.com/foo/..bar') is 'http://example.com/foo/..bar'
PASS canonicalize('http://example.com/foo/bar/../ton') is 'http://example.com/foo/ton'
PASS canonicalize('http://example.com/foo/bar/../ton/../../a') is 'http://example.com/a'
PASS canonicalize('http://example.com/foo/../../..') is 'http://example.com/'
PASS canonicalize('http://example.com/foo/../../../ton') is 'http://example.com/ton'
FAIL canonicalize('http://example.com/foo/%2e') should be http://example.com/foo/. Was http://example.com/foo/%2e.
FAIL canonicalize('http://example.com/foo/%2e%2') should be http://example.com/foo/.%2. Was http://example.com/foo/%2e%2.
FAIL canonicalize('http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar') should be http://example.com/..bar. Was http://example.com/foo/%2e./%2e%2e/.%2e/%2e.bar.
PASS canonicalize('http://example.com////../..') is 'http://example.com//'
PASS canonicalize('http://example.com/foo/bar//../..') is 'http://example.com/foo/'
PASS canonicalize('http://example.com/foo/bar//..') is 'http://example.com/foo/bar/'
PASS canonicalize('http://example.com/foo/bar/..') is 'http://example.com/foo/'
PASS canonicalize('http://example.com/foo') is 'http://example.com/foo'
PASS canonicalize('http://example.com/%20foo') is 'http://example.com/%20foo'
PASS canonicalize('http://example.com/foo%') is 'http://example.com/foo%'
PASS canonicalize('http://example.com/foo%2') is 'http://example.com/foo%2'
PASS canonicalize('http://example.com/foo%2zbar') is 'http://example.com/foo%2zbar'
PASS canonicalize('http://example.com/foo%2©zbar') is 'http://example.com/foo%2%C3%82%C2%A9zbar'
FAIL canonicalize('http://example.com/foo%41%7a') should be http://example.com/fooAz. Was http://example.com/foo%41%7a.
FAIL canonicalize('http://example.com/foo ‘%91') should be http://example.com/foo%09%C2%91%91. Was http://example.com/foo%C2%91%91.
FAIL canonicalize('http://example.com/foo%00%51') should be http://example.com/foo%00Q. Was http://example.com/foo%00%51.
PASS canonicalize('http://example.com/(%28:%3A%29)') is 'http://example.com/(%28:%3A%29)'
PASS canonicalize('http://example.com/%3A%3a%3C%3c') is 'http://example.com/%3A%3a%3C%3c'
FAIL canonicalize('http://example.com/foo bar') should be http://example.com/foo%09bar. Was http://example.com/foobar.
PASS canonicalize('http://example.com\\foo\\bar') is 'http://example.com/foo/bar'
PASS canonicalize('http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd') is 'http://example.com/%7Ffp3%3Eju%3Dduvgw%3Dd'
PASS canonicalize('http://example.com/@asdf%40') is 'http://example.com/@asdf%40'
PASS canonicalize('http://example.com/你好你好') is 'http://example.com/%E4%BD%A0%E5%A5%BD%E4%BD%A0%E5%A5%BD'
FAIL canonicalize('http://example.com/?zyx') should be http://example.com/%EF%BF%BDzyx. Was http://example.com/%EF%B7%90zyx.
PASS successfullyParsed is true
TEST COMPLETE
CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket '\u007F'
CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket '\u0080'
CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket '\u3042'
CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket '\uFFFF'
CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket '\uFEFF'
CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket '\uFFFE'
CONSOLE MESSAGE: line 0: Wrong protocol for WebSocket '\uD840\uDC0B'
Test WebSocket bad sub-protocol names by non-ASCII chars.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS new WebSocket("ws://127.0.0.1:8880/simple", "") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1:8880/simple", "€") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1:8880/simple", "あ") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1:8880/simple", "?") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1:8880/simple", "") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1:8880/simple", "?") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS new WebSocket("ws://127.0.0.1:8880/simple", "𠀋") threw exception Error: SYNTAX_ERR: DOM Exception 12.
PASS successfullyParsed is true
TEST COMPLETE
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment