Add internals.setIsAdSubframe and simplify web tests accordingly
Currently, many subresource_filter/ web_tests rely on the behavior that Frames are tagged as ads immediately when they are created if ad script is on the stack. This flow requires that first the script's URL is set as disallowed, then the script is loaded and then the frame can be created. This new call allows for web tests to more simply create ad frames by setting their ad status directly. We adapt existing web_tests to use this new functionality. We remove the ad script creation and onload setting boilerplate that is no longer necessary, also converting affected promise_tests to async_tests to further simplify them. These changes will additionally allow for an upcoming refactor that defers ad status calculation until the frame has navigated to access additional information. As this logic is in the subresource_filter/ component, it cannot be used in web-tests. Bug: 1119476 Change-Id: Id2fc2faa392f06c3b1845981f06f19a0650461d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2364956 Commit-Queue: Alex Turner <alexmt@chromium.org> Reviewed-by:Charlie Harrison <csharrison@chromium.org> Reviewed-by:
Stefan Zager <szager@chromium.org> Cr-Commit-Position: refs/heads/master@{#807540}
Showing
Please register or sign in to comment