• Home
  • Raw
  • Download

Lines Matching refs:url

9 const url = new URL('http://user:pass@foo.bar.com:21/aaa/zzz?l=24#test');  constant
10 const oldParams = url.searchParams; // For test of [SameObject]
15 for (const prop in url) {
30 assert.strictEqual(url.toString(), url.href);
31 url.href = 'http://user:pass@foo.bar.com:21/aaa/zzz?l=25#test';
32 assert.strictEqual(url.href,
34 assert.strictEqual(url.toString(), url.href);
37 assert.strictEqual((delete url.href), true);
38 assert.strictEqual(url.href,
40 assert.strictEqual(url.searchParams, oldParams); // [SameObject]
46 () => url.origin = 'http://foo.bar.com:22',
49 assert.strictEqual(url.origin, 'http://foo.bar.com:21');
50 assert.strictEqual(url.toString(),
52 assert.strictEqual((delete url.origin), true);
53 assert.strictEqual(url.origin, 'http://foo.bar.com:21');
56 url.protocol = 'https:';
57 assert.strictEqual(url.protocol, 'https:');
58 assert.strictEqual(url.toString(),
60 assert.strictEqual((delete url.protocol), true);
61 assert.strictEqual(url.protocol, 'https:');
63 url.username = 'user2';
64 assert.strictEqual(url.username, 'user2');
65 assert.strictEqual(url.toString(),
67 assert.strictEqual((delete url.username), true);
68 assert.strictEqual(url.username, 'user2');
70 url.password = 'pass2';
71 assert.strictEqual(url.password, 'pass2');
72 assert.strictEqual(url.toString(),
74 assert.strictEqual((delete url.password), true);
75 assert.strictEqual(url.password, 'pass2');
77 url.host = 'foo.bar.net:22';
78 assert.strictEqual(url.host, 'foo.bar.net:22');
79 assert.strictEqual(url.toString(),
81 assert.strictEqual((delete url.host), true);
82 assert.strictEqual(url.host, 'foo.bar.net:22');
84 url.hostname = 'foo.bar.org';
85 assert.strictEqual(url.hostname, 'foo.bar.org');
86 assert.strictEqual(url.toString(),
88 assert.strictEqual((delete url.hostname), true);
89 assert.strictEqual(url.hostname, 'foo.bar.org');
91 url.port = '23';
92 assert.strictEqual(url.port, '23');
93 assert.strictEqual(url.toString(),
95 assert.strictEqual((delete url.port), true);
96 assert.strictEqual(url.port, '23');
98 url.pathname = '/aaa/bbb';
99 assert.strictEqual(url.pathname, '/aaa/bbb');
100 assert.strictEqual(url.toString(),
102 assert.strictEqual((delete url.pathname), true);
103 assert.strictEqual(url.pathname, '/aaa/bbb');
105 url.search = '?k=99';
106 assert.strictEqual(url.search, '?k=99');
107 assert.strictEqual(url.toString(),
109 assert.strictEqual((delete url.search), true);
110 assert.strictEqual(url.search, '?k=99');
112 url.hash = '#abcd';
113 assert.strictEqual(url.hash, '#abcd');
114 assert.strictEqual(url.toString(),
116 assert.strictEqual((delete url.hash), true);
117 assert.strictEqual(url.hash, '#abcd');
123 () => url.searchParams = '?k=88',
126 assert.strictEqual(url.searchParams, oldParams);
127 assert.strictEqual(url.toString(),
129 assert.strictEqual((delete url.searchParams), true);
130 assert.strictEqual(url.searchParams, oldParams);
135 url: 'blob:https://whatwg.org/d0360e2f-caee-469f-9a2f-87d5b0456f6f' },
136 { expected: 'ftp://example.org', url: 'ftp://example.org/foo' },
137 { expected: 'gopher://gopher.quux.org', url: 'gopher://gopher.quux.org/1/' },
138 { expected: 'http://example.org', url: 'http://example.org/foo' },
139 { expected: 'https://example.org', url: 'https://example.org/foo' },
140 { expected: 'ws://example.org', url: 'ws://example.org/foo' },
141 { expected: 'wss://example.org', url: 'wss://example.org/foo' },
142 { expected: 'null', url: 'file:///tmp/mock/path' },
143 { expected: 'null', url: 'npm://nodejs/rules' },
145 assert.strictEqual(new URL(test.url).origin, test.expected);