@@ -2450,10 +2450,11 @@ describe('$location', function() {
2450
2450
2451
2451
2452
2452
describe ( 'LocationHtml5Url' , function ( ) {
2453
- var locationUrl , locationIndexUrl ;
2453
+ var locationUrl , locationUmlautUrl , locationIndexUrl ;
2454
2454
2455
2455
beforeEach ( function ( ) {
2456
2456
locationUrl = new LocationHtml5Url ( 'http://server/pre/' , 'http://server/pre/' , 'http://server/pre/path' ) ;
2457
+ locationUmlautUrl = new LocationHtml5Url ( 'http://särver/pre/' , 'http://särver/pre/' , 'http://särver/pre/path' ) ;
2457
2458
locationIndexUrl = new LocationHtml5Url ( 'http://server/pre/index.html' , 'http://server/pre/' , 'http://server/pre/path' ) ;
2458
2459
} ) ;
2459
2460
@@ -2465,6 +2466,13 @@ describe('$location', function() {
2465
2466
// Note: relies on the previous state!
2466
2467
expect ( parseLinkAndReturn ( locationUrl , 'someIgnoredAbsoluteHref' , '#test' ) ) . toEqual ( 'http://server/pre/otherPath#test' ) ;
2467
2468
2469
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'http://other' ) ) . toEqual ( undefined ) ;
2470
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'http://särver/pre' ) ) . toEqual ( 'http://särver/pre/' ) ;
2471
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'http://särver/pre/' ) ) . toEqual ( 'http://särver/pre/' ) ;
2472
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'http://särver/pre/otherPath' ) ) . toEqual ( 'http://särver/pre/otherPath' ) ;
2473
+ // Note: relies on the previous state!
2474
+ expect ( parseLinkAndReturn ( locationUmlautUrl , 'someIgnoredAbsoluteHref' , '#test' ) ) . toEqual ( 'http://särver/pre/otherPath#test' ) ;
2475
+
2468
2476
expect ( parseLinkAndReturn ( locationIndexUrl , 'http://server/pre' ) ) . toEqual ( 'http://server/pre/' ) ;
2469
2477
expect ( parseLinkAndReturn ( locationIndexUrl , 'http://server/pre/' ) ) . toEqual ( 'http://server/pre/' ) ;
2470
2478
expect ( parseLinkAndReturn ( locationIndexUrl , 'http://server/pre/otherPath' ) ) . toEqual ( 'http://server/pre/otherPath' ) ;
0 commit comments