This repository was archived by the owner on Jun 6, 2019. It is now read-only.
File tree 2 files changed +12
-4
lines changed
2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 184
184
if ( EOF == c ) {
185
185
this . _host = base . _host ;
186
186
this . _port = base . _port ;
187
- this . _path = base . _path ;
187
+ this . _path = base . _path . slice ( ) ;
188
188
this . _query = base . _query ;
189
189
break loop;
190
190
} else if ( '/' == c || '\\' == c ) {
194
194
} else if ( '?' == c ) {
195
195
this . _host = base . _host ;
196
196
this . _port = base . _port ;
197
- this . _path = base . _path ;
197
+ this . _path = base . _path . slice ( ) ;
198
198
this . _query = '?' ;
199
199
state = 'query' ;
200
200
} else if ( '#' == c ) {
201
201
this . _host = base . _host ;
202
202
this . _port = base . _port ;
203
- this . _path = base . _path ;
203
+ this . _path = base . _path . slice ( ) ;
204
204
this . _query = base . _query ;
205
205
this . _fragment = '#' ;
206
206
state = 'fragment' ;
213
213
( EOF != nextNextC && '/' != nextNextC && '\\' != nextNextC && '?' != nextNextC && '#' != nextNextC ) ) {
214
214
this . _host = base . _host ;
215
215
this . _port = base . _port ;
216
- this . _path = base . _path ;
216
+ this . _path = base . _path . slice ( ) ;
217
217
this . _path . pop ( ) ;
218
218
}
219
219
state = 'relative path' ;
Original file line number Diff line number Diff line change 5
5
< script src =testharness.js > </ script >
6
6
< script src =testharnessreport.js > </ script >
7
7
< script src =urltestparser.js > </ script >
8
+ < script > forceJURL = true ; </ script >
9
+ < script src ="url.js "> </ script >
8
10
< div id =log > </ div >
9
11
< script >
12
+ test ( function ( ) {
13
+ var u = new URL ( 'http://a/foo' ) ;
14
+ var u2 = new URL ( 'bar' , u ) ;
15
+ assert_equals ( u . href , 'http://a/foo' ) ;
16
+ } , 'Consistency Check' ) ;
17
+
10
18
var setup = async_test ( "Loading data…" )
11
19
setup . step ( function ( ) {
12
20
var request = new XMLHttpRequest ( )
You can’t perform that action at this time.
0 commit comments