Esempio n. 1
0
static void didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKErrorRef error, WKTypeRef userData, const void* clientInfo)
{
    EXPECT_EQ(static_cast<uint32_t>(kWKFrameLoadStateFinished), WKFrameGetFrameLoadState(frame));

    WKURLRef url = WKFrameCopyProvisionalURL(frame);
    EXPECT_NULL(url);

    testDone = true;
}
Esempio n. 2
0
static void didCommitLoadForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
{
    State* state = reinterpret_cast<State*>(const_cast<void*>(clientInfo));
    EXPECT_TRUE(state->didDecidePolicyForNavigationAction);
    EXPECT_TRUE(state->didStartProvisionalLoadForFrame);

    // The provisional URL should be null.
    EXPECT_NULL(WKFrameCopyProvisionalURL(frame));

    state->didCommitLoadForFrame = true;
}
Esempio n. 3
0
static void didFailProvisionalLoadWithErrorForFrame(WKPageRef page, WKFrameRef frame, WKTypeRef userData, const void* clientInfo)
{
    TEST_ASSERT(WKFrameGetFrameLoadState(frame) == kWKFrameLoadStateFinished);

    WKURLRef url = WKFrameCopyProvisionalURL(frame);
    WKURLRef emptyURL = WKURLCreateWithUTF8CString("");
    TEST_ASSERT(WKURLIsEqual(url, emptyURL));
    WKRelease(url);
    WKRelease(emptyURL);

    testDone = true;
}