blob: 54011943403040eed7732ccc22600aa0a8b7e302 [file] [log] [blame]
Test should not crash.
replaceState() in any frame should not always count against the global quota. Instead it should literally replace the most recent state object added from that frame.
Pushing 59+mb of state objects (but less than 61mb)
Replace the last 1mb object with a 2mb object, bringing the total to 60+mb
It fit.
--------
Frame: '<!--framePath //<!--frame0-->-->'
--------
The total payload is currently 60+mb. Pushing a 1mb object brings that 61+mb.
It fit.
The total payload is currently 61+mb. Replacing the last 1mb with 2mb brings that to 62+mb.
It fit.
The total payload is currently 62+mb. Replacing the last 2mb with 4mb brings that to 64+mb, and should not fit.
Expected exception replacing 2mb with 4mb:QuotaExceededError: Attempt to store more data than allowed using history.replaceState()