This repository was archived by the owner on Apr 12, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -5,19 +5,20 @@ describe('SCE URL policy when base tags are present', function() {
5
5
var urlIsTrusted = browser . executeScript ( 'return isTrustedUrl(arguments[0])' , url ) ;
6
6
expect ( urlIsTrusted ) . toBe ( allowed ) ;
7
7
}
8
- loadFixture ( 'base_tag' ) ;
9
8
10
- // sanity checks
9
+ beforeAll ( function ( ) {
10
+ loadFixture ( 'base_tag' ) ;
11
+ } ) ;
12
+
11
13
it ( 'allows the page URL (location.href)' , function ( ) {
12
14
checkUrl ( browser . getLocationAbsUrl ( ) , true ) ;
13
15
} ) ;
16
+
14
17
it ( 'blocks off-origin URLs' , function ( ) {
15
- //browser.pause();
16
18
checkUrl ( 'http://evil.com' , false ) ;
17
19
} ) ;
18
20
19
21
it ( 'allows relative URLs ("/relative")' , function ( ) {
20
- //browser.pause();
21
22
checkUrl ( '/relative' , true ) ;
22
23
} ) ;
23
24
@@ -28,7 +29,6 @@ describe('SCE URL policy when base tags are present', function() {
28
29
it ( 'tracks changes to the base URL' , function ( ) {
29
30
browser . executeScript (
30
31
'document.getElementsByTagName("base")[0].href = "http://xxx.example.com/";' ) ;
31
- //browser.pause();
32
32
checkUrl ( 'http://xxx.example.com/path/to/file.html' , true ) ;
33
33
} ) ;
34
34
} ) ;
You can’t perform that action at this time.
0 commit comments