@@ -2428,10 +2428,11 @@ describe('$location', function() {
2428
2428
2429
2429
2430
2430
describe ( 'LocationHtml5Url' , function ( ) {
2431
- var locationUrl , locationIndexUrl ;
2431
+ var locationUrl , locationUmlautUrl , locationIndexUrl ;
2432
2432
2433
2433
beforeEach ( function ( ) {
2434
2434
locationUrl = new LocationHtml5Url ( 'http://server/pre/' , 'http://server/pre/' , 'http://server/pre/path' ) ;
2435
+ locationUmlautUrl = new LocationHtml5Url ( 'http://särver/pre/' , 'http://särver/pre/' , 'http://särver/pre/path' ) ;
2435
2436
locationIndexUrl = new LocationHtml5Url ( 'http://server/pre/index.html' , 'http://server/pre/' , 'http://server/pre/path' ) ;
2436
2437
} ) ;
2437
2438
@@ -2443,6 +2444,13 @@ describe('$location', function() {
2443
2444
// Note: relies on the previous state!
2444
2445
expect ( parseLinkAndReturn ( locationUrl , 'someIgnoredAbsoluteHref' , '#test' ) ) . toEqual ( 'http://server/pre/otherPath#test' ) ;
2445
2446
2447
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'http://other' ) ) . toEqual ( undefined ) ;
2448
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'http://särver/pre' ) ) . toEqual ( 'http://särver/pre/' ) ;
2449
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'http://särver/pre/' ) ) . toEqual ( 'http://särver/pre/' ) ;
2450
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'http://särver/pre/otherPath' ) ) . toEqual ( 'http://särver/pre/otherPath' ) ;
2451
+ // Note: relies on the previous state!
2452
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'someIgnoredAbsoluteHref' , '#test' ) ) . toEqual ( 'http://särver/pre/otherPath#test' ) ;
2453
+
2446
2454
expect ( parseLinkAndReturn ( locationIndexUrl , 'http://server/pre' ) ) . toEqual ( 'http://server/pre/' ) ;
2447
2455
expect ( parseLinkAndReturn ( locationIndexUrl , 'http://server/pre/' ) ) . toEqual ( 'http://server/pre/' ) ;
2448
2456
expect ( parseLinkAndReturn ( locationIndexUrl , 'http://server/pre/otherPath' ) ) . toEqual ( 'http://server/pre/otherPath' ) ;
0 commit comments