Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android'
- Manifest: toolkit/components/url-classifier/tests/unit/xpcshell.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
function canonicalize(url) {
let urlUtils = Cc["@mozilla.org/url-classifier/utils;1"].getService(
Ci.nsIUrlClassifierUtils
);
let uri = Services.io.newURI(url);
return uri.scheme + "://" + urlUtils.getKeyForURI(uri);
}
function run_test() {
// These testcases are from
equal(
);
equal(
canonicalize(
),
);
equal(
canonicalize(
),
);
equal(
);
equal(
);
equal(
);
equal(
);
equal(
);
equal(
);
equal(
);
equal(
);
equal(
);
equal(
);
equal(
canonicalize(
),
);
}