Bug 189679 - [Win] TestRunner::queueLoad() fails to generate correct url for some urls.
Summary: [Win] TestRunner::queueLoad() fails to generate correct url for some urls.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Basuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-17 14:21 PDT by Basuke Suzuki
Modified: 2018-09-20 14:38 PDT (History)
8 users (show)

See Also:


Attachments
PATCH (1.91 KB, patch)
2018-09-19 11:35 PDT, Basuke Suzuki
no flags Details | Formatted Diff | Diff
PATCH (3.71 KB, patch)
2018-09-19 13:10 PDT, Basuke Suzuki
no flags Details | Formatted Diff | Diff
PATCH (3.87 KB, patch)
2018-09-20 10:47 PDT, Basuke Suzuki
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Basuke Suzuki 2018-09-17 14:21:26 PDT
In win/TestRunnerWin.cpp:327, it just generates a new url assuming passed url is relative url.
Comment 1 Basuke Suzuki 2018-09-19 11:35:41 PDT
Created attachment 350136 [details]
PATCH

Use UrlCombineW Win32 API to generate correct URL for relative URLs.
Comment 2 Basuke Suzuki 2018-09-19 13:10:56 PDT
Created attachment 350144 [details]
PATCH
Comment 3 Fujii Hironori 2018-09-19 23:55:35 PDT
Comment on attachment 350144 [details]
PATCH

View in context: https://bugs.webkit.org/attachment.cgi?id=350144&action=review

> Tools/DumpRenderTree/win/TestRunnerWin.cpp:346
> +    while (true) {

You can use UrlCombine instead of UrlCombineA.
You don't need this `while` loop because you can get minimum length of result.

DWORD bufferSize = 0;
auto result = UrlCombine(responseURL.data(), wURL.data(), nullptr, &bufferSize, 0);
if (result == E_POINTER) {
  buffer.resize(bufferSize);
  auto result = UrlCombine(responseURL.data(), wURL.data(), buffer.data(), &bufferSize, 0);
}
Comment 4 Basuke Suzuki 2018-09-20 10:47:35 PDT
Oh, that's nice. Thanks.
Comment 5 Basuke Suzuki 2018-09-20 10:47:57 PDT
Created attachment 350232 [details]
PATCH
Comment 6 WebKit Commit Bot 2018-09-20 14:37:07 PDT
Comment on attachment 350232 [details]
PATCH

Clearing flags on attachment: 350232

Committed r236285: <https://trac.webkit.org/changeset/236285>
Comment 7 WebKit Commit Bot 2018-09-20 14:37:09 PDT
All reviewed patches have been landed.  Closing bug.
Comment 8 Radar WebKit Bug Importer 2018-09-20 14:38:39 PDT
<rdar://problem/44656380>