[wpt-sync] Sync PR 40654 - Reland "[text-fragment] Attempt search for dynamic content"
Categories
(Testing :: web-platform-tests, task, P4)
Tracking
(firefox116 fixed)
| Tracking | Status | |
|---|---|---|
| firefox116 | --- | fixed |
People
(Reporter: wpt-sync, Unassigned)
References
()
Details
(Whiteboard: [wptsync downstream])
Sync web-platform-tests PR 40654 into mozilla-central (this bug is closed when the sync is complete).
PR: https://github.com/web-platform-tests/wpt/pull/40654
Details from upstream follow.
David Bokan <bokan@chromium.org> wrote:
Reland "[text-fragment] Attempt search for dynamic content"
Reland note: iframes.sub.html was timing out because it contains several
sub-tests, each of which now wait 2s which, in total, exhausted the 6s
timeout. Reland marks this test as timeout=long to use the extended
timeout. Previously landed CL is first patchset.Text fragments currently perform up to two searches, one when document
parsing completes and a second attempt when document load completes (if
load wasn't completed at parse complete time). However, pages, often
load content after document load, when content is "dynamically loaded".
One popular example is Mobile Wikipedia, which addshidden=until-found
on collapsed sections in idle tasks after load. This meant
text-fragments couldn't target pages like these.This CL attempts to make text fragments work on dynamically loaded pages
by performing a third attempt, if needed. If all directives haven't
matched at load time, a delayed task is scheduled for 500ms that will
request attachment on unmatched directives. TextFragmentAnchor listens
for relevant changes in the DOM and reschedules this task each time a
change is made. At 3000ms it gives up and performs the search to avoid
waiting forever.At a high level, this CL tries to separate the state tracking of actions
performed for the first matching directive from the state tracking for
running multiple searches. This is done by introducing a new iteration_
enum tracking the latter.Bug: 963045
Change-Id: Ied3f9c610c348eeeca23ace50864f0cc2ff2b233
Reviewed-on: https://chromium-review.googlesource.com/4629864
WPT-Export-Revision: 297e984d156db43f4d554dea3547890584e2d668
| Assignee | ||
Comment 1•2 years ago
|
||
| Assignee | ||
Comment 2•2 years ago
|
||
CI Results
Ran 0 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI
Total 1 tests and 5 subtests
Status Summary
Firefox
OK : 1
FAIL: 5
Chrome
OK : 1
PASS: 5
Safari
OK : 1
PASS: 2
FAIL: 3
Links
Details
Firefox-only Failures
- /scroll-to-text-fragment/iframes.sub.html [wpt.fyi]
- Text fragment specified in iframe.src:
FAIL - Navigate cross-origin iframe via window.location:
FAIL
- Text fragment specified in iframe.src:
New Tests That Don't Pass
- /scroll-to-text-fragment/iframes.sub.html [wpt.fyi]
- Text fragment specified in iframe.src:
FAIL(Chrome:PASS, Safari:PASS) - Navigate same-origin iframe via window.location:
FAIL(Chrome:PASS, Safari:FAIL) - Navigate cross-origin iframe via window.location:
FAIL(Chrome:PASS, Safari:PASS) - Non-matching text with element-id fallback:
FAIL(Chrome:PASS, Safari:FAIL) - Cross-origin with element-id fallback:
FAIL(Chrome:PASS, Safari:FAIL)
- Text fragment specified in iframe.src:
Comment 4•2 years ago
|
||
| bugherder | ||
Description
•