Though I am not sure yet where transform information will be stored in bug 1519546, as for CSS visibility we are going to store it in each nsIPresShell in bug 1541253. So if the pres-shell is restored in BFCache, we need to update it with the latest value, Timothy noticed it in a review comment. It would be nice test cases if some other information will be stored in nsIPresShell or some other instances which might be restored from the BFCache.
Attaching patch is a piece of such cases, but after spending some time for that, I realized that we probably need to write mochitest-browser instead of mochitest-chrome to make an ancestor element of the tab window hidden with visibility:hidden.
Anyways, I am going to defer the tests in this bug for now.