Commit 90f984d6 authored by Cammie Smith Barnes's avatar Cammie Smith Barnes Committed by Commit Bot

Split cache: Add early return for push tests broken by split cache.

It is a known limitation that http cache lookup based on a push will not
be supported when split cache is enabled because the network isolation
key (top frame origin, frame origin) is not available for such a request.

We add an early return to the following three previously failing tests
in the suite HttpCacheLookupManagerTest*:
ServerPushHitCache
ServerPushLookupOnUrl
ServerPushPendingLookup

Bug: 1009619
Change-Id: I48b3e5d89c3b6228d189da9daa4e5714ad1e1602
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1853825Reviewed-by: default avatarShivani Sharma <shivanisha@chromium.org>
Commit-Queue: Cammie Smith Barnes <cammie@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704778}
parent fc36b9f5
...@@ -5,8 +5,10 @@ ...@@ -5,8 +5,10 @@
#include <memory> #include <memory>
#include <string> #include <string>
#include "base/feature_list.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/test/task_environment.h" #include "base/test/task_environment.h"
#include "net/base/features.h"
#include "net/base/net_errors.h" #include "net/base/net_errors.h"
#include "net/base/test_completion_callback.h" #include "net/base/test_completion_callback.h"
#include "net/http/http_cache_lookup_manager.h" #include "net/http/http_cache_lookup_manager.h"
...@@ -135,6 +137,13 @@ TEST(HttpCacheLookupManagerTest, ServerPushDoNotCreateCacheEntry) { ...@@ -135,6 +137,13 @@ TEST(HttpCacheLookupManagerTest, ServerPushDoNotCreateCacheEntry) {
} }
TEST(HttpCacheLookupManagerTest, ServerPushHitCache) { TEST(HttpCacheLookupManagerTest, ServerPushHitCache) {
// Skip test if split cache is enabled, as it breaks push.
// crbug.com/1009619
if (base::FeatureList::IsEnabled(
net::features::kSplitCacheByNetworkIsolationKey)) {
return;
}
base::test::TaskEnvironment task_environment; base::test::TaskEnvironment task_environment;
MockHttpCache mock_cache; MockHttpCache mock_cache;
HttpCacheLookupManager push_delegate(mock_cache.http_cache()); HttpCacheLookupManager push_delegate(mock_cache.http_cache());
...@@ -173,6 +182,13 @@ TEST(HttpCacheLookupManagerTest, ServerPushHitCache) { ...@@ -173,6 +182,13 @@ TEST(HttpCacheLookupManagerTest, ServerPushHitCache) {
// pending lookup transaction for the same URL, the new server push will not // pending lookup transaction for the same URL, the new server push will not
// send a new lookup transaction and should not be canceled. // send a new lookup transaction and should not be canceled.
TEST(HttpCacheLookupManagerTest, ServerPushPendingLookup) { TEST(HttpCacheLookupManagerTest, ServerPushPendingLookup) {
// Skip test if split cache is enabled, as it breaks push.
// crbug.com/1009619
if (base::FeatureList::IsEnabled(
net::features::kSplitCacheByNetworkIsolationKey)) {
return;
}
base::test::TaskEnvironment task_environment; base::test::TaskEnvironment task_environment;
MockHttpCache mock_cache; MockHttpCache mock_cache;
HttpCacheLookupManager push_delegate(mock_cache.http_cache()); HttpCacheLookupManager push_delegate(mock_cache.http_cache());
...@@ -218,6 +234,13 @@ TEST(HttpCacheLookupManagerTest, ServerPushPendingLookup) { ...@@ -218,6 +234,13 @@ TEST(HttpCacheLookupManagerTest, ServerPushPendingLookup) {
// Test the server push lookup is based on the full url. // Test the server push lookup is based on the full url.
TEST(HttpCacheLookupManagerTest, ServerPushLookupOnUrl) { TEST(HttpCacheLookupManagerTest, ServerPushLookupOnUrl) {
// Skip test if split cache is enabled, as it breaks push.
// crbug.com/1009619
if (base::FeatureList::IsEnabled(
net::features::kSplitCacheByNetworkIsolationKey)) {
return;
}
base::test::TaskEnvironment task_environment; base::test::TaskEnvironment task_environment;
MockHttpCache mock_cache; MockHttpCache mock_cache;
HttpCacheLookupManager push_delegate(mock_cache.http_cache()); HttpCacheLookupManager push_delegate(mock_cache.http_cache());
......
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