longtask in parent iframe fails to be observed by child iframe |
||||
Issue descriptionThis test was disabled due to using SetTime, but when we try to run the test, the test would fails. https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt/longtask-timing/longtask-in-parentiframe.html?dr Digged down a little bit, I found that the long task in parent iframe is captured but not reported, because GetFrame() return null: https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/timing/Performance.cpp?rcl=4ddc452007c67c8280187415c5c4d3cdda061e51&l=250 Observing long task from the same iframe as the long task doesn't have such issue.
,
Jul 21 2017
,
Jul 21 2017
Added 3 files as two simple demo. Observe the results from the console. longtask-in-parentiframe.html doesn't log the longtask while demo-longtask-in-same-iframe.html do.
,
Jul 24 2017
I'm unclear on what exactly the symptom is: I'd thought the issue is that a long task generated in the parent iframe is not observable by the child iframe (same origin), such as the case in this test: https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt/longtask-timing/longtask-in-parentiframe.html However I made a simple repro and it works just fine: https://panicker.users.x20web.corp.google.com/www/longtask/demo/repro747539/child-observes-parent.html
,
Jul 24 2017
Max, in your demo the long task in parent is likely firing too early, before the observer in the child is ready (that's why I made it on-demand in my demo with a button)
,
Jul 24 2017
Max, feel free to close the bug, unless you can demonstrate the issue
,
Jul 24 2017
Shubhie, thanks for helping. I have tested using your sample and added a long task at the beginning, and you are right that the original test fires the long task earlier than the iframe is created. I think it makes sense that the long task will be filtered if there is no frame attaching to it. I should revise the test so that the long task being fired after the creation of iframe.
,
Jul 25 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by maxlg@chromium.org
, Jul 21 2017