Ejemplo n.º 1
0
TEST(WebKit2, RestoreSessionStateContainingFormData)
{
    WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreate());

    // FIXME: Once <rdar://problem/8708435> is fixed, we can move the creation of this
    // PlatformWebView after the call to createSessionStaetContainingFormData. Until then, it must
    // remain here to avoid a race condition between the UI and web processes.
    PlatformWebView webView(context.get());
    setPageLoaderClient(webView.page());

    WKRetainPtr<WKDataRef> data = createSessionStateContainingFormData(context.get());
    EXPECT_NOT_NULL(data);

    WKPageRestoreFromSessionState(webView.page(), data.get());
    Util::run(&didFinishLoad);

    EXPECT_TRUE(WKPageCanGoBack(webView.page()));
}
Ejemplo n.º 2
0
void Tab::back()
{
    if (WKPageCanGoBack(m_page))
        WKPageGoBack(m_page);
}