Changeset 57634 in webkit


Ignore:
Timestamp:
Apr 15, 2010 12:55:07 AM (14 years ago)
Author:
abarth@webkit.org
Message:

2010-04-15 Adam Barth <abarth@webkit.org>

Reviewed by Darin Fisher.

Add comments back to IPv4 URL parsing test
https://bugs.webkit.org/show_bug.cgi?id=37620

I removed these comments when importing this test. The comments are
likley to be helpful to us in the future, so I've restored them.

  • fast/url/script-tests/ipv4.js:
Location:
trunk/LayoutTests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r57633 r57634  
     12010-04-15  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Darin Fisher.
     4
     5        Add comments back to IPv4 URL parsing test
     6        https://bugs.webkit.org/show_bug.cgi?id=37620
     7
     8        I removed these comments when importing this test.  The comments are
     9        likley to be helpful to us in the future, so I've restored them.
     10
     11        * fast/url/script-tests/ipv4.js:
     12
    1132010-04-14  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/LayoutTests/fast/url/script-tests/ipv4.js

    r57503 r57634  
    33cases = [
    44  [".", ""],
     5
     6  // Regular IP addresses in different bases.
    57  ["192.168.0.1", "192.168.0.1"],
    68  ["0300.0250.00.01", "192.168.0.1"],
    79  ["0xC0.0Xa8.0x0.0x1", "192.168.0.1"],
     10
     11  // Non-IP addresses due to invalid characters.
    812  ["192.168.9.com", ""],
     13
     14  // Invalid characters for the base should be rejected.
    915  ["19a.168.0.1", ""],
    1016  ["0308.0250.00.01", ""],
    1117  ["0xCG.0xA8.0x0.0x1", ""],
     18
     19  // If there are not enough components, the last one should fill them out.
    1220  ["192", "0.0.0.192"],
    1321  ["0xC0a80001", "192.168.0.1"],
     
    1826  ["0xc0.052000001", "192.168.0.1"],
    1927  ["192.168.1", "192.168.0.1"],
     28
     29  // Too many components means not an IP address.
    2030  ["192.168.0.0.1", ""],
     31
     32  // We allow a single trailing dot.
    2133  ["192.168.0.1.", "192.168.0.1"],
    2234  ["192.168.0.1. hello", ""],
    2335  ["192.168.0.1..", ""],
     36
     37  // Two dots in a row means not an IP address.
    2438  ["192.168..1", ""],
     39
     40  // Any numerical overflow should be marked as BROKEN.
    2541  ["0x100.0", ""],
    2642  ["0x100.0.0", ""],
     
    3248  ["0.0x1000000", ""],
    3349  ["0x100000000", ""],
     50
     51  // Repeat the previous tests, minus 1, to verify boundaries.
    3452  ["0xFF.0", "255.0.0.0"],
    3553  ["0xFF.0.0", "255.0.0.0"],
     
    4159  ["0.0xFFFFFF", "0.255.255.255"],
    4260  ["0xFFFFFFFF", "255.255.255.255"],
     61
     62  // Old trunctations tests.  They're all "BROKEN" now.
    4363  ["276.256.0xf1a2.077777", ""],
    4464  ["192.168.0.257", ""],
     
    4767  ["0X12C0a80001", ""],
    4868  ["276.1.2", ""],
     69
     70  // Spaces should be rejected.
    4971  ["192.168.0.1 hello", ""],
     72
     73  // Very large numbers.
    5074  ["0000000000000300.0x00000000000000fF.00000000000000001", "192.255.0.1"],
    5175  ["0000000000000300.0xffffffffFFFFFFFF.3022415481470977", ""],
     76
     77  // A number has no length limit, but long numbers can still overflow.
    5278  ["00000000000000000001", "0.0.0.1"],
    5379  ["0000000000000000100000000000000001", ""],
     80
     81  // If a long component is non-numeric, it's a hostname, *not* a broken IP.
    5482  ["0.0.0.000000000000000000z", ""],
    5583  ["0.0.0.100000000000000000z", ""],
     84
     85  // Truncation of all zeros should still result in 0.
    5686  ["0.00.0x.0x0", "0.0.0.0"]
    5787];
Note: See TracChangeset for help on using the changeset viewer.