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

Issue 1905873002: Add content_browsertests for testing cache control flags (Closed)

Created:
4 years, 8 months ago by Takashi Toyoshima
Modified:
4 years, 7 months ago
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews+fetch_chromium.org, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add content_browsertests for testing cache control flags Now Blink inserts "Cache-Control: max-age=0" header for resource revalidation. But we also use WebCachePolicy::ValidatingCacheData in such cases so that //net uses "max-age=0". So we can safely remove this insertion from Blink, and it would help to avoid unexpected cache control flag mismatches. Before making actual changes, submit some content_browsertests that check cache control flags to avoid unexpected breakages. These tests will be useful for other changes, e.g. pull-to-refresh new behavior, and so on. BUG=602900, 558829 TEST=content_browsertests --gtest_filter='ReloadCacheControlBrowserTest.*' NOTRY=true # to skip unrelated failure on win_chromium_compile_dbg_ng Committed: https://crrev.com/e5aaf6a00745888f8fb79c8eec9b01d53f6436c7 Cr-Commit-Position: refs/heads/master@{#394356}

Patch Set 1 #

Patch Set 2 : add content_browsertests #

Patch Set 3 : comments #

Patch Set 4 : reload.html wasn't there #

Total comments: 10

Patch Set 5 : review #13 #

Total comments: 5

Patch Set 6 : rebase #

