Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6080)

Unified Diff: content/browser/loader/reload_cache_control_browsertest.cc

Issue 2863683003: PlzNavigate: Fix wrong "Cache-Control" header. (Closed)
Patch Set: Add TODO Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/loader/reload_cache_control_browsertest.cc
diff --git a/content/browser/loader/reload_cache_control_browsertest.cc b/content/browser/loader/reload_cache_control_browsertest.cc
index f2208d0add8ff17d0708460762c39c0ce3643fed..148436d3f996bb8ef2e60ed9bb6168bd22d8f2a1 100644
--- a/content/browser/loader/reload_cache_control_browsertest.cc
+++ b/content/browser/loader/reload_cache_control_browsertest.cc
@@ -157,20 +157,14 @@ IN_PROC_BROWSER_TEST_F(ReloadCacheControlBrowserTest, NormalReload) {
// Test if bypassing reload issues requests with proper cache control flags.
IN_PROC_BROWSER_TEST_F(ReloadCacheControlBrowserTest, BypassingReload) {
- // TODO(crbug.com/671545): This test gets to be unstable if browser-side
- // navigation is enabled. This is because we can not ensure which of frame and
- // image requests hits the network first.
- if (IsBrowserSideNavigationEnabled())
- return;
GURL url(embedded_test_server()->GetURL(kReloadTestPath));
- EXPECT_TRUE(NavigateToURL(shell(), url));
- ReloadBypassingCacheBlockUntilNavigationsComplete(shell(), 1);
-
+ NavigateToURLBlockUntilNavigationsComplete(shell(), url, 1);
{
base::AutoLock lock(request_log_lock_);
- ASSERT_EQ(8UL, request_log_.size());
+ ASSERT_EQ(4UL, request_log_.size());
+
EXPECT_EQ(kReloadTestPath, request_log_[0].relative_url);
EXPECT_EQ(kNoCacheControl, request_log_[0].cache_control);
EXPECT_EQ(kReloadImagePath, request_log_[1].relative_url);
@@ -179,6 +173,12 @@ IN_PROC_BROWSER_TEST_F(ReloadCacheControlBrowserTest, BypassingReload) {
EXPECT_EQ(kNoCacheControl, request_log_[2].cache_control);
EXPECT_EQ(kReloadImagePath, request_log_[3].relative_url);
EXPECT_EQ(kNoCacheControl, request_log_[3].cache_control);
+ }
+
+ ReloadBypassingCacheBlockUntilNavigationsComplete(shell(), 1);
+ {
+ base::AutoLock lock(request_log_lock_);
+ ASSERT_EQ(8UL, request_log_.size());
// Only the top main resource should be requested with kNoCacheCacheControl.
EXPECT_EQ(kReloadTestPath, request_log_[4].relative_url);
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/loader/FrameFetchContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698