jmarantz commented on issue #1899: data-srcset in img and amp-img
URL: 
https://github.com/apache/incubator-pagespeed-mod/pull/1899#issuecomment-503600987
 
 
   No worries -- let's start slow, and I really appreciate you pushing the 
product forward in all the ways you do! Happy to help.
   
   1st: can you compile and run locally to test at all? There are instructions 
on setting up a development environment and running unit tests here:  
https://www.modpagespeed.com/doc/build_mod_pagespeed_from_source
   
   In general, when modifying a source file foo.cc, there'll be a unit-test 
foo_test.cc in the same directory. So for this change it would be 
https://github.com/apache/incubator-pagespeed-mod/blob/master/net/instaweb/rewriter/image_rewrite_filter_test.cc
 . That file is a little big and scary but you don't need to know all of it as 
you are only replicating similar functionality to what already exists, you can 
similarly replicate the test, which is ImageRewriteTest.ImgSrcSet on line 
https://github.com/apache/incubator-pagespeed-mod/blob/1a64c0e356f7969dff748ece6b8d11b5aa123d48/net/instaweb/rewriter/image_rewrite_filter_test.cc#L1332
   
   Just take that test-block and copy it to a new one, change the attribute 
name and expected result, and you should be good to go.
   
   The hardest part by far of this will be setting up your dev environment to 
run the tests. Once you have that set up I think this will be fairly easy to 
add a unit-test for.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to