Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / url / script-tests / trivial-segments.js
blob3cae2b10f1f1427494cf21850f89c5b7b4c688c7
1 description("Test basic features of URL segmentation");
3 cases = [ 
4   // [URL, [SCHEME, HOST, PORT, PATH, QUERY, REF]]
5   ["http://example.com/", ["http:", "example.com", "", "/", "", ""]],
6 ];
8 var originalBaseURL = canonicalize(".");
9 setBaseURL("http://example.org/foo/bar");
11 for (var i = 0; i < cases.length; ++i) {
12   shouldBe("segments('" + cases[i][0] + "')",
13            "'" + JSON.stringify(cases[i][1]) + "'");
16 setBaseURL(originalBaseURL);