New issue
Advanced search Search tips

Issue 879494 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 17
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 812168



Sign in to add a comment

Add tests for siteIsolated code caches

Project Member Reported by mythria@chromium.org, Aug 31

Issue description

Add tests for siteIsolated code caches.
1. Add end-to-end tests that test siteIsolated code caches.
2. Add unit tests to test the logic in ResourceLoader (especially of deferring the WebURLLoader while waiting for the code cache response).


 
Blocking: 812168
Owner: mythria@chromium.org
Status: Assigned (was: Available)
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Oct 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2ae6a697421522b1d11393a4b90e910675b9cf15

commit 2ae6a697421522b1d11393a4b90e910675b9cf15
Author: Mythri Alle <mythria@chromium.org>
Date: Wed Oct 31 10:24:45 2018

Add layout tests for javascript code caching.

This add layout tests to ensure javascript code caching is working as
expected. This also adds virtual tests with (
--enable-features=IsolatedCodeCache --site-per-process) to test that the
isolated code cache is behaving as expected. These tests test that:
1. code cache is created on the second visit to the script
2. code cache is consumed on the third visit to the script
3. code cache for the same script resource is not reused if
requested from a different origin (for the virtual tests).

Bug:  chromium:879494 
Change-Id: I05f92fa129dac2419c84fcc65e9d0c684b9d48e2
Reviewed-on: https://chromium-review.googlesource.com/c/1297363
Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604199}
[modify] https://crrev.com/2ae6a697421522b1d11393a4b90e910675b9cf15/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/2ae6a697421522b1d11393a4b90e910675b9cf15/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt
[add] https://crrev.com/2ae6a697421522b1d11393a4b90e910675b9cf15/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test.js
[add] https://crrev.com/2ae6a697421522b1d11393a4b90e910675b9cf15/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test-expected.txt
[add] https://crrev.com/2ae6a697421522b1d11393a4b90e910675b9cf15/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test.js
[add] https://crrev.com/2ae6a697421522b1d11393a4b90e910675b9cf15/third_party/WebKit/LayoutTests/http/tests/devtools/resources/test-page-v8-code-cache.html
[add] https://crrev.com/2ae6a697421522b1d11393a4b90e910675b9cf15/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/README.txt
[add] https://crrev.com/2ae6a697421522b1d11393a4b90e910675b9cf15/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt
[add] https://crrev.com/2ae6a697421522b1d11393a4b90e910675b9cf15/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/same-origin-test-expected.txt

We now have end-to-end tests and unit tests for resource_loader logic. We already have unit tests for GeneratedCodeCache. The only tests that are missing now are for the CodeCacheHostImpl, where we reject requests from certain origins or invalid urls. 
Project Member

Comment 6 by bugdroid1@chromium.org, Oct 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/44891f48f398ec191f203ca558c9814adab4404f

commit 44891f48f398ec191f203ca558c9814adab4404f
Author: Mythri Alle <mythria@chromium.org>
Date: Wed Oct 31 11:59:54 2018

Add tests for code cache fetch logic in ResourceLoader

Add tests for the defering logic in the code cache fetch.

Bug: chromium:812168,  chromium:879494 
Change-Id: Iac88631b4b5df3d13e327f2642f45fb285d2659f
Reviewed-on: https://chromium-review.googlesource.com/c/1209484
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604216}
[modify] https://crrev.com/44891f48f398ec191f203ca558c9814adab4404f/third_party/blink/renderer/platform/loader/BUILD.gn
[add] https://crrev.com/44891f48f398ec191f203ca558c9814adab4404f/third_party/blink/renderer/platform/loader/fetch/resource_loader_defer_loading_test.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Oct 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7d0a7a24768e4b2c5314bfa24951635d59a6207b

commit 7d0a7a24768e4b2c5314bfa24951635d59a6207b
Author: Ioana Pandele <ioanap@chromium.org>
Date: Wed Oct 31 12:48:26 2018

Revert "Add layout tests for javascript code caching."

This reverts commit 2ae6a697421522b1d11393a4b90e910675b9cf15.

Reason for revert: The following tests fail on WebKit Linux Trusty MSAN
* http/tests/devtools/isolated-code-cache/same-origin-test.js 
* virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/same-origin-test.js 

Original change's description:
> Add layout tests for javascript code caching.
> 
> This add layout tests to ensure javascript code caching is working as
> expected. This also adds virtual tests with (
> --enable-features=IsolatedCodeCache --site-per-process) to test that the
> isolated code cache is behaving as expected. These tests test that:
> 1. code cache is created on the second visit to the script
> 2. code cache is consumed on the third visit to the script
> 3. code cache for the same script resource is not reused if
> requested from a different origin (for the virtual tests).
> 
> Bug:  chromium:879494 
> Change-Id: I05f92fa129dac2419c84fcc65e9d0c684b9d48e2
> Reviewed-on: https://chromium-review.googlesource.com/c/1297363
> Reviewed-by: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#604199}

TBR=kozyatinskiy@chromium.org,mythria@chromium.org

Change-Id: I7169c097989e642fb5296d19965b162e256b6507
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  chromium:879494 
Reviewed-on: https://chromium-review.googlesource.com/c/1309740
Reviewed-by: Ioana Pandele <ioanap@chromium.org>
Commit-Queue: Ioana Pandele <ioanap@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604226}
[modify] https://crrev.com/7d0a7a24768e4b2c5314bfa24951635d59a6207b/third_party/WebKit/LayoutTests/VirtualTestSuites
[delete] https://crrev.com/e808baa39dcf75383dfdbec70d321139db6ecfde/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt
[delete] https://crrev.com/e808baa39dcf75383dfdbec70d321139db6ecfde/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test.js
[delete] https://crrev.com/e808baa39dcf75383dfdbec70d321139db6ecfde/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test-expected.txt
[delete] https://crrev.com/e808baa39dcf75383dfdbec70d321139db6ecfde/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test.js
[delete] https://crrev.com/e808baa39dcf75383dfdbec70d321139db6ecfde/third_party/WebKit/LayoutTests/http/tests/devtools/resources/test-page-v8-code-cache.html
[delete] https://crrev.com/e808baa39dcf75383dfdbec70d321139db6ecfde/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/README.txt
[delete] https://crrev.com/e808baa39dcf75383dfdbec70d321139db6ecfde/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt
[delete] https://crrev.com/e808baa39dcf75383dfdbec70d321139db6ecfde/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/same-origin-test-expected.txt

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3e7d4477e7d92a0ba0306da233584be397fdc9b2

commit 3e7d4477e7d92a0ba0306da233584be397fdc9b2
Author: Mythri Alle <mythria@chromium.org>
Date: Thu Nov 08 14:01:46 2018

Reland: Add layout tests for javascript code caching.

This add layout tests to ensure javascript code caching is working as
expected. This also adds virtual tests with (
--enable-features=IsolatedCodeCache --site-per-process) to test that the
isolated code cache is behaving as expected. These tests test that:
1. code cache is created on the second visit to the script
2. code cache is consumed on the third visit to the script
3. code cache for the same script resource is not reused if
requested from a different origin (for the virtual tests).

This also adds a timeout expectation for the failing tests.

Bug:  chromium:879494 
Change-Id: I4504da0fb0222f73bbf12e93d85e12a0717f8749
Reviewed-on: https://chromium-review.googlesource.com/c/1310173
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: Alexei Filippov <alph@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606455}
[modify] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/MSANExpectations
[modify] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/SlowTests
[modify] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt
[add] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test.js
[add] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test-expected.txt
[add] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test.js
[add] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/http/tests/devtools/resources/test-page-v8-code-cache.html
[add] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/README.txt
[add] https://crrev.com/3e7d4477e7d92a0ba0306da233584be397fdc9b2/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt

Project Member

Comment 9 by bugdroid1@chromium.org, Nov 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8b5fc6f99f2df772e716ada06dbaf1d89b5395b7

commit 8b5fc6f99f2df772e716ada06dbaf1d89b5395b7
Author: Mythri Alle <mythria@chromium.org>
Date: Thu Nov 08 16:19:37 2018

Revert "Reland: Add layout tests for javascript code caching."

This reverts commit 3e7d4477e7d92a0ba0306da233584be397fdc9b2.

Reason for revert: Failing on https://luci-milo.appspot.com/p/chromium/builders/luci.chromium.ci/linux-xenial-rel/4786

Original change's description:
> Reland: Add layout tests for javascript code caching.
> 
> This add layout tests to ensure javascript code caching is working as
> expected. This also adds virtual tests with (
> --enable-features=IsolatedCodeCache --site-per-process) to test that the
> isolated code cache is behaving as expected. These tests test that:
> 1. code cache is created on the second visit to the script
> 2. code cache is consumed on the third visit to the script
> 3. code cache for the same script resource is not reused if
> requested from a different origin (for the virtual tests).
> 
> This also adds a timeout expectation for the failing tests.
> 
> Bug:  chromium:879494 
> Change-Id: I4504da0fb0222f73bbf12e93d85e12a0717f8749
> Reviewed-on: https://chromium-review.googlesource.com/c/1310173
> Commit-Queue: Mythri Alle <mythria@chromium.org>
> Reviewed-by: Alexei Filippov <alph@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#606455}

TBR=alph@chromium.org,mythria@chromium.org

Change-Id: Ib60eda1642334b6fa08f89d8f19cf4c262815f5e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  chromium:879494 
Reviewed-on: https://chromium-review.googlesource.com/c/1326510
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606489}
[modify] https://crrev.com/8b5fc6f99f2df772e716ada06dbaf1d89b5395b7/third_party/WebKit/LayoutTests/MSANExpectations
[modify] https://crrev.com/8b5fc6f99f2df772e716ada06dbaf1d89b5395b7/third_party/WebKit/LayoutTests/SlowTests
[modify] https://crrev.com/8b5fc6f99f2df772e716ada06dbaf1d89b5395b7/third_party/WebKit/LayoutTests/VirtualTestSuites
[delete] https://crrev.com/3fef50b883ddc88a684b8f1eb4106097e1889078/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt
[delete] https://crrev.com/3fef50b883ddc88a684b8f1eb4106097e1889078/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test.js
[delete] https://crrev.com/3fef50b883ddc88a684b8f1eb4106097e1889078/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test-expected.txt
[delete] https://crrev.com/3fef50b883ddc88a684b8f1eb4106097e1889078/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test.js
[delete] https://crrev.com/3fef50b883ddc88a684b8f1eb4106097e1889078/third_party/WebKit/LayoutTests/http/tests/devtools/resources/test-page-v8-code-cache.html
[delete] https://crrev.com/3fef50b883ddc88a684b8f1eb4106097e1889078/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/README.txt
[delete] https://crrev.com/3fef50b883ddc88a684b8f1eb4106097e1889078/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt

Project Member

Comment 10 by bugdroid1@chromium.org, Nov 15

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b29ba5859fdc6204df7c3386f360971c54601579

commit b29ba5859fdc6204df7c3386f360971c54601579
Author: Mythri Alle <mythria@chromium.org>
Date: Thu Nov 15 20:11:59 2018

Reland^2: Add layout tests for javascript code caching.

This add layout tests to ensure javascript code caching is working as
expected. This also adds virtual tests with (
--enable-features=IsolatedCodeCache --site-per-process) to test that the
isolated code cache is behaving as expected. These tests test that:
1. code cache is created on the second visit to the script
2. code cache is consumed on the third visit to the script
3. code cache for the same script resource is not reused if
requested from a different origin (for the virtual tests).

This also adds a timeout expectation for the failing tests.

Bug:  chromium:879494 
Change-Id: I4b5b4cdce1f9dbccf31ba24f5efee2683b5a0579
Reviewed-on: https://chromium-review.googlesource.com/c/1329561
Reviewed-by: Mythri Alle <mythria@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Mythri Alle <mythria@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608486}
[modify] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/MSANExpectations
[modify] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/SlowTests
[modify] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/VirtualTestSuites
[add] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt
[add] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/cross-origin-test.js
[add] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test-expected.txt
[add] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/http/tests/devtools/isolated-code-cache/same-origin-test.js
[add] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/http/tests/devtools/resources/test-page-v8-code-cache.html
[add] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/README.txt
[add] https://crrev.com/b29ba5859fdc6204df7c3386f360971c54601579/third_party/WebKit/LayoutTests/virtual/site-isolated-code-cache/http/tests/devtools/isolated-code-cache/cross-origin-test-expected.txt

Status: Fixed (was: Started)

Sign in to add a comment