Commit 438caa21 authored by Josh Karlin's avatar Josh Karlin Committed by Commit Bot

[AdTagging] Fix disabled test

The test was supposed to verify that, when AdTagging is disabled,
frames with ad urls aren't tagged as ads. This wasn't working as
intended. It passed regardless of whether or not ad tagging was
disabled. What the test wanted to do isn't really possible when an
AdTracker isn't present, and it's not when AdTagging is disabled.

Changed the test to verify that the AdTracker is not present when
AdTagging is disabled.

Bug: 856273
Change-Id: I6e31444774ed5c1d1a9156a2a16e92896909d8fa
Reviewed-on: https://chromium-review.googlesource.com/c/1273816Reviewed-by: default avatarNate Chapin <japhet@chromium.org>
Commit-Queue: Josh Karlin <jkarlin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#600477}
parent 3417738c
......@@ -421,15 +421,9 @@ class AdTrackerDisabledSimTest : public SimTest {
std::unique_ptr<SimRequest> main_resource_;
};
TEST_F(AdTrackerDisabledSimTest, ResourceLoadedWhenAdTaggingDisabled) {
SimRequest iframe_resource("https://example.com/iframe.html", "text/html");
main_resource_->Complete(R"HTML(
<iframe src=https://example.com/iframe.html></iframe>
)HTML");
iframe_resource.Complete("<body></body>");
TEST_F(AdTrackerDisabledSimTest, VerifyAdTrackingDisabled) {
main_resource_->Complete("<body></body>");
EXPECT_FALSE(GetDocument().GetFrame()->GetAdTracker());
EXPECT_FALSE(GetDocument().GetFrame()->IsAdSubframe());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment