Пример #1
0
TEST(WebViewDestruction, CloseWithoutInitWithFrame)
{
    COMPtr<IWebView> webView;
    TEST_ASSERT(SUCCEEDED(WebKitCreateInstance(__uuidof(WebView), &webView)));

    TEST_ASSERT(SUCCEEDED(webView->close()));

    finishWebViewDestructionTest(webView, 0);
}
Пример #2
0
// Tests that calling IWebView::close without calling DestroyWindow, then releasing a WebView doesn't crash. <http://webkit.org/b/32827>
TEST(WebViewDestruction, CloseWithoutDestroyViewWindow)
{
    COMPtr<IWebView> webView;
    HostWindow window;
    HWND viewWindow;
    createAndInitializeWebView(webView, window, viewWindow);

    TEST_ASSERT(SUCCEEDED(webView->close()));

    finishWebViewDestructionTest(webView, viewWindow);
}
Пример #3
0
TEST(WebViewDestruction, DestroyHostWindowThenClose)
{
    COMPtr<IWebView> webView;
    HostWindow window;
    HWND viewWindow;
    createAndInitializeWebView(webView, window, viewWindow);

    DestroyWindow(window.window());
    TEST_ASSERT(SUCCEEDED(webView->close()));

    finishWebViewDestructionTest(webView, viewWindow);
}
Пример #4
0
// Tests that calling IWebView::mainFrame after calling IWebView::close doesn't crash. <http://webkit.org/b/32868>
TEST(WebViewDestruction, MainFrameAfterClose)
{
    COMPtr<IWebView> webView;
    HostWindow window;
    HWND viewWindow;
    createAndInitializeWebView(webView, window, viewWindow);

    TEST_ASSERT(SUCCEEDED(webView->close()));
    COMPtr<IWebFrame> mainFrame;
    TEST_ASSERT(SUCCEEDED(webView->mainFrame(&mainFrame)));

    finishWebViewDestructionTest(webView, viewWindow);
}
Пример #5
0
void LayoutTestController::closeWebInspector()
{
    COMPtr<IWebView> webView;
    if (FAILED(frame->webView(&webView)))
        return;

    COMPtr<IWebViewPrivate> viewPrivate(Query, webView);
    if (!viewPrivate)
        return;

    COMPtr<IWebInspector> inspector;
    if (FAILED(viewPrivate->inspector(&inspector)))
        return;

    inspector->close();
}