Bug 194259

Summary: rotationDidEndCallback not triggered on iPad during testing
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: a_protyasha, ap, lforschler, wenson_hsieh
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=193767

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];
}
Comment 1 Abrar Rahman Protyasha 2024-03-22 02:32:34 PDT
This seems to no longer be the case. We should add iPad-specific baselines and unskip the tests now.