Commit 6f6b3cce authored by Fergal Daly's avatar Fergal Daly Committed by Commit Bot

Disable bfcache for SmsServiceTest.RecordMetricsFor{New,Existing}Page

These tests depend on the page not going into the cache.

Bug: 1029248
Change-Id: Ie13a0cdd4f01bcb1c3bde3004708dd78ccdfe8d7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1943708
Commit-Queue: Fergal Daly <fergal@chromium.org>
Reviewed-by: default avatarAlexander Timin <altimin@chromium.org>
Reviewed-by: default avatarAyu Ishii <ayui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#721395}
parent 9f1c5835
......@@ -651,6 +651,9 @@ TEST_F(SmsServiceTest, RecordMetricsForCancelOnSuccess) {
}
TEST_F(SmsServiceTest, RecordMetricsForNewPage) {
// This test depends on the page being destroyed on navigation.
web_contents()->GetController().GetBackForwardCache().DisableForTesting(
content::BackForwardCache::TEST_ASSUMES_NO_CACHING);
NavigateAndCommit(GURL(kTestUrl));
NiceMock<MockSmsWebContentsDelegate> delegate;
WebContentsImpl* web_contents_impl =
......@@ -727,6 +730,9 @@ TEST_F(SmsServiceTest, RecordMetricsForSamePage) {
}
TEST_F(SmsServiceTest, RecordMetricsForExistingPage) {
// This test depends on the page being destroyed on navigation.
web_contents()->GetController().GetBackForwardCache().DisableForTesting(
content::BackForwardCache::TEST_ASSUMES_NO_CACHING);
NavigateAndCommit(GURL(kTestUrl)); // Add to history.
NavigateAndCommit(GURL("https://example.com"));
......
# These tests currently fail when run with --enable-features=BackForwardCache
# https://crbug.com/1029248
# Need investigation.
-SmsServiceTest.RecordMetricsForNewPage
-SmsServiceTest.RecordMetricsForExistingPage
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