Fix incorrect console message for subframe navigation filtering
1. Currently there is a bug: when subframe navigation is blocked, the console message is like: |<URL> on this site ...|; while the expected message should be |Chrome blocked resource <URL> on this site ...|. The reason is that in the code the prefix is put in the constructor of ostringstream but that call doesn't advance the write pointer. There was a test for it but the test also did it in the wrong way. 2. Fixed another potential issue: Test SubresourceFilterBrowserTest.SubFrameActivation is referring to kDisallowSubframeConsoleMessagePrefix/Suffix but the generated string actually comes from GetErrorStringForDisallowedLoad() in blink/renderer/core/loader/subresource_filter.cc. Right now the two strings are the same thus the test is passing now, but this should be fixed. Bug: N/A Change-Id: I28548d809ecaae019321bf97551d2493f2af7703 Reviewed-on: https://chromium-review.googlesource.com/1237173Reviewed-by:Charlie Harrison <csharrison@chromium.org> Commit-Queue: Yao Xiao <yaoxia@chromium.org> Cr-Commit-Position: refs/heads/master@{#593544}
Showing
Please register or sign in to comment