-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- use currentSrc - emit progress with <picture> - β add <picture> test - β test srcset - add test css - remove bower_components
- Loading branch information
Showing
8 changed files
with
135 additions
and
5 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
|
||
<title>picture</title> | ||
|
||
</head> | ||
<body> | ||
|
||
<picture> | ||
<source srcset="https://picsum.photos/id/103/1200/900" media="(min-width: 1200px)"> | ||
<source srcset="https://picsum.photos/id/103/800/600" media="(min-width: 800px)"> | ||
<img src="https://picsum.photos/id/103/400/300"> | ||
</picture> | ||
|
||
</body> | ||
</html> |
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
QUnit.test( 'picture', function( assert ) { | ||
|
||
let done = assert.async( 4 ); | ||
|
||
let imgLoad0 = imagesLoaded( '#picture-list', function() { | ||
assert.ok( true, 'callback triggered on #picture-list' ); | ||
done(); | ||
} ); | ||
assert.equal( imgLoad0.images.length, 3, '3 images on #picture-list' ); | ||
|
||
imgLoad0.on( 'progress', function( instance, image, element ) { | ||
assert.ok( element.nodeName == 'PICTURE', 'progress; element is picture' ); | ||
assert.ok( image.isLoaded, 'progress; image.isLoaded' ); | ||
done(); | ||
} ); | ||
|
||
} ); |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
QUnit.test( 'srcset', function( assert ) { | ||
|
||
let done = assert.async( 4 ); | ||
|
||
let imgLoad0 = imagesLoaded( '#srcset', function() { | ||
assert.ok( true, 'callback triggered on #srcset' ); | ||
done(); | ||
} ); | ||
assert.equal( imgLoad0.images.length, 3, '3 images on #srcset' ); | ||
|
||
imgLoad0.on( 'progress', function( instance, image, element ) { | ||
assert.ok( element.nodeName == 'IMG', 'progress; element is img' ); | ||
assert.ok( image.isLoaded, 'progress; image.isLoaded' ); | ||
done(); | ||
} ); | ||
|
||
} ); |