[chromium] allow for synchronously clearing the content of a WebDocument
Created attachment 193446 [details] Patch
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment on attachment 193446 [details] Patch Did you consider navigating to about:blank? Why not just do that?
(In reply to comment #3) > (From update of attachment 193446 [details]) > Did you consider navigating to about:blank? Why not just do that? that'll generate navigation signals
Why is that a problem? You are trying to reset state between test runs, right? Surely, navigation signals between test runs can be ignored, no? Alternatively, what about starting out with a fresh RenderView for each test? Is that too expensive?
I experimented a bit around with navigating to about:blank, and it also works :)
Comment on attachment 193446 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193446&action=review > Source/WebKit/chromium/src/WebDocument.cpp:251 > + unwrap<Document>()->setContent(String()); Ick. This API really should die rather than get more callers. Setting to about:blank should happen synchronously (And should be basically the same as that, no?)
Comment on attachment 193446 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193446&action=review >> Source/WebKit/chromium/src/WebDocument.cpp:251 >> + unwrap<Document>()->setContent(String()); > > Ick. This API really should die rather than get more callers. Setting to about:blank should happen synchronously (And should be basically the same as that, no?) not quite. Loading something will e.g. fire unonload handlers