[Mac, iOS] Crash log application information contains latest main frame URL instead...
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Dec 2014 19:30:58 +0000 (19:30 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 2 Dec 2014 19:30:58 +0000 (19:30 +0000)
commitb5301e20b61c3368dee0bfac396c4532f51aa89d
treeaf203439e3c3c18adc3035fc4c9f5590085dfefe
parent1e8c76be36baeab28b07e0c82304240e15d80de8
[Mac, iOS] Crash log application information contains latest main frame URL instead of test URL
https://bugs.webkit.org/show_bug.cgi?id=139174

Reviewed by Simon Fraser.

* DumpRenderTree/TestRunner.cpp:
* DumpRenderTree/TestRunner.h:
Renamed testPathOrURL to testURL, because this variable always contains a URL.

* DumpRenderTree/mac/DumpRenderTree.mm:
(sizeWebViewForCurrentTest): Updated for testPathOrURL renaming.
(testPathFromURL): Moved from FrameLoadDelegate.mm.
(runTest): Set crash reporter information here, as we know the exact test URL.

* DumpRenderTree/mac/FrameLoadDelegate.mm:
(-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]): Don't set crash
reporter information here.

* DumpRenderTree/mac/ResourceLoadDelegate.mm:
* DumpRenderTree/mac/TestRunnerMac.mm:
Updated for testPathOrURL renaming.

* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didStartProvisionalLoadForFrame): WebProcess doesn't know
test URL until load starts, so save it into TestRunner now. A new TestRunner object
is created for each test.

* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::testURL):
(WTR::TestRunner::setTestURL):
Make TestRunner know the test name. For now, it's good enough to have it once load
starts, but if we ever need it earlier, we can send it with BeginTest message.

* WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm:
(WTR::InjectedBundlePage::platformDidStartProvisionalLoadForFrame):
Use test URL, not currently loading URL for CrashReporter.

* WebKitTestRunner/cocoa/CrashReporterInfo.mm:
(WTR::setCrashReportApplicationSpecificInformationToURL): Added a space after colon
(WebKit1 already had it right).

* DumpRenderTree/win/DumpRenderTree.cpp:
(sizeWebViewForCurrentTest):
(runTest):
* DumpRenderTree/win/ResourceLoadDelegate.cpp:
(ResourceLoadDelegate::willSendRequest):
Changed Windows DumpRenderTree to also use URL in TestRunner.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@176677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
13 files changed:
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/TestRunner.h
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/mac/FrameLoadDelegate.mm
Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm
Tools/DumpRenderTree/mac/TestRunnerMac.mm
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/DumpRenderTree/win/ResourceLoadDelegate.cpp
Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
Tools/WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm
Tools/WebKitTestRunner/cocoa/CrashReporterInfo.mm