While rebaselining layout expectations to include media error messages reported to devtools console (https://codereview.chromium.org/1858073002/), I found that media/media-reparent.html was:
1) Flakily *not* reporting the devtools error message if the test is run in isolation. (I suspect this is due to low timeout in endTestLater(), not this bug.), and
2) Unable to end the test without timing out, using "waitForEventAndEnd('error');" instead of "endTestLater();"
Inspection with logging enabled showed:
ERR: HTMLMediaElement::insertedInto(0x29a6c5d24f80, 0x29a6c5d24f28)\n
ERR: HTMLMediaElement::removedFrom(0x29a6c5d24f80, 0x29a6c5d24f28)\n
ERR: HTMLMediaElement::insertedInto(0x29a6c5d24f80, 0x29a6c5d24ec0)\n
ERR: HTMLMediaElement::stop(0x29a6c5d24f80)\n
...
ERR: HTMLMediaElement::setNetworkState(0x29a6c5d24f80, 4) - current state is 2\n
ERR: HTMLMediaElement::noneSupported(0x29a6c5d24f80)\n
((next line From https://codereview.chromium.org/1858073002/#ps1))
ERR: HTMLMediaElement::reportPlayerErrorToDevToolsConsole(0x29a6c5d24f80)\n
((the lines book-ending the error scheduling are added while initially investigating this issue, demonstrating that m_asyncEventQueue is closed still:))
ERR: HTMLMediaElement::nonesupported(0x29a6c5d24f80) before scheduling error event, does the async queue have any pending events? 0\n
ERR: HTMLMediaElement::scheduleEvent(0x29a6c5d24f80) - scheduling 'error'\n
ERR: HTMLMediaElement::nonesupported(0x29a6c5d24f80) after scheduling error event, does the async queue have any pending events? 0\n
ERR: HTMLMediaElement::setShouldDelayLoadEvent(0x29a6c5d24f80, false)\n
ERR: HTMLMediaElement::pause(0x29a6c5d24f80)\n
ERR: HTMLMediaElement::pauseInternal(0x29a6c5d24f80)\n
ERR: HTMLMediaElement::updatePlayState(0x29a6c5d24f80) - shouldBePlaying = false, isPlaying = false\n
IN: ^D
[1/1] media/media-reparent.html failed unexpectedly (test timed out)
philipj@: This doesn't seem like the correct behavior. When a media element is reparented, what should happen to any events enqueued prior to removedFrom, and any enqueued after a later insertedInto?
Comment 1 by phil...@opera.com
, Apr 6 2016Summary: Moving HTMLMediaElement to new document should not invoke load algorithm or otherwise reset state (was: HTMLMediaElement reparenting needs to be able to deliver events to new parent)