New issue
Advanced search Search tips

Issue 607991 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocked on:
issue 610513

Blocking:
issue 477150



Sign in to add a comment

OOPIF support in layout tests harness: MockWebClipboardImpl replication across renderers

Project Member Reported by lukasza@chromium.org, Apr 29 2016

Issue description

Repro:

$ DISPLAY=:20 third_party/WebKit/Tools/Scripts/run-webkit-tests -t gn -v --additional-drt-flag=--site-per-process --additional-drt-flag=--no-sandbox http/tests/misc/copy-resolves-urls.html

In this test case "Copy" is performed in one renderer process, and "Paste" is performed in another renderer process (after navigating the page to a different site).  This leads to trouble with --site-per-process, because the fake clipboard used during the tests is not replicated across the renderers - i.e. the call to MockWebClipboardImpl::writeHTML happens in one renderer process and the calls to MockWebClipboardImpl::readAvailableTypes, isFormatAvailable, readPlainText happen in another renderer process.

Replication is a bit tricky, because MockWebClipboardImpl is implemented in content/test, while replication across renderers (for other layout-test-related state) is happening via LayoutTestRuntimeFlags which is implemented in components/test_runner.

At any rate - this seems like a test issue, so nothing that should impact --isolate-extensions launch.
 

Comment 1 by dcheng@chromium.org, Apr 29 2016

Components: Blink>DataTransfer
Oh dear.
Project Member

Comment 2 by bugdroid1@chromium.org, May 3 2016

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

commit 6bd0f3201a2bc6c1d30dfc8a5a23eeeaedf56e2b
Author: lukasza <lukasza@chromium.org>
Date: Tue May 03 16:26:14 2016

Triaging some of the remaining site-per-process layout test failures.

Most of the changes in this CL just moved test expectations around and
added comments with bug pointers.

One exception is that http/tests/appcache/remove-cache.html expectation
has been removed altogether:
- this test passes on the Site Isolation FYI
- flakiness is already called out in  https://crbug.com/518929 
- locally I see a failure with and without --site-per-process, but since
  the bots are happy we should just remove the exception I think

BUG= 582211 ,  608015 ,  608023 ,  606594 ,  607991 ,  607981 

Review-Url: https://codereview.chromium.org/1931143002
Cr-Commit-Position: refs/heads/master@{#391262}

[modify] https://crrev.com/6bd0f3201a2bc6c1d30dfc8a5a23eeeaedf56e2b/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process

Blockedon: 610513

Comment 4 by sshru...@google.com, May 18 2016

Labels: Test-Layout

Comment 5 by sshru...@google.com, May 18 2016

Components: -Blink>LayoutTests
Deprecating component:Blink>LayoutTests, to use label Test=Layout instead.

Comment 6 by pwnall@chromium.org, Oct 31 2016

Status: Available (was: Untriaged)
Project Member

Comment 7 by sheriffbot@chromium.org, Nov 1 2017

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available. If you change it back, also remove the "Hotlist-Recharge-Cold" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Untriaged)
AFAIK this problem affects only 1 layout test - it seems that the effort required to support OOPIFs for mocked clipboard tests would be much greater than the benefit of being able to enable 1 test on the Site Isolation bots.  Therefore - let me resolve the bug as WontFix,
Summary: OOPIF support in layout tests harness: MockWebClipboardImpl replication across renderers (was: MockWebClipboardImpl is not replicated across renderers.)
Project Member

Comment 10 by bugdroid1@chromium.org, May 10 2018

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

commit 0ae5186d1bf72bd375c5cf14c7a762806fe0f29d
Author: Dmitry Gozman <dgozman@chromium.org>
Date: Thu May 10 17:59:07 2018

Replace WebMockClipboard with MockClipboardHost

This mock clipboard host lives in browser process, essentially synchronizing
clipboard between OOPIFs.

In unit tests we instantiate the mock in-process and override the binder in
Connector so that WebClipboardImpl connects to it.

This patch discovered two issues with clipboard implementation which are being fixed:
- Blacklisting text/uri-list clipboard items does not allow them to be copied
  to clipboard. Old mock implementation masked this issues, while the new one
  exposed the issue caught by multiple tests.
- Unit tests sometime pass null strings to copy to clipboard, so we should
  ensure they are non-null in WebClipboardImpl.

One more semantic change is a rewrite of unit tests which read image from
clipboard to layout tests, where that functionality is available.

The rest is just plumbing of a new mock.

Bug:  775830 ,  607991 

Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ie63552228a9038cfd5e677d9f1bec5a2184662ad
Reviewed-on: https://chromium-review.googlesource.com/1034022
Commit-Queue: Dmitry Gozman <dgozman@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#557582}
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/browser/renderer_host/render_process_host_impl.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/public/browser/browser_context.h
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/public/renderer/content_renderer_client.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/public/renderer/content_renderer_client.h
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/renderer/renderer_blink_platform_impl.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/shell/browser/layout_test/blink_test_controller.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/shell/browser/layout_test/layout_test_content_browser_client.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/shell/browser/layout_test/layout_test_content_browser_client.h
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/shell/renderer/layout_test/layout_test_content_renderer_client.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/shell/renderer/layout_test/layout_test_content_renderer_client.h
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/shell/test_runner/DEPS
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/shell/test_runner/pixel_dump.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/shell/test_runner/test_runner_for_specific_view.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/test/BUILD.gn
[add] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/test/mock_clipboard_host.cc
[add] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/test/mock_clipboard_host.h
[delete] https://crrev.com/c8fb1550cf42970f8cb5445e481e3f193df4c910/content/test/mock_webclipboard_impl.cc
[delete] https://crrev.com/c8fb1550cf42970f8cb5445e481e3f193df4c910/content/test/mock_webclipboard_impl.h
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/test/test_blink_web_unit_test_support.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/content/test/test_blink_web_unit_test_support.h
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/WebKit/LayoutTests/FlagExpectations/enable-slimming-paint-v2
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/WebKit/LayoutTests/FlagExpectations/site-per-process
[add] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/WebKit/LayoutTests/clipboard/copy-image-at-expected.txt
[add] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/WebKit/LayoutTests/clipboard/copy-image-at-with-pinch-zoom-expected.txt
[add] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/WebKit/LayoutTests/clipboard/copy-image-at-with-pinch-zoom.html
[add] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/WebKit/LayoutTests/clipboard/copy-image-at.html
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/blink/public/BUILD.gn
[delete] https://crrev.com/c8fb1550cf42970f8cb5445e481e3f193df4c910/third_party/blink/public/platform/web_mock_clipboard.h
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/blink/renderer/core/exported/web_frame_test.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/blink/renderer/core/exported/web_plugin_container_test.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/blink/renderer/core/exported/web_view_test.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/blink/renderer/core/svg/unsafe_svg_attribute_sanitization_test.cc
[delete] https://crrev.com/c8fb1550cf42970f8cb5445e481e3f193df4c910/third_party/blink/renderer/core/testing/data/canvas-copy-image.html
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/blink/renderer/platform/BUILD.gn
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/third_party/blink/renderer/platform/exported/web_clipboard_impl.cc
[delete] https://crrev.com/c8fb1550cf42970f8cb5445e481e3f193df4c910/third_party/blink/renderer/platform/exported/web_mock_clipboard.cc
[modify] https://crrev.com/0ae5186d1bf72bd375c5cf14c7a762806fe0f29d/ui/base/mojo/clipboard_struct_traits.h

Sign in to add a comment