File tree Expand file tree Collapse file tree 4 files changed +59
-0
lines changed
Expand file tree Collapse file tree 4 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="en ">
3+ < head >
4+ < meta charset ="utf-8 ">
5+ </ head >
6+ < body >
7+ < div data-nstest-role ="page " id ="imagetest ">
8+ < img src ="images/test.gif " onload ="imageLoad(event) " onerror ="imageError(event) " >
9+ </ div >
10+ </ body >
11+ </ html >
Original file line number Diff line number Diff line change 22 * mobile navigation unit tests
33 */
44( function ( $ ) {
5+
6+
7+
58 // TODO move siteDirectory over to the nav path helper
69 var changePageFn = $ . mobile . changePage ,
710 originalTitle = document . title ,
2831 }
2932 } ) ;
3033
34+
35+
3136 asyncTest ( "window.history.back() from external to internal page" , function ( ) {
3237
3338 $ . testHelper . pageSequence ( [
13411346
13421347 $ . mobile . changePage ( requestPath ) ;
13431348 } ) ;
1349+
1350+
1351+
1352+ // test path/image loading
1353+ window . imageError = function ( e ) {
1354+
1355+ $ ( "#imagetest" ) . trigger ( "imgerror" ) ;
1356+ } ;
1357+
1358+ window . imageLoad = function ( e ) {
1359+
1360+ $ ( "#imagetest" ) . trigger ( "imgload" ) ;
1361+ } ;
1362+
1363+ asyncTest ( "image path is working properly" , function ( ) {
1364+
1365+ expect ( 1 ) ;
1366+
1367+ $ ( document ) . on ( "imgload imgerror" , function ( e ) {
1368+
1369+ ok ( e . type === "imgload" , "the event is imgload" ) ;
1370+
1371+ start ( ) ;
1372+
1373+ } ) ;
1374+
1375+
1376+ $ . mobile . changePage ( "imagetest/imagetest.html" ) ;
1377+
1378+ } ) ;
1379+
1380+
1381+
1382+
1383+
1384+
1385+
13441386} ) ( jQuery ) ;
Original file line number Diff line number Diff line change 173173 asyncTest ( "dir refrence with parent dir" , function ( ) {
174174 testPageLoad ( "#absolute-test-six" , "doc rel test six" ) ;
175175 } ) ;
176+
177+
178+
179+
180+
181+
176182} ) ( jQuery ) ;
You can’t perform that action at this time.
0 commit comments