Patch Set 7 : remove ResourceFetcher change temporarily, fix a nit of #19 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -6 lines) Patch
A content/browser/loader/reload_cache_control_browsertest.cc View 1 2 3 4 1 chunk +109 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/public/test/content_browser_test_utils.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/public/test/content_browser_test_utils.cc View 1 1 chunk +11 lines, -0 lines 0 comments Download
M content/shell/browser/shell.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/shell/browser/shell.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
A content/test/data/loader/empty16x16.png View 1 Binary file 0 comments Download
A + content/test/data/loader/reload.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M net/test/embedded_test_server/embedded_test_server.h View 1 2 3 4 5 3 chunks +9 lines, -1 line 0 comments Download
M net/test/embedded_test_server/embedded_test_server.cc View 1 2 3 4 5 6 2 chunks +14 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 51 (24 generated)
Takashi Toyoshima
Hi, can you take a look? I may miss something, but I think this has ...
4 years, 8 months ago (2016-04-21 06:54:18 UTC) #3
Yoav Weiss
On 2016/04/21 06:54:18, toyoshim wrote: > Hi, can you take a look? I may miss ...
4 years, 8 months ago (2016-04-24 11:16:51 UTC) #4
Takashi Toyoshima
> Does this result in no behavior change? i.e. Does Chrome continue to send > ...
4 years, 8 months ago (2016-04-25 10:25:44 UTC) #5
Takashi Toyoshima
It seems we only have tests for reloading main resource or sub frame in layout ...
4 years, 8 months ago (2016-04-26 04:25:57 UTC) #7
Takashi Toyoshima
+Paweł for test +Kinuko for content Yoav: Sorry for late, but I added some browser ...
4 years, 7 months ago (2016-05-11 09:48:10 UTC) #12
kinuko
the new test itself looks good, but it doesn't really look we're testing what we ...
4 years, 7 months ago (2016-05-12 08:45:05 UTC) #13
Takashi Toyoshima
https://codereview.chromium.org/1905873002/diff/60001/content/browser/loader/reload_cache_control_browsertest.cc File content/browser/loader/reload_cache_control_browsertest.cc (right): https://codereview.chromium.org/1905873002/diff/60001/content/browser/loader/reload_cache_control_browsertest.cc#newcode41 content/browser/loader/reload_cache_control_browsertest.cc:41: ~ReloadCacheControlBrowserTest() override {} On 2016/05/12 08:45:05, kinuko wrote: > ...
4 years, 7 months ago (2016-05-13 05:27:13 UTC) #14
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1905873002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1905873002/80001
4 years, 7 months ago (2016-05-13 05:47:21 UTC) #16
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-13 06:56:00 UTC) #18
Paweł Hajdan Jr.
LGTM w/nit https://codereview.chromium.org/1905873002/diff/80001/net/test/embedded_test_server/embedded_test_server.cc File net/test/embedded_test_server/embedded_test_server.cc (right): https://codereview.chromium.org/1905873002/diff/80001/net/test/embedded_test_server/embedded_test_server.cc#newcode173 net/test/embedded_test_server/embedded_test_server.cc:173: for (const auto& handler : request_monitors_) nit: ...
4 years, 7 months ago (2016-05-13 10:37:08 UTC) #19
kinuko
Thanks for making sure the test code actually goes through the changes! lgtm https://codereview.chromium.org/1905873002/diff/80001/content/browser/service_worker/service_worker_browsertest.cc File ...
4 years, 7 months ago (2016-05-13 14:10:18 UTC) #20
kinuko
https://codereview.chromium.org/1905873002/diff/80001/content/browser/service_worker/service_worker_browsertest.cc File content/browser/service_worker/service_worker_browsertest.cc (right): https://codereview.chromium.org/1905873002/diff/80001/content/browser/service_worker/service_worker_browsertest.cc#newcode1171 content/browser/service_worker/service_worker_browsertest.cc:1171: ASSERT_TRUE(cross_origin_server.Start()); On 2016/05/13 14:10:18, kinuko wrote: > nit: this ...
4 years, 7 months ago (2016-05-13 14:11:57 UTC) #21
Takashi Toyoshima
Changes related to WARN_UNUSED_RESULT was split to https://codereview.chromium.org/1979173002/. I will rebase this change with addressing ...
4 years, 7 months ago (2016-05-16 04:08:57 UTC) #22
hiroshige
ResourceRequest's http headers are observable in Blink (while the header added in net// layer is ...
4 years, 7 months ago (2016-05-17 08:50:33 UTC) #23
Takashi Toyoshima
Because the test is also useful for other changes that I'm currently working on in ...
4 years, 7 months ago (2016-05-18 03:46:51 UTC) #24
Takashi Toyoshima
https://codereview.chromium.org/1905873002/diff/80001/net/test/embedded_test_server/embedded_test_server.cc File net/test/embedded_test_server/embedded_test_server.cc (right): https://codereview.chromium.org/1905873002/diff/80001/net/test/embedded_test_server/embedded_test_server.cc#newcode173 net/test/embedded_test_server/embedded_test_server.cc:173: for (const auto& handler : request_monitors_) On 2016/05/13 10:37:08, ...
4 years, 7 months ago (2016-05-18 03:56:37 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1905873002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1905873002/120001
4 years, 7 months ago (2016-05-18 03:57:13 UTC) #28
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/192151)
4 years, 7 months ago (2016-05-18 05:03:25 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1905873002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1905873002/120001
4 years, 7 months ago (2016-05-18 05:09:30 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/192178)
4 years, 7 months ago (2016-05-18 06:00:22 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1905873002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1905873002/120001
4 years, 7 months ago (2016-05-18 06:13:10 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/192237)
4 years, 7 months ago (2016-05-18 06:39:17 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1905873002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1905873002/120001
4 years, 7 months ago (2016-05-18 06:55:53 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/192284)
4 years, 7 months ago (2016-05-18 07:55:07 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1905873002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1905873002/120001
4 years, 7 months ago (2016-05-18 08:04:10 UTC) #47
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 7 months ago (2016-05-18 08:08:03 UTC) #49
commit-bot: I haz the power
4 years, 7 months ago (2016-05-18 08:09:29 UTC) #51
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/e5aaf6a00745888f8fb79c8eec9b01d53f6436c7
Cr-Commit-Position: refs/heads/master@{#394356}

Powered by Google App Engine
This is Rietveld 408576698