Make mojo-loading work for the XHR use-case.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/17be6599bb1c41d82b1193ab24ca0173cbe897be commit 17be6599bb1c41d82b1193ab24ca0173cbe897be Author: yhirano <yhirano@chromium.org> Date: Fri Nov 04 05:01:01 2016 [Mojo-Loading] Dispatch body data after response is received MojoAsyncResourceHandler sometimes calls OnStartLoadingResponseBody before calling OnReceiveResponse. On the other hand, Blink doesn't expect onDataRecieved is called before onReceiveResponse. With this CL, URLLoaderClientImpl doesn't start reading the response body until OnReceivedResponse arrives. BUG= 659917 Review-Url: https://codereview.chromium.org/2459483002 Cr-Commit-Position: refs/heads/master@{#429787} [modify] https://crrev.com/17be6599bb1c41d82b1193ab24ca0173cbe897be/content/child/resource_dispatcher.cc [modify] https://crrev.com/17be6599bb1c41d82b1193ab24ca0173cbe897be/content/child/url_response_body_consumer.cc [modify] https://crrev.com/17be6599bb1c41d82b1193ab24ca0173cbe897be/content/child/url_response_body_consumer.h [modify] https://crrev.com/17be6599bb1c41d82b1193ab24ca0173cbe897be/content/child/url_response_body_consumer_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0913b860b23efa2e60e45db579299da6a2618a2a commit 0913b860b23efa2e60e45db579299da6a2618a2a Author: yhirano <yhirano@chromium.org> Date: Fri Nov 04 06:03:54 2016 Add virtual tests for XHR with mojo-loading This CL adds virtual XHR tests with mojo-loading as virtual/mojo-loading/http/tests/xmlhttprequest. Currently there are a lot of failures. We add them to TestExpectations and will fix them later. BUG= 659917 Review-Url: https://codereview.chromium.org/2463753002 Cr-Commit-Position: refs/heads/master@{#429808} [modify] https://crrev.com/0913b860b23efa2e60e45db579299da6a2618a2a/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/0913b860b23efa2e60e45db579299da6a2618a2a/third_party/WebKit/LayoutTests/VirtualTestSuites [rename] https://crrev.com/0913b860b23efa2e60e45db579299da6a2618a2a/third_party/WebKit/LayoutTests/virtual/mojo-loading/http/tests/xmlhttprequest/README.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e534e155454891adab9362f55373644e17f76ea2 commit e534e155454891adab9362f55373644e17f76ea2 Author: mkwst <mkwst@chromium.org> Date: Fri Nov 04 11:18:08 2016 Revert of Add virtual tests for XHR with mojo-loading (patchset #3 id:40001 of https://codereview.chromium.org/2463753002/ ) Reason for revert: This patch revealed some ASAN and MSAN failures: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Precise%20ASAN/builds/882 and https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Linux%20Precise%20MSAN/builds/863. Reverting for now, please take a look. Original issue's description: > Add virtual tests for XHR with mojo-loading > > This CL adds virtual XHR tests with mojo-loading as > virtual/mojo-loading/http/tests/xmlhttprequest. Currently there are a lot of > failures. We add them to TestExpectations and will fix them later. > > BUG= 659917 > > Committed: https://crrev.com/0913b860b23efa2e60e45db579299da6a2618a2a > Cr-Commit-Position: refs/heads/master@{#429808} TBR=tzik@chromium.org,yhirano@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 659917 Review-Url: https://codereview.chromium.org/2477673004 Cr-Commit-Position: refs/heads/master@{#429856} [modify] https://crrev.com/e534e155454891adab9362f55373644e17f76ea2/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/e534e155454891adab9362f55373644e17f76ea2/third_party/WebKit/LayoutTests/VirtualTestSuites [rename] https://crrev.com/e534e155454891adab9362f55373644e17f76ea2/third_party/WebKit/LayoutTests/virtual/mojo-loading/http/tests/xmlhttprequest/web-apps/README.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8026ba04bdc342c02fddee6dc230ac0aca9a1eae commit 8026ba04bdc342c02fddee6dc230ac0aca9a1eae Author: yhirano <yhirano@chromium.org> Date: Wed Nov 09 05:41:39 2016 Add virtual tests for XHR with mojo-loading This CL adds virtual XHR tests with mojo-loading as virtual/mojo-loading/http/tests/xmlhttprequest. Currently there are a lot of failures. We add them to TestExpectations and will fix them later. BUG= 659917 , 662360 Committed: https://crrev.com/0913b860b23efa2e60e45db579299da6a2618a2a Review-Url: https://codereview.chromium.org/2463753002 Cr-Original-Commit-Position: refs/heads/master@{#429808} Cr-Commit-Position: refs/heads/master@{#430874} [modify] https://crrev.com/8026ba04bdc342c02fddee6dc230ac0aca9a1eae/content/child/url_response_body_consumer.cc [modify] https://crrev.com/8026ba04bdc342c02fddee6dc230ac0aca9a1eae/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/8026ba04bdc342c02fddee6dc230ac0aca9a1eae/third_party/WebKit/LayoutTests/VirtualTestSuites [rename] https://crrev.com/8026ba04bdc342c02fddee6dc230ac0aca9a1eae/third_party/WebKit/LayoutTests/virtual/mojo-loading/http/tests/xmlhttprequest/README.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/83cd4c25b6cc96731b0f028a5b71baf2d3a74dd5 commit 83cd4c25b6cc96731b0f028a5b71baf2d3a74dd5 Author: lukasza <lukasza@chromium.org> Date: Wed Nov 09 17:54:57 2016 Revert of Add virtual tests for XHR with mojo-loading (patchset #9 id:160001 of https://codereview.chromium.org/2463753002/ ) Reason for revert: The new tests fail when OOPIFs (out of process iframes / aka remote frames) are possible and turn the Site Isolation Win bot red. Most likely failure modes differ between --site-per-process mode and the expectations landed in this CL in third_party/WebKit/LayoutTests/TestExpectations (so maybe the experimental feature needs to also maintain a separate set of test expectations in third_party/WebKit/LayoutTests/FlagExpectations/site-per-process). Example red build: https://build.chromium.org/p/chromium.fyi/builders/Site%20Isolation%20Win/builds/16899 Original issue's description: > Add virtual tests for XHR with mojo-loading > > This CL adds virtual XHR tests with mojo-loading as > virtual/mojo-loading/http/tests/xmlhttprequest. Currently there are a lot of > failures. We add them to TestExpectations and will fix them later. > > BUG= 659917 , 662360 > > Committed: https://crrev.com/0913b860b23efa2e60e45db579299da6a2618a2a > Committed: https://crrev.com/8026ba04bdc342c02fddee6dc230ac0aca9a1eae > Cr-Original-Commit-Position: refs/heads/master@{#429808} > Cr-Commit-Position: refs/heads/master@{#430874} TBR=tzik@chromium.org,nasko@chromium.org,yhirano@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 659917 , 662360 Review-Url: https://codereview.chromium.org/2493503002 Cr-Commit-Position: refs/heads/master@{#430970} [modify] https://crrev.com/83cd4c25b6cc96731b0f028a5b71baf2d3a74dd5/content/child/url_response_body_consumer.cc [modify] https://crrev.com/83cd4c25b6cc96731b0f028a5b71baf2d3a74dd5/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/83cd4c25b6cc96731b0f028a5b71baf2d3a74dd5/third_party/WebKit/LayoutTests/VirtualTestSuites [rename] https://crrev.com/83cd4c25b6cc96731b0f028a5b71baf2d3a74dd5/third_party/WebKit/LayoutTests/virtual/mojo-loading/http/tests/xmlhttprequest/web-apps/README.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a474c91a2696cbb9cd57b6462e2252e7db6afd78 commit a474c91a2696cbb9cd57b6462e2252e7db6afd78 Author: yhirano <yhirano@chromium.org> Date: Thu Nov 10 05:57:45 2016 Add virtual tests for XHR with mojo-loading This CL adds virtual XHR tests with mojo-loading as virtual/mojo-loading/http/tests/xmlhttprequest. Currently there are a lot of failures. We add them to TestExpectations and will fix them later. BUG= 659917 , 662360 Committed: https://crrev.com/0913b860b23efa2e60e45db579299da6a2618a2a Committed: https://crrev.com/8026ba04bdc342c02fddee6dc230ac0aca9a1eae Review-Url: https://codereview.chromium.org/2463753002 Cr-Original-Original-Commit-Position: refs/heads/master@{#429808} Cr-Original-Commit-Position: refs/heads/master@{#430874} Cr-Commit-Position: refs/heads/master@{#431191} [modify] https://crrev.com/a474c91a2696cbb9cd57b6462e2252e7db6afd78/content/child/url_response_body_consumer.cc [modify] https://crrev.com/a474c91a2696cbb9cd57b6462e2252e7db6afd78/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process [modify] https://crrev.com/a474c91a2696cbb9cd57b6462e2252e7db6afd78/third_party/WebKit/LayoutTests/TestExpectations [modify] https://crrev.com/a474c91a2696cbb9cd57b6462e2252e7db6afd78/third_party/WebKit/LayoutTests/VirtualTestSuites [rename] https://crrev.com/a474c91a2696cbb9cd57b6462e2252e7db6afd78/third_party/WebKit/LayoutTests/virtual/mojo-loading/http/tests/xmlhttprequest/README.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/176c99dded39646185359db261f15b7eaef9b558 commit 176c99dded39646185359db261f15b7eaef9b558 Author: yhirano <yhirano@chromium.org> Date: Mon Nov 14 05:03:57 2016 Fix virtual/mojo-loading test expecations Based on the flakiness dashboard, some tests are not flaky. I also added some newly found flaky tests and relabeled existing ones. BUG= 659917 , 420240, 664874 Review-Url: https://codereview.chromium.org/2499893002 Cr-Commit-Position: refs/heads/master@{#431832} [modify] https://crrev.com/176c99dded39646185359db261f15b7eaef9b558/third_party/WebKit/LayoutTests/LeakExpectations [modify] https://crrev.com/176c99dded39646185359db261f15b7eaef9b558/third_party/WebKit/LayoutTests/SlowTests [modify] https://crrev.com/176c99dded39646185359db261f15b7eaef9b558/third_party/WebKit/LayoutTests/TestExpectations
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1a8d96b6418a9dda53ef147a95ef721ad5daaa6e commit 1a8d96b6418a9dda53ef147a95ef721ad5daaa6e Author: yhirano <yhirano@chromium.org> Date: Tue Nov 15 09:13:18 2016 Add expectations on virtual/mojo-loading tests whose base tests have expectations If a test X has a TestExpecation entry, virtual/mojo-loading/X should have an entry as well. BUG= 659917 , 520194 , 518987, 446385, 665165 Review-Url: https://codereview.chromium.org/2502913002 Cr-Commit-Position: refs/heads/master@{#432150} [modify] https://crrev.com/1a8d96b6418a9dda53ef147a95ef721ad5daaa6e/third_party/WebKit/LayoutTests/TestExpectations
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06 commit 47a9f9bc844919d1bcdbf27a2a28256b1f40dd06 Author: tzik <tzik@chromium.org> Date: Thu Dec 01 04:16:24 2016 Fix and refactor downloaded file handling in the loading stack In download_to_file mode of resource loading, the resource handler needs to call ResourceDispatcherHostImpl::RegisterDownloadedTempFile when the file is created, and needs to call UnregisterDownloadedTempFile after the client handles the file. Otherwise, the file is deleted before the client uses it. However, MojoAsyncResourceHandler doesn't call them, and that causes layout test failure around XHR with responseType = 'blob'. This CL fixes that by adding the RDTF and UDTF pair, and refactors similar code in AsyncResourceHandler to share the same lifetime management of the downloaded file in ResourceDispatcherHostImpl. BUG= 603396 , 659917 Review-Url: https://codereview.chromium.org/2503813002 Cr-Commit-Position: refs/heads/master@{#435551} [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/browser/BUILD.gn [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/browser/loader/DEPS [add] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/browser/loader/downloaded_temp_file_impl.cc [add] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/browser/loader/downloaded_temp_file_impl.h [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/browser/loader/mojo_async_resource_handler.cc [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/browser/loader/resource_dispatcher_host_unittest.cc [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/browser/loader/test_url_loader_client.cc [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/browser/loader/test_url_loader_client.h [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/browser/service_worker/service_worker_fetch_dispatcher.cc [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/child/resource_dispatcher.cc [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/common/url_loader.mojom [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/content/renderer/service_worker/service_worker_context_client.cc [modify] https://crrev.com/47a9f9bc844919d1bcdbf27a2a28256b1f40dd06/third_party/WebKit/LayoutTests/TestExpectations
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/72cccfd03d6cad21c8ea4865150640546b576ea5 commit 72cccfd03d6cad21c8ea4865150640546b576ea5 Author: jbroman <jbroman@chromium.org> Date: Thu Dec 01 16:48:57 2016 Mark virtual/mojo-loading/http/tests/xmlhttprequest/workers/xmlhttprequest-response-type-blob-sync.html as flaky timeout. https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=virtual%2Fmojo-loading%2Fhttp%2Ftests%2Fxmlhttprequest%2Fworkers%2Fxmlhttprequest-response-type-blob-sync.html BUG= 659917 TBR=yhirano@chromium.org NOTRY=true Review-Url: https://codereview.chromium.org/2542923002 Cr-Commit-Position: refs/heads/master@{#435627} [modify] https://crrev.com/72cccfd03d6cad21c8ea4865150640546b576ea5/third_party/WebKit/LayoutTests/TestExpectations
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ad9cfb8a5ee311634eeee9f7e7fc924d4850ab9b commit ad9cfb8a5ee311634eeee9f7e7fc924d4850ab9b Author: jbroman <jbroman@chromium.org> Date: Thu Dec 01 19:01:02 2016 Mark virtual/mojo-loading/http/tests/xmlhttprequest/workers/shared-worker-response-type-blob-sync.html as flaky timeout. https://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=virtual%2Fmojo-loading%2Fhttp%2Ftests%2Fxmlhttprequest%2Fworkers%2Fshared-worker-response-type-blob-sync.html&testType=webkit_tests BUG= 659917 TBR=yhirano@chromium.org NOTRY=true Review-Url: https://codereview.chromium.org/2548563002 Cr-Commit-Position: refs/heads/master@{#435665} [modify] https://crrev.com/ad9cfb8a5ee311634eeee9f7e7fc924d4850ab9b/third_party/WebKit/LayoutTests/TestExpectations
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/052254d94f2af8d269705d49244d21af853f8d98 commit 052254d94f2af8d269705d49244d21af853f8d98 Author: jbroman <jbroman@chromium.org> Date: Fri Dec 02 21:13:29 2016 Mark virtual/mojo-loading/http/tests/xmlhttprequest/workers/xmlhttprequest-response-type-blob.html as flaky timeout. BUG= 659917 , 670562 TBR=yhirano@chromium.org NOTRY=true Review-Url: https://codereview.chromium.org/2547983002 Cr-Commit-Position: refs/heads/master@{#436018} [modify] https://crrev.com/052254d94f2af8d269705d49244d21af853f8d98/third_party/WebKit/LayoutTests/TestExpectations
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/87b4909c6ee7669e0eb59be83276f17c41f5f592 commit 87b4909c6ee7669e0eb59be83276f17c41f5f592 Author: shimazu <shimazu@chromium.org> Date: Thu Dec 22 06:35:18 2016 Mark shared-worker-response-type-blob.html as flaky BUG= 659917 TBR=tzik@chromium.org Review-Url: https://codereview.chromium.org/2599673002 Cr-Commit-Position: refs/heads/master@{#440348} [modify] https://crrev.com/87b4909c6ee7669e0eb59be83276f17c41f5f592/third_party/WebKit/LayoutTests/TestExpectations
Apologies, applied the wrong component in bulk.
Comment 1 by bugdroid1@chromium.org
, Nov 4 2016