Commit dd3b1446 authored by Fredrik Söderquist's avatar Fredrik Söderquist Committed by Commit Bot

Set a document URL in ImageDocumentTest

This should be closer what happens in reality, since this will trigger
the "loading" via the setAttribute() call on the generated <img>
element. Otherwise the setAttribute() will essentially turn into a
removeAttribute() and do nothing, relying on the insertion of said
element to trigger "loading".

Bug: 1000273
Change-Id: Ib06b1d1b92cc6479d322663a896b0b0c8d6afc8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1789812
Auto-Submit: Fredrik Söderquist <fs@opera.com>
Commit-Queue: Stephen Chenney <schenney@chromium.org>
Reviewed-by: default avatarStephen Chenney <schenney@chromium.org>
Cr-Commit-Position: refs/heads/master@{#697620}
parent 406c22f3
......@@ -111,6 +111,7 @@ void ImageDocumentTest::CreateDocumentWithoutLoadingImage(int view_width,
DocumentInit init = DocumentInit::Create().WithDocumentLoader(
frame.Loader().GetDocumentLoader());
frame.DomWindow()->InstallNewDocument("image/jpeg", init, false);
frame.GetDocument()->SetURL(KURL("http://www.example.com/image.jpg"));
}
void ImageDocumentTest::CreateDocument(int view_width, int view_height) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment