Bug 194259 - rotationDidEndCallback not triggered on iPad during testing
Summary: rotationDidEndCallback not triggered on iPad during testing
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-04 17:09 PST by Jonathan Bedard
Modified: 2019-02-04 19:10 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Bedard 2019-02-04 17:09:52 PST
This causes the following tests to fail:
    fast/events/ios/rotation/basic-rotation.html [ Skip ]
    fast/events/ios/rotation/layout-viewport-during-rotation.html [ Skip ]
    fast/events/ios/rotation/layout-viewport-during-safari-type-rotation.html [ Skip ]
    fast/events/ios/rotation/resize-iframe-after-orientation-change.html [ Skip ]
    fast/events/ios/rotation/safari-like-rotation.html [ Skip ]

In particular, the callback in this function never gets triggered during iPad testing:

void UIScriptController::simulateRotation(DeviceOrientation* orientation, JSValueRef callback)
{
    TestRunnerWKWebView *webView = TestController::singleton().mainWebView()->platformView();
    webView.usesSafariLikeRotation = NO;
    
    unsigned callbackID = m_context->prepareForAsyncTask(callback, CallbackTypeNonPersistent);
    
    webView.rotationDidEndCallback = ^{
        if (!m_context)
            return;
        m_context->asyncTaskComplete(callbackID);
    };
    
    [[UIDevice currentDevice] setOrientation:toUIDeviceOrientation(orientation) animated:YES];
}