<!DOCTYPE html>
<script src="../../../resources/js-test.js"></script>
<script>

function breakDownURL(string)
{
    var a = new URL(string);

    var result = "";

    var propertyNames = [
        "protocol",
        "username",
        "password",
        "hostname",
        "host",
        "port",
        "pathname",
        "search",
        "hash",
        "origin"
    ];
    for (var i = 0; i < propertyNames.length; ++i) {
        var name = propertyNames[i];
        var value = a[name];
        if (value == "")
            continue;
        if (name == "hostname" && value == a.host)
            continue;
        if (typeof value != "string")
            value = "non-string";
        if (result != "")
            result += ", ";
        result += name + "=" + value;
    }

    if (string != a.toString())
        result += ", toString=" + a.toString();

    return result;
}

shouldBe("breakDownURL('about:blank')", "'protocol=about:, pathname=blank, origin=null'");
shouldBe("breakDownURL('http://example.com/')", "'protocol=http:, host=example.com, pathname=/, origin=http://example.com'");
shouldBe("breakDownURL('http://@example.com/')", "'protocol=http:, host=example.com, pathname=/, origin=http://example.com, toString=http://example.com/'");
shouldBe("breakDownURL('http://a@example.com/')", "'protocol=http:, username=a, host=example.com, pathname=/, origin=http://example.com'");
shouldBe("breakDownURL('http://a:@example.com/')", "'protocol=http:, username=a, host=example.com, pathname=/, origin=http://example.com, toString=http://a@example.com/'");
shouldBe("breakDownURL('http://joebob1:abc123@example.com/')", "'protocol=http:, username=joebob1, password=abc123, host=example.com, pathname=/, origin=http://example.com'");
shouldBe("breakDownURL('http://:def456@example.com/')", "'protocol=http:, password=def456, host=example.com, pathname=/, origin=http://example.com'");
shouldBe("breakDownURL('http://example.com/foo/bar')", "'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com'");
shouldBe("breakDownURL('HTTP://example.com/foo/bar')", "'protocol=http:, host=example.com, pathname=/foo/bar, origin=http://example.com, toString=http://example.com/foo/bar'");
shouldBe("breakDownURL('https://example.com/ttt?ggg')", "'protocol=https:, host=example.com, pathname=/ttt, search=?ggg, origin=https://example.com'");
shouldBe("breakDownURL('ftp://example.com/ttt?ggg')", "'protocol=ftp:, host=example.com, pathname=/ttt, search=?ggg, origin=ftp://example.com'");
shouldBe("breakDownURL('file:///Users/darin')", "'protocol=file:, pathname=/Users/darin, origin=file://'");
shouldBe("breakDownURL('data:text/html,<b>foo</b>')", "'protocol=data:, pathname=text/html,<b>foo</b>, origin=null'");
shouldBe("breakDownURL('http://a:b@c:1/e/f?g%h')", "'protocol=http:, username=a, password=b, hostname=c, host=c:1, port=1, pathname=/e/f, search=?g%h, origin=http://c:1'");
shouldBe("breakDownURL('http://ex%61mple.com/')", "'protocol=http:, host=example.com, pathname=/, origin=http://example.com, toString=http://example.com/'");
shouldThrow("breakDownURL('http://ex%2fmple.com/')");

var longUnicodeDomain = "\u1234";
var i = 0;
try {
    for (i = 0; i < 100; ++i) {
        longUnicodeDomain += "a"
        new URL("http://" + longUnicodeDomain + "/");
    }
} catch (e) { }
shouldBe("i", "100");

</script>
