-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Fix lazy loading of responsive images" (#254)
This reverts commit 1ee5c27.
- Loading branch information
Nir Maoz
authored
Jul 26, 2020
1 parent
f09e577
commit 3b0d80c
Showing
3 changed files
with
40 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
describe("Lazy Loaded Image", function() { | ||
it("should return empty src", function() { | ||
it("should return empty src on Firefox", function() { | ||
cl = cloudinary.Cloudinary.new({cloud_name: 'sdk-test'}); | ||
let options = {loading: "lazy"}; | ||
let img = cl.image("sample", options); | ||
var img; | ||
let options = {loading: "lazy"} | ||
img = cl.image("sample", options); | ||
img.removeAttribute('src'); | ||
cl.cloudinary_update(img, options); | ||
expect(img).not.toContain('src'); | ||
|
||
if(navigator.userAgent.toLowerCase().indexOf('firefox') > -1) { | ||
expect(img).not.toContain('src'); | ||
} | ||
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1) { | ||
expect(img.getAttribute('src')).toEqual('http://res.cloudinary.com/sdk-test/image/upload/sample'); | ||
} | ||
}); | ||
}); |