Commit ed483842 authored by Mathias Bynens's avatar Mathias Bynens Committed by Commit Bot

[DevTools] Tag ChromeStatus link for heavy ad console message

Fixed: chromium:1143205
Change-Id: I95d7797c33c98de901b5c88904ddaac0e757df4a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2503695Reviewed-by: default avatarEric Robinson <ericrobinson@chromium.org>
Commit-Queue: Mathias Bynens <mathias@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821718}
parent fdd161ee
...@@ -125,7 +125,7 @@ void RecordFeatureUsage(content::RenderFrameHost* rfh, ...@@ -125,7 +125,7 @@ void RecordFeatureUsage(content::RenderFrameHost* rfh,
std::string GetHeavyAdReportMessage(const FrameTreeData& frame_data, std::string GetHeavyAdReportMessage(const FrameTreeData& frame_data,
bool will_unload_adframe) { bool will_unload_adframe) {
const char kChromeStatusMessage[] = const char kChromeStatusMessage[] =
"See https://www.chromestatus.com/feature/4800491902992384"; "See https://www.chromestatus.com/feature/4800491902992384?utm_source=devtools";
const char kReportingOnlyMessage[] = const char kReportingOnlyMessage[] =
"A future version of Chrome may remove this ad"; "A future version of Chrome may remove this ad";
const char kInterventionMessage[] = "Ad was removed"; const char kInterventionMessage[] = "Ad was removed";
......
...@@ -2111,7 +2111,7 @@ TEST_F(AdsPageLoadMetricsObserverTest, HeavyAdNetworkUsage_InterventionFired) { ...@@ -2111,7 +2111,7 @@ TEST_F(AdsPageLoadMetricsObserverTest, HeavyAdNetworkUsage_InterventionFired) {
const char kInterventionMessage[] = const char kInterventionMessage[] =
"Ad was removed because its network usage exceeded the limit. " "Ad was removed because its network usage exceeded the limit. "
"See https://www.chromestatus.com/feature/4800491902992384"; "See https://www.chromestatus.com/feature/4800491902992384?utm_source=devtools";
EXPECT_TRUE(HasInterventionReportsAfterFlush(ad_frame)); EXPECT_TRUE(HasInterventionReportsAfterFlush(ad_frame));
EXPECT_EQ(kInterventionMessage, PopLastInterventionReportMessage()); EXPECT_EQ(kInterventionMessage, PopLastInterventionReportMessage());
...@@ -2345,7 +2345,7 @@ TEST_F(AdsPageLoadMetricsObserverTest, ...@@ -2345,7 +2345,7 @@ TEST_F(AdsPageLoadMetricsObserverTest,
const char kReportOnlyMessage[] = const char kReportOnlyMessage[] =
"Ad was removed because its " "Ad was removed because its "
"total CPU usage exceeded the limit. " "total CPU usage exceeded the limit. "
"See https://www.chromestatus.com/feature/4800491902992384"; "See https://www.chromestatus.com/feature/4800491902992384?utm_source=devtools";
EXPECT_TRUE(HasInterventionReportsAfterFlush(ad_frame)); EXPECT_TRUE(HasInterventionReportsAfterFlush(ad_frame));
histogram_tester().ExpectUniqueSample( histogram_tester().ExpectUniqueSample(
SuffixedHistogram("HeavyAds.InterventionType2"), SuffixedHistogram("HeavyAds.InterventionType2"),
...@@ -2826,7 +2826,7 @@ TEST_F(AdsPageLoadMetricsObserverTest, ...@@ -2826,7 +2826,7 @@ TEST_F(AdsPageLoadMetricsObserverTest,
const char kReportOnlyMessage[] = const char kReportOnlyMessage[] =
"A future version of Chrome may remove this ad because its network " "A future version of Chrome may remove this ad because its network "
"usage exceeded the limit. " "usage exceeded the limit. "
"See https://www.chromestatus.com/feature/4800491902992384"; "See https://www.chromestatus.com/feature/4800491902992384?utm_source=devtools";
EXPECT_TRUE(HasInterventionReportsAfterFlush(ad_frame)); EXPECT_TRUE(HasInterventionReportsAfterFlush(ad_frame));
EXPECT_EQ(kReportOnlyMessage, PopLastInterventionReportMessage()); EXPECT_EQ(kReportOnlyMessage, PopLastInterventionReportMessage());
......
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