blob: abf42de7ff0ac981d85373b901ed148023232061 [file] [log] [blame]
Tests FileSystemMapping
Testing file system mapping.
file system paths:
Adding file system file:///home/username/projects/foo
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
Adding file system file:///home/username/projects/bar
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- file:///home/username/projects/bar
Adding file system file:///home/username/project/build
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- file:///home/username/projects/bar
- file:///home/username/project/build
Adding file system file:///www/site1
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- file:///home/username/projects/bar
- file:///home/username/project/build
- file:///www/site1
Adding file mapping (file:///www/site1, http://localhost/, /)
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- file:///home/username/projects/bar
- file:///home/username/project/build
- file:///www/site1
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
Adding file mapping (file:///www/site1, http://www.foo.com/, /foo/)
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- file:///home/username/projects/bar
- file:///home/username/project/build
- file:///www/site1
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
Adding file mapping (file:///home/username/projects/foo, http://www.example.com/bar/, /foo/)
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
- file:///home/username/projects/bar
- file:///home/username/project/build
- file:///www/site1
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
Adding file mapping for resource (http://www.bar.com/foo/folder/42.js, file:///home/username/projects/foo, file:///home/username/projects/foo/baz/folder/42.js)
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.bar.com/foo/","pathPrefix":"/baz/"}
- file:///home/username/projects/bar
- file:///home/username/project/build
- file:///www/site1
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
Adding file mapping for resource (http://localhost:3333/build/layout.css, file:///home/username/project/build, file:///home/username/project/build/layout.css)
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.bar.com/foo/","pathPrefix":"/baz/"}
- file:///home/username/projects/bar
- file:///home/username/project/build
- {"fileSystemPath":"file:///home/username/project/build","urlPrefix":"http://localhost:3333/build/","pathPrefix":"/"}
- file:///www/site1
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
Testing mappings for url:
Has mapping for 'http://www.bar.com/foo/folder/42.js': true
File for 'http://www.bar.com/foo/folder/42.js': file:///home/username/projects/foo/baz/folder/42.js
Has mapping for 'http://www.foo.com/bar/folder/42.js': true
File for 'http://www.foo.com/bar/folder/42.js': file:///www/site1/foo/bar/folder/42.js
Has mapping for 'http://localhost/index.html': true
File for 'http://localhost/index.html': file:///www/site1/index.html
Has mapping for 'https://localhost/index.html': false
File for 'https://localhost/index.html': null
Has mapping for 'http://localhost:8080/index.html': false
File for 'http://localhost:8080/index.html': null
Has mapping for 'http://localhost/': true
File for 'http://localhost/': file:///www/site1/
Has mapping for 'http://localhost:3333/build/main.css': true
File for 'http://localhost:3333/build/main.css': file:///home/username/project/build/main.css
Testing mappings for path:
URL for path 'file:///home/username/projects/foo/baz/folder/42.js': http://www.bar.com/foo/folder/42.js
URL for path 'file:///home/username/projects/foo/baz/folder/43.js': http://www.bar.com/foo/folder/43.js
URL for path 'file:///home/username/projects/foo/bar/folder/42.js':
URL for path 'file:///home/username/projects/foo/foo/folder/42.js': http://www.example.com/bar/folder/42.js
URL for path 'file:///home/username/projects/foo/foo2/folder/42.js':
URL for path 'file:///www/site1/foo/index.html': http://www.foo.com/index.html
URL for path 'file:///www/site1/index.html': http://localhost/index.html
URL for path 'file:///www/site1/foo': http://localhost/foo
URL for path 'file:///www/site1/foo/': http://www.foo.com/
Creating another file system mapping.
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.bar.com/foo/","pathPrefix":"/baz/"}
- file:///home/username/projects/bar
- file:///home/username/project/build
- {"fileSystemPath":"file:///home/username/project/build","urlPrefix":"http://localhost:3333/build/","pathPrefix":"/"}
- file:///www/site1
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
Removing file mapping for url http://www.bar.com/foo/folder/42.js
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
- file:///home/username/projects/bar
- file:///home/username/project/build
- {"fileSystemPath":"file:///home/username/project/build","urlPrefix":"http://localhost:3333/build/","pathPrefix":"/"}
- file:///www/site1
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
Removing file mapping (file:///www/site1, http://localhost/, /)
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
- file:///home/username/projects/bar
- file:///home/username/project/build
- {"fileSystemPath":"file:///home/username/project/build","urlPrefix":"http://localhost:3333/build/","pathPrefix":"/"}
- file:///www/site1
- {"fileSystemPath":"file:///www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
Removing file mapping (file:///www/site1, http://www.foo.com/, /foo/)
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- {"fileSystemPath":"file:///home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
- file:///home/username/projects/bar
- file:///home/username/project/build
- {"fileSystemPath":"file:///home/username/project/build","urlPrefix":"http://localhost:3333/build/","pathPrefix":"/"}
- file:///www/site1
Removing file mapping (file:///home/username/projects/foo, http://www.example.com/bar/, /foo/)
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- file:///home/username/projects/bar
- file:///home/username/project/build
- {"fileSystemPath":"file:///home/username/project/build","urlPrefix":"http://localhost:3333/build/","pathPrefix":"/"}
- file:///www/site1
Removing file system file:///www/site1
Testing file system mapping.
file system paths:
- file:///home/username/projects/foo
- file:///home/username/projects/bar
- file:///home/username/project/build
- {"fileSystemPath":"file:///home/username/project/build","urlPrefix":"http://localhost:3333/build/","pathPrefix":"/"}
Removing file system file:///home/username/projects/foo
Testing file system mapping.
file system paths:
- file:///home/username/projects/bar
- file:///home/username/project/build
- {"fileSystemPath":"file:///home/username/project/build","urlPrefix":"http://localhost:3333/build/","pathPrefix":"/"}
Removing file system file:///home/username/projects/bar
Testing file system mapping.
file system paths:
- file:///home/username/project/build
- {"fileSystemPath":"file:///home/username/project/build","urlPrefix":"http://localhost:3333/build/","pathPrefix":"/"}