Changeset 64796 in webkit


Ignore:
Timestamp:
Aug 5, 2010 4:52:00 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-08-05 Adam Barth <abarth@webkit.org>

Reviewed by Darin Adler.

js-test-pre.js's escapeHTML should escape null characters so we can see them
https://bugs.webkit.org/show_bug.cgi?id=43579

  • fast/canvas/canvas-getContext-invalid-expected.txt:
  • fast/js/null-char-in-string-expected.txt:
  • fast/js/resources/js-test-pre.js: (escapeHTML):
  • fast/js/switch-behaviour-expected.txt:
  • storage/domstorage/complex-values-expected.txt:
  • websocket/tests/bad-sub-protocol-control-chars-expected.txt:
Location:
trunk/LayoutTests
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r64784 r64796  
     12010-08-05  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        js-test-pre.js's escapeHTML should escape null characters so we can see them
     6        https://bugs.webkit.org/show_bug.cgi?id=43579
     7
     8        * fast/canvas/canvas-getContext-invalid-expected.txt:
     9        * fast/js/null-char-in-string-expected.txt:
     10        * fast/js/resources/js-test-pre.js:
     11        (escapeHTML):
     12        * fast/js/switch-behaviour-expected.txt:
     13        * storage/domstorage/complex-values-expected.txt:
     14        * websocket/tests/bad-sub-protocol-control-chars-expected.txt:
     15
    1162010-08-05  Ilya Tikhonovsky  <loislo@chromium.org>
    217
  • trunk/LayoutTests/fast/canvas/canvas-getContext-invalid-expected.txt

    r61637 r64796  
    77PASS canvas.getContext('2d#') is null
    88PASS canvas.getContext('This is clearly not a valid context name.') is null
    9 PASS canvas.getContext('2d') is null
     9PASS canvas.getContext('2d\0') is null
    1010PASS canvas.getContext('2d') is null
    1111PASS canvas.getContext('2D') is null
  • trunk/LayoutTests/fast/js/null-char-in-string-expected.txt

    r61637 r64796  
    44
    55
    6 PASS String("").length is 1
     6PASS String("\0").length is 1
    77PASS successfullyParsed is true
    88
  • trunk/LayoutTests/fast/js/resources/js-test-pre.js

    r63730 r64796  
    2424function escapeHTML(text)
    2525{
    26     return text.replace(/&/g, "&amp;").replace(/</g, "&lt;");
     26    return text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/\0/g, "\\0");
    2727}
    2828
  • trunk/LayoutTests/fast/js/switch-behaviour-expected.txt

    r61637 r64796  
    44
    55
    6 PASS characterSwitch('�') is "�"
     6PASS characterSwitch('\0') is "\0"
    77PASS characterSwitch('A') is "A"
    88PASS characterSwitch('a') is "a"
     
    2020PASS characterSwitch(1000000000) is "default"
    2121PASS characterSwitch({}) is "default"
    22 PASS sparseCharacterSwitch('�') is "�"
     22PASS sparseCharacterSwitch('\0') is "\0"
    2323PASS sparseCharacterSwitch('A') is "A"
    2424PASS sparseCharacterSwitch('a') is "a"
     
    3636PASS sparseCharacterSwitch(1000000000) is "default"
    3737PASS sparseCharacterSwitch({}) is "default"
    38 PASS stringSwitch('�') is "�"
     38PASS stringSwitch('\0') is "\0"
    3939PASS stringSwitch('A') is "A"
    4040PASS stringSwitch('a') is "a"
     
    5454PASS stringSwitch(1000000000) is "default"
    5555PASS stringSwitch({}) is "default"
    56 PASS numberSwitch('') is "default"
     56PASS numberSwitch('\0') is "default"
    5757PASS numberSwitch('A') is "default"
    5858PASS numberSwitch('a') is "default"
     
    7272PASS numberSwitch(1000000000) is "default"
    7373PASS numberSwitch({}) is "default"
    74 PASS sparseNumberSwitch('') is "default"
     74PASS sparseNumberSwitch('\0') is "default"
    7575PASS sparseNumberSwitch('A') is "default"
    7676PASS sparseNumberSwitch('a') is "default"
     
    9090PASS sparseNumberSwitch(1000000000) is 1000000000
    9191PASS sparseNumberSwitch({}) is "default"
    92 PASS generalSwitch('�') is "�"
     92PASS generalSwitch('\0') is "\0"
    9393PASS generalSwitch('A') is "A"
    9494PASS generalSwitch('a') is "a"
  • trunk/LayoutTests/storage/domstorage/complex-values-expected.txt

    r61637 r64796  
    8383storage.foo10 = k
    8484PASS typeof storage['foo10'] is "string"
    85 PASS storage['foo10'] is "ÿ찡hello"
     85PASS storage['foo10'] is "ÿ찡\0hello"
    8686PASS typeof storage.foo10 is "string"
    87 PASS storage.foo10 is "ÿ찡hello"
     87PASS storage.foo10 is "ÿ찡\0hello"
    8888PASS typeof storage.getItem('foo10') is "string"
    89 PASS storage.getItem('foo10') is "ÿ찡hello"
     89PASS storage.getItem('foo10') is "ÿ찡\0hello"
    9090storage['foo11'] = k
    9191PASS typeof storage['foo11'] is "string"
    92 PASS storage['foo11'] is "ÿ찡hello"
     92PASS storage['foo11'] is "ÿ찡\0hello"
    9393PASS typeof storage.foo11 is "string"
    94 PASS storage.foo11 is "ÿ찡hello"
     94PASS storage.foo11 is "ÿ찡\0hello"
    9595PASS typeof storage.getItem('foo11') is "string"
    96 PASS storage.getItem('foo11') is "ÿ찡hello"
     96PASS storage.getItem('foo11') is "ÿ찡\0hello"
    9797storage.setItem('foo12', k)
    9898PASS typeof storage['foo12'] is "string"
    99 PASS storage['foo12'] is "ÿ찡hello"
     99PASS storage['foo12'] is "ÿ찡\0hello"
    100100PASS typeof storage.foo12 is "string"
    101 PASS storage.foo12 is "ÿ찡hello"
     101PASS storage.foo12 is "ÿ찡\0hello"
    102102PASS typeof storage.getItem('foo12') is "string"
    103 PASS storage.getItem('foo12') is "ÿ찡hello"
     103PASS storage.getItem('foo12') is "ÿ찡\0hello"
    104104
    105105
     
    183183storage.foo10 = k
    184184PASS typeof storage['foo10'] is "string"
    185 PASS storage['foo10'] is "ÿ찡hello"
     185PASS storage['foo10'] is "ÿ찡\0hello"
    186186PASS typeof storage.foo10 is "string"
    187 PASS storage.foo10 is "ÿ찡hello"
     187PASS storage.foo10 is "ÿ찡\0hello"
    188188PASS typeof storage.getItem('foo10') is "string"
    189 PASS storage.getItem('foo10') is "ÿ찡hello"
     189PASS storage.getItem('foo10') is "ÿ찡\0hello"
    190190storage['foo11'] = k
    191191PASS typeof storage['foo11'] is "string"
    192 PASS storage['foo11'] is "ÿ찡hello"
     192PASS storage['foo11'] is "ÿ찡\0hello"
    193193PASS typeof storage.foo11 is "string"
    194 PASS storage.foo11 is "ÿ찡hello"
     194PASS storage.foo11 is "ÿ찡\0hello"
    195195PASS typeof storage.getItem('foo11') is "string"
    196 PASS storage.getItem('foo11') is "ÿ찡hello"
     196PASS storage.getItem('foo11') is "ÿ찡\0hello"
    197197storage.setItem('foo12', k)
    198198PASS typeof storage['foo12'] is "string"
    199 PASS storage['foo12'] is "ÿ찡hello"
     199PASS storage['foo12'] is "ÿ찡\0hello"
    200200PASS typeof storage.foo12 is "string"
    201 PASS storage.foo12 is "ÿ찡hello"
     201PASS storage.foo12 is "ÿ찡\0hello"
    202202PASS typeof storage.getItem('foo12') is "string"
    203 PASS storage.getItem('foo12') is "ÿ찡hello"
     203PASS storage.getItem('foo12') is "ÿ찡\0hello"
    204204PASS successfullyParsed is true
    205205
  • trunk/LayoutTests/websocket/tests/bad-sub-protocol-control-chars-expected.txt

    r61637 r64796  
    66On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
    77
    8 PASS new WebSocket("ws://127.0.0.1:8880/simple", "") threw exception Error: SYNTAX_ERR: DOM Exception 12.
     8PASS new WebSocket("ws://127.0.0.1:8880/simple", "\0") threw exception Error: SYNTAX_ERR: DOM Exception 12.
    99PASS new WebSocket("ws://127.0.0.1:8880/simple", "      ") threw exception Error: SYNTAX_ERR: DOM Exception 12.
    1010PASS new WebSocket("ws://127.0.0.1:8880/simple", "
Note: See TracChangeset for help on using the changeset viewer.