@@ -305,7 +305,7 @@ describe('$location', function() {
305
305
} ) ;
306
306
307
307
it ( 'should not rewrite when hashbang url is not given' , function ( ) {
308
- initService ( { html5Mode :true , hashPrefix : '!' , supportHistory : true } ) ;
308
+ initService ( { html5Mode : true , hashPrefix : '!' , supportHistory : true } ) ;
309
309
inject (
310
310
initBrowser ( { url :'http://domain.com/base/a/b' , basePath : '/base' } ) ,
311
311
function ( $rootScope , $location , $browser ) {
@@ -556,7 +556,7 @@ describe('$location', function() {
556
556
557
557
describe ( 'wiring' , function ( ) {
558
558
559
- beforeEach ( initService ( { html5Mode :false , hashPrefix : '!' , supportHistory : true } ) ) ;
559
+ beforeEach ( initService ( { html5Mode : false , hashPrefix : '!' , supportHistory : true } ) ) ;
560
560
beforeEach ( inject ( initBrowser ( { url :'http://new.com/a/b#!' , basePath : 'http://new.com/a/b' } ) ) ) ;
561
561
562
562
@@ -681,7 +681,7 @@ describe('$location', function() {
681
681
describe ( 'disabled history' , function ( ) {
682
682
683
683
it ( 'should use hashbang url with hash prefix' , function ( ) {
684
- initService ( { html5Mode :false , hashPrefix : '!' } ) ;
684
+ initService ( { html5Mode : false , hashPrefix : '!' } ) ;
685
685
inject (
686
686
initBrowser ( { url :'http://domain.com/base/index.html#!/a/b' , basePath : '/base/index.html' } ) ,
687
687
function ( $rootScope , $location , $browser ) {
@@ -696,7 +696,7 @@ describe('$location', function() {
696
696
697
697
698
698
it ( 'should use hashbang url without hash prefix' , function ( ) {
699
- initService ( { html5Mode :false , hashPrefix : '' } ) ;
699
+ initService ( { html5Mode : false , hashPrefix : '' } ) ;
700
700
inject (
701
701
initBrowser ( { url :'http://domain.com/base/index.html#/a/b' , basePath : '/base/index.html' } ) ,
702
702
function ( $rootScope , $location , $browser ) {
@@ -719,7 +719,7 @@ describe('$location', function() {
719
719
} ) ) ;
720
720
721
721
it ( 'should use hashbang url with hash prefix' , function ( ) {
722
- initService ( { html5Mode :true , hashPrefix : '!!' , supportHistory : false } ) ;
722
+ initService ( { html5Mode : true , hashPrefix : '!!' , supportHistory : false } ) ;
723
723
inject (
724
724
initBrowser ( { url :'http://domain.com/base/index.html#!!/a/b' , basePath : '/base/index.html' } ) ,
725
725
function ( $rootScope , $location , $browser ) {
@@ -734,7 +734,7 @@ describe('$location', function() {
734
734
735
735
736
736
it ( 'should redirect to hashbang url when new url given' , function ( ) {
737
- initService ( { html5Mode :true , hashPrefix : '!' } ) ;
737
+ initService ( { html5Mode : true , hashPrefix : '!' } ) ;
738
738
inject (
739
739
initBrowser ( { url :'http://domain.com/base/new-path/index.html' , basePath : '/base/index.html' } ) ,
740
740
function ( $browser , $location ) {
@@ -744,7 +744,7 @@ describe('$location', function() {
744
744
} ) ;
745
745
746
746
it ( 'should correctly convert html5 url with path matching basepath to hashbang url' , function ( ) {
747
- initService ( { html5Mode :true , hashPrefix : '!' , supportHistory : false } ) ;
747
+ initService ( { html5Mode : true , hashPrefix : '!' , supportHistory : false } ) ;
748
748
inject (
749
749
initBrowser ( { url :'http://domain.com/base/index.html' , basePath : '/base/index.html' } ) ,
750
750
function ( $browser , $location ) {
@@ -763,7 +763,7 @@ describe('$location', function() {
763
763
} ) ) ;
764
764
765
765
it ( 'should use new url' , function ( ) {
766
- initService ( { html5Mode :true , hashPrefix : '' , supportHistory : true } ) ;
766
+ initService ( { html5Mode : true , hashPrefix : '' , supportHistory : true } ) ;
767
767
inject (
768
768
initBrowser ( { url :'http://domain.com/base/old/index.html#a' , basePath : '/base/index.html' } ) ,
769
769
function ( $rootScope , $location , $browser ) {
@@ -778,7 +778,7 @@ describe('$location', function() {
778
778
779
779
780
780
it ( 'should rewrite when hashbang url given' , function ( ) {
781
- initService ( { html5Mode :true , hashPrefix : '!' , supportHistory : true } ) ;
781
+ initService ( { html5Mode : true , hashPrefix : '!' , supportHistory : true } ) ;
782
782
inject (
783
783
initBrowser ( { url :'http://domain.com/base/index.html#!/a/b' , basePath : '/base/index.html' } ) ,
784
784
function ( $rootScope , $location , $browser ) {
@@ -794,7 +794,7 @@ describe('$location', function() {
794
794
795
795
796
796
it ( 'should rewrite when hashbang url given (without hash prefix)' , function ( ) {
797
- initService ( { html5Mode :true , hashPrefix : '' , supportHistory : true } ) ;
797
+ initService ( { html5Mode : true , hashPrefix : '' , supportHistory : true } ) ;
798
798
inject (
799
799
initBrowser ( { url :'http://domain.com/base/index.html#/a/b' , basePath : '/base/index.html' } ) ,
800
800
function ( $rootScope , $location , $browser ) {
@@ -842,7 +842,7 @@ describe('$location', function() {
842
842
function configureService ( options ) {
843
843
var linkHref = options . linkHref ,
844
844
html5Mode = options . html5Mode ,
845
- supportHist = options . supportHist ,
845
+ supportHistory = options . supportHistory ,
846
846
relLink = options . relLink ,
847
847
attrs = options . attrs ,
848
848
content = options . content ;
@@ -867,7 +867,7 @@ describe('$location', function() {
867
867
link = jqLite ( '<a ' + attrs + '>' + content + '</a>' ) [ 0 ] ;
868
868
}
869
869
870
- $provide . value ( '$sniffer' , { history : supportHist } ) ;
870
+ $provide . value ( '$sniffer' , { history : supportHistory } ) ;
871
871
$locationProvider . html5Mode ( html5Mode ) ;
872
872
$locationProvider . hashPrefix ( '!' ) ;
873
873
return function ( $rootElement , $document ) {
@@ -915,7 +915,7 @@ describe('$location', function() {
915
915
916
916
917
917
it ( 'should rewrite rel link to new url when history enabled on new browser' , function ( ) {
918
- configureService ( { linkHref : 'link?a#b' , html5Mode : true , supportHist : true } ) ;
918
+ configureService ( { linkHref : 'link?a#b' , html5Mode : true , supportHistory : true } ) ;
919
919
inject (
920
920
initBrowser ( ) ,
921
921
initLocation ( ) ,
@@ -928,7 +928,7 @@ describe('$location', function() {
928
928
929
929
930
930
it ( 'should do nothing if already on the same URL' , function ( ) {
931
- configureService ( { linkHref : '/base/' , html5Mode : true , supportHist : true } ) ;
931
+ configureService ( { linkHref : '/base/' , html5Mode : true , supportHistory : true } ) ;
932
932
inject (
933
933
initBrowser ( ) ,
934
934
initLocation ( ) ,
@@ -955,7 +955,7 @@ describe('$location', function() {
955
955
956
956
957
957
it ( 'should rewrite abs link to new url when history enabled on new browser' , function ( ) {
958
- configureService ( { linkHref : '/base/link?a#b' , html5Mode : true , supportHist : true } ) ;
958
+ configureService ( { linkHref : '/base/link?a#b' , html5Mode : true , supportHistory : true } ) ;
959
959
inject (
960
960
initBrowser ( ) ,
961
961
initLocation ( ) ,
@@ -968,7 +968,7 @@ describe('$location', function() {
968
968
969
969
970
970
it ( 'should rewrite rel link to hashbang url when history enabled on old browser' , function ( ) {
971
- configureService ( { linkHref : 'link?a#b' , html5Mode : true , supportHist : false } ) ;
971
+ configureService ( { linkHref : 'link?a#b' , html5Mode : true , supportHistory : false } ) ;
972
972
inject (
973
973
initBrowser ( ) ,
974
974
initLocation ( ) ,
@@ -982,7 +982,7 @@ describe('$location', function() {
982
982
983
983
// Regression (gh-7721)
984
984
it ( 'should not throw when clicking anchor with no href attribute when history enabled on old browser' , function ( ) {
985
- configureService ( { linkHref : null , html5Mode : true , supportHist : false } ) ;
985
+ configureService ( { linkHref : null , html5Mode : true , supportHistory : false } ) ;
986
986
inject (
987
987
initBrowser ( ) ,
988
988
initLocation ( ) ,
@@ -995,7 +995,7 @@ describe('$location', function() {
995
995
996
996
997
997
it ( 'should produce relative paths correctly when $location.path() is "/" when history enabled on old browser' , function ( ) {
998
- configureService ( { linkHref : 'partial1' , html5Mode : true , supportHist : false } ) ;
998
+ configureService ( { linkHref : 'partial1' , html5Mode : true , supportHistory : false } ) ;
999
999
inject (
1000
1000
initBrowser ( ) ,
1001
1001
initLocation ( ) ,
@@ -1011,7 +1011,7 @@ describe('$location', function() {
1011
1011
1012
1012
1013
1013
it ( 'should rewrite abs link to hashbang url when history enabled on old browser' , function ( ) {
1014
- configureService ( { linkHref : '/base/link?a#b' , html5Mode : true , supportHist : false } ) ;
1014
+ configureService ( { linkHref : '/base/link?a#b' , html5Mode : true , supportHistory : false } ) ;
1015
1015
inject (
1016
1016
initBrowser ( ) ,
1017
1017
initLocation ( ) ,
@@ -1037,7 +1037,7 @@ describe('$location', function() {
1037
1037
1038
1038
1039
1039
it ( 'should not rewrite links with target="_blank"' , function ( ) {
1040
- configureService ( { linkHref : '/a?b=c' , html5Mode : true , supportHist : true , attrs : 'target="_blank"' } ) ;
1040
+ configureService ( { linkHref : '/a?b=c' , html5Mode : true , supportHistory : true , attrs : 'target="_blank"' } ) ;
1041
1041
inject (
1042
1042
initBrowser ( ) ,
1043
1043
initLocation ( ) ,
@@ -1050,7 +1050,7 @@ describe('$location', function() {
1050
1050
1051
1051
1052
1052
it ( 'should not rewrite links with target specified' , function ( ) {
1053
- configureService ( { linkHref : '/a?b=c' , html5Mode : true , supportHist : true , attrs : 'target="some-frame"' } ) ;
1053
+ configureService ( { linkHref : '/a?b=c' , html5Mode : true , supportHistory : true , attrs : 'target="some-frame"' } ) ;
1054
1054
inject (
1055
1055
initBrowser ( ) ,
1056
1056
initLocation ( ) ,
@@ -1063,7 +1063,7 @@ describe('$location', function() {
1063
1063
1064
1064
1065
1065
it ( 'should not rewrite links with `javascript:` URI' , function ( ) {
1066
- configureService ( { linkHref : ' jAvAsCrIpT:throw new Error("Boom!")' , html5Mode : true , supportHist : true , relLink : true } ) ;
1066
+ configureService ( { linkHref : ' jAvAsCrIpT:throw new Error("Boom!")' , html5Mode : true , supportHistory : true , relLink : true } ) ;
1067
1067
inject (
1068
1068
initBrowser ( ) ,
1069
1069
initLocation ( ) ,
@@ -1076,7 +1076,7 @@ describe('$location', function() {
1076
1076
1077
1077
1078
1078
it ( 'should not rewrite links with `mailto:` URI' , function ( ) {
1079
- configureService ( { linkHref :
' mAiLtO:[email protected] ' , html5Mode :
true , supportHist :
true , relLink :
true } ) ;
1079
+ configureService ( { linkHref :
' mAiLtO:[email protected] ' , html5Mode :
true , supportHistory :
true , relLink :
true } ) ;
1080
1080
inject (
1081
1081
initBrowser ( ) ,
1082
1082
initLocation ( ) ,
@@ -1102,7 +1102,7 @@ describe('$location', function() {
1102
1102
1103
1103
1104
1104
it ( 'should rewrite when clicked span inside link' , function ( ) {
1105
- configureService ( { linkHref : 'some/link' , html5Mode : true , supportHist : true , attrs : '' , content : '<span>link</span>' } ) ;
1105
+ configureService ( { linkHref : 'some/link' , html5Mode : true , supportHistory : true , attrs : '' , content : '<span>link</span>' } ) ;
1106
1106
inject (
1107
1107
initBrowser ( ) ,
1108
1108
initLocation ( ) ,
@@ -1118,7 +1118,7 @@ describe('$location', function() {
1118
1118
1119
1119
it ( 'should not rewrite when link to different base path when history enabled on new browser' ,
1120
1120
function ( ) {
1121
- configureService ( { linkHref : '/other_base/link' , html5Mode : true , supportHist : true } ) ;
1121
+ configureService ( { linkHref : '/other_base/link' , html5Mode : true , supportHistory : true } ) ;
1122
1122
inject (
1123
1123
initBrowser ( ) ,
1124
1124
initLocation ( ) ,
@@ -1132,7 +1132,7 @@ describe('$location', function() {
1132
1132
1133
1133
it ( 'should not rewrite when link to different base path when history enabled on old browser' ,
1134
1134
function ( ) {
1135
- configureService ( { linkHref : '/other_base/link' , html5Mode : true , supportHist : false } ) ;
1135
+ configureService ( { linkHref : '/other_base/link' , html5Mode : true , supportHistory : false } ) ;
1136
1136
inject (
1137
1137
initBrowser ( ) ,
1138
1138
initLocation ( ) ,
@@ -1159,7 +1159,7 @@ describe('$location', function() {
1159
1159
1160
1160
it ( 'should not rewrite when full link to different base path when history enabled on new browser' ,
1161
1161
function ( ) {
1162
- configureService ( { linkHref : 'http://host.com/other_base/link' , html5Mode : true , supportHist : true } ) ;
1162
+ configureService ( { linkHref : 'http://host.com/other_base/link' , html5Mode : true , supportHistory : true } ) ;
1163
1163
inject (
1164
1164
initBrowser ( ) ,
1165
1165
initLocation ( ) ,
@@ -1173,7 +1173,7 @@ describe('$location', function() {
1173
1173
1174
1174
it ( 'should not rewrite when full link to different base path when history enabled on old browser' ,
1175
1175
function ( ) {
1176
- configureService ( { linkHref : 'http://host.com/other_base/link' , html5Mode : true , supportHist : false } ) ;
1176
+ configureService ( { linkHref : 'http://host.com/other_base/link' , html5Mode : true , supportHistory : false } ) ;
1177
1177
inject (
1178
1178
initBrowser ( ) ,
1179
1179
initLocation ( ) ,
@@ -1198,7 +1198,7 @@ describe('$location', function() {
1198
1198
} ) ;
1199
1199
1200
1200
it ( 'should replace current hash fragment when link begins with "#" history disabled' , function ( ) {
1201
- configureService ( { linkHref : '#link' , html5Mode : true , supportHist : false , relLink : true } ) ;
1201
+ configureService ( { linkHref : '#link' , html5Mode : true , supportHistory : false , relLink : true } ) ;
1202
1202
inject (
1203
1203
initBrowser ( ) ,
1204
1204
initLocation ( ) ,
@@ -1215,7 +1215,7 @@ describe('$location', function() {
1215
1215
} ) ;
1216
1216
1217
1217
it ( 'should replace current hash fragment when link begins with "#" history enabled' , function ( ) {
1218
- configureService ( { linkHref : '#link' , html5Mode : true , supportHist : true , relLink : true } ) ;
1218
+ configureService ( { linkHref : '#link' , html5Mode : true , supportHistory : true , relLink : true } ) ;
1219
1219
inject (
1220
1220
initBrowser ( ) ,
1221
1221
initLocation ( ) ,
@@ -1235,7 +1235,7 @@ describe('$location', function() {
1235
1235
if ( ! msie || msie >= 9 ) {
1236
1236
1237
1237
it ( 'should not rewrite when clicked with ctrl pressed' , function ( ) {
1238
- configureService ( { linkHref : '/a?b=c' , html5Mode : true , supportHist : true } ) ;
1238
+ configureService ( { linkHref : '/a?b=c' , html5Mode : true , supportHistory : true } ) ;
1239
1239
inject (
1240
1240
initBrowser ( ) ,
1241
1241
initLocation ( ) ,
@@ -1248,7 +1248,7 @@ describe('$location', function() {
1248
1248
1249
1249
1250
1250
it ( 'should not rewrite when clicked with meta pressed' , function ( ) {
1251
- configureService ( { linkHref : '/a?b=c' , html5Mode : true , supportHist : true } ) ;
1251
+ configureService ( { linkHref : '/a?b=c' , html5Mode : true , supportHistory : true } ) ;
1252
1252
inject (
1253
1253
initBrowser ( ) ,
1254
1254
initLocation ( ) ,
0 commit comments