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

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

Issue 2541363002: Reload Reloaded: remove experimental flag that has been enabled by default (Closed)
Patch Set: Created 4 years 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 | « content/browser/frame_host/navigator_impl_unittest.cc ('k') | content/child/runtime_features.cc » ('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 98352d50194b0eb517848ae37fafed62e3577cd3..5affe6942b66386a7170ea7ad9dda39711ed3f09 100644
--- a/content/browser/loader/reload_cache_control_browsertest.cc
+++ b/content/browser/loader/reload_cache_control_browsertest.cc
@@ -6,9 +6,6 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "base/files/file_path.h"
-#include "base/test/scoped_feature_list.h"
-#include "content/public/common/content_features.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
@@ -39,12 +36,7 @@ struct RequestLog {
class ReloadCacheControlBrowserTest : public ContentBrowserTest {
protected:
- ReloadCacheControlBrowserTest() {
- // TODO(toyoshim): Tests in this file depend on current reload behavior,
- // and should be modified when we enable the new reload behavior.
- scoped_feature_list_.InitAndDisableFeature(
- features::kNonValidatingReloadOnNormalReload);
- }
+ ReloadCacheControlBrowserTest() {}
~ReloadCacheControlBrowserTest() override = default;
void SetUpOnMainThread() override {
@@ -77,29 +69,9 @@ class ReloadCacheControlBrowserTest : public ContentBrowserTest {
request_log_.push_back(log);
}
- base::test::ScopedFeatureList scoped_feature_list_;
-
DISALLOW_COPY_AND_ASSIGN(ReloadCacheControlBrowserTest);
};
-class ReloadCacheControlWithAnExperimentBrowserTest
- : public ReloadCacheControlBrowserTest {
- protected:
- ReloadCacheControlWithAnExperimentBrowserTest() {
- scoped_feature_list_.InitAndEnableFeature(
- features::kNonValidatingReloadOnNormalReload);
- }
- ~ReloadCacheControlWithAnExperimentBrowserTest() override = default;
-
- void SetUpOnMainThread() override {
- SetUpTestServerOnMainThread();
- }
-
- base::test::ScopedFeatureList scoped_feature_list_;
-
- DISALLOW_COPY_AND_ASSIGN(ReloadCacheControlWithAnExperimentBrowserTest);
-};
-
IN_PROC_BROWSER_TEST_F(ReloadCacheControlBrowserTest, NormalReload) {
GURL url(embedded_test_server()->GetURL(kReloadTestPath));
@@ -115,7 +87,7 @@ IN_PROC_BROWSER_TEST_F(ReloadCacheControlBrowserTest, NormalReload) {
EXPECT_EQ(kReloadTestPath, request_log_[2].relative_url);
EXPECT_EQ(kMaxAgeCacheControl, request_log_[2].cache_control);
EXPECT_EQ(kReloadImagePath, request_log_[3].relative_url);
- EXPECT_EQ(kMaxAgeCacheControl, request_log_[3].cache_control);
+ EXPECT_EQ(kNoCacheControl, request_log_[3].cache_control);
}
IN_PROC_BROWSER_TEST_F(ReloadCacheControlBrowserTest, BypassingReload) {
@@ -136,25 +108,6 @@ IN_PROC_BROWSER_TEST_F(ReloadCacheControlBrowserTest, BypassingReload) {
EXPECT_EQ(kNoCacheCacheControl, request_log_[3].cache_control);
}
-IN_PROC_BROWSER_TEST_F(ReloadCacheControlWithAnExperimentBrowserTest,
- ReloadMainResource) {
- GURL url(embedded_test_server()->GetURL(kReloadTestPath));
-
- EXPECT_TRUE(NavigateToURL(shell(), url));
- ReloadBlockUntilNavigationsComplete(shell(), 1);
-
- 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);
- EXPECT_EQ(kNoCacheControl, request_log_[1].cache_control);
-
- EXPECT_EQ(kReloadTestPath, request_log_[2].relative_url);
- EXPECT_EQ(kMaxAgeCacheControl, request_log_[2].cache_control);
- EXPECT_EQ(kReloadImagePath, request_log_[3].relative_url);
- EXPECT_EQ(kNoCacheControl, request_log_[3].cache_control);
-}
-
// TODO(toyoshim): Add another set of reload tests with DevTools open.
} // namespace
« no previous file with comments | « content/browser/frame_host/navigator_impl_unittest.cc ('k') | content/child/runtime_features.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698