parent
db33222609
commit
8c160abb76
1 changed files with 6 additions and 6 deletions
|
@ -75,27 +75,27 @@ describe('L.Util', function () {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle iframe', function () {
|
it('should handle iframe', function () {
|
||||||
assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html}}}'), 'A simple iframe: <iframe frameborder="0" src="http://osm.org/pouet.html" width="100%" height="300px"></iframe>');
|
assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html}}}'), 'A simple iframe: <div><iframe frameborder="0" src="http://osm.org/pouet.html" width="100%" height="300px"></iframe></div>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle iframe with height', function () {
|
it('should handle iframe with height', function () {
|
||||||
assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200}}}'), 'A simple iframe: <iframe frameborder="0" src="http://osm.org/pouet.html" width="100%" height="200px"></iframe>');
|
assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200}}}'), 'A simple iframe: <div><iframe frameborder="0" src="http://osm.org/pouet.html" width="100%" height="200px"></iframe></div>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle iframe with height and width', function () {
|
it('should handle iframe with height and width', function () {
|
||||||
assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200*400}}}'), 'A simple iframe: <iframe frameborder="0" src="http://osm.org/pouet.html" width="400px" height="200px"></iframe>');
|
assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200*400}}}'), 'A simple iframe: <div><iframe frameborder="0" src="http://osm.org/pouet.html" width="400px" height="200px"></iframe></div>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle iframe with height with px', function () {
|
it('should handle iframe with height with px', function () {
|
||||||
assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200px}}}'), 'A simple iframe: <iframe frameborder="0" src="http://osm.org/pouet.html" width="100%" height="200px"></iframe>');
|
assert.equal(L.Util.toHTML('A simple iframe: {{{http://osm.org/pouet.html|200px}}}'), 'A simple iframe: <div><iframe frameborder="0" src="http://osm.org/pouet.html" width="100%" height="200px"></iframe></div>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle iframe with url parameter', function () {
|
it('should handle iframe with url parameter', function () {
|
||||||
assert.equal(L.Util.toHTML('A simple iframe: {{{https://osm.org/?url=https%3A//anotherurl.com}}}'), 'A simple iframe: <iframe frameborder="0" src="https://osm.org/?url=https%3A//anotherurl.com" width="100%" height="300px"></iframe>');
|
assert.equal(L.Util.toHTML('A simple iframe: {{{https://osm.org/?url=https%3A//anotherurl.com}}}'), 'A simple iframe: <div><iframe frameborder="0" src="https://osm.org/?url=https%3A//anotherurl.com" width="100%" height="300px"></iframe></div>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should handle iframe with height with px', function () {
|
it('should handle iframe with height with px', function () {
|
||||||
assert.equal(L.Util.toHTML('A double iframe: {{{https://osm.org/pouet}}}{{{https://osm.org/boudin}}}'), 'A double iframe: <iframe frameborder="0" src="https://osm.org/pouet" width="100%" height="300px"></iframe><iframe frameborder="0" src="https://osm.org/boudin" width="100%" height="300px"></iframe>');
|
assert.equal(L.Util.toHTML('A double iframe: {{{https://osm.org/pouet}}}{{{https://osm.org/boudin}}}'), 'A double iframe: <div><iframe frameborder="0" src="https://osm.org/pouet" width="100%" height="300px"></iframe></div><div><iframe frameborder="0" src="https://osm.org/boudin" width="100%" height="300px"></iframe></div>');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('http link with http link as parameter as variable', function () {
|
it('http link with http link as parameter as variable', function () {
|
||||||
|
|
Loading…
Reference in a new issue