Bug 1931425 - Limit how often moz-label's #setStyles runs r=reusable-components-revie...
[gecko.git] / netwerk / test / unit / test_ioservice.js
blobd218d77a7a949b925c22669c243a3da1ee131ef8
1 "use strict";
3 add_task(function test_extractScheme() {
4 equal(Services.io.extractScheme("HtTp://example.com"), "http");
5 Assert.throws(
6 () => {
7 Services.io.extractScheme("://example.com");
8 },
9 /NS_ERROR_MALFORMED_URI/,
10 "missing scheme"
12 Assert.throws(
13 () => {
14 Services.io.extractScheme("ht%tp://example.com");
16 /NS_ERROR_MALFORMED_URI/,
17 "bad scheme"
19 });