[WK1] Crash loading Blink layout test fast/dom/Window/property-access-on-cached-windo...
authorjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2015 01:42:12 +0000 (01:42 +0000)
committerjiewen_tan@apple.com <jiewen_tan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Nov 2015 01:42:12 +0000 (01:42 +0000)
commit01fac70c5bec2421cb9a18d067b63f418113e195
tree5ef7c6b86c9c7ed49ad5316ae41e208dab767db6
parent3450761017a1647c9d2e156ba61fa760969186c8
[WK1] Crash loading Blink layout test fast/dom/Window/property-access-on-cached-window-after-frame-removed.html
https://bugs.webkit.org/show_bug.cgi?id=150198
<rdar://problem/23136026>

Reviewed by Brent Fulgham.

Source/WebCore:

Test: fast/dom/Window/property-access-on-cached-window-after-frame-removed.html

Properties of a contentWindow could be accessed even if the frame who owns the window is
detached. Therefore, check whether the document loader is still alive before using it.

* page/PerformanceTiming.cpp:
(WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):

Tools:

* WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
(WTR::TestRunner::inspectorTestStubURL):
Since WebInspectorUI.framework is not available for iOS, the framework
and corresponding functions are disabled in iOS.

LayoutTests:

* fast/dom/Window/666869-expected.txt: Added.
* fast/dom/Window/666869.html: Added.
Test case is from Mozilla.
* fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt: Added.
* fast/dom/Window/property-access-on-cached-window-after-frame-removed.html: Added.
* fast/dom/Window/resources/window-property-collector.js: Added.
(collectProperties):
(emitExpectedResult):
(collectPropertiesHelper):
Test case is from Blink r168256:
https://codereview.chromium.org/131113003
* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@192604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/666869-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/666869.html [new file with mode: 0644]
LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/Window/property-access-on-cached-window-after-frame-removed.html [new file with mode: 0644]
LayoutTests/fast/dom/Window/resources/window-property-collector.js [new file with mode: 0644]
LayoutTests/platform/mac-wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/PerformanceTiming.cpp
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm