summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-08-27 16:36:03 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2013-09-02 12:18:24 +0200
commit7146fcc14dcd69f39f20a3e49a9b371bd306bb53 (patch)
tree708cbbe9e6fa39edcccd334b09eba9ec123224c9 /tests
parentb7210ab328438038bbf1c0e03f19616d6ce56c76 (diff)
Implement window creation through QWebEnginePage::createWindow.
This makes the necessary changes to handle WebContentsDelegateQt::AddNewContents and funnel the callback through createWindow in QWebEnginePage and QWebEngineView. - Expose the AddNewContents callback through WebContentsAdapterClient - Allow creating a WebContentsAdapter attached only on the Chromium side, leaving the choice to QWebEnginePage to either adopt it and call WebContentsAdapter::initialize to attach itself as the client, or destroy it if the application isn't handling the call. - Delay the InitAsChild handling in RenderWidgetHostViewQt when it is called before an adapter client has been attached. - Since WebContentsAdapterClient::CreateRenderWidgetHostViewQtDelegate is only a factory method, not creating any link with the callee client, allow using the creating window's adapter client to create the RWHVQtDelegate. This allows an unparented delegate to be created instead of needing to add numerous null-checks in RWHVQt. Use content::WebContents::CreateParams::context for this purpose, which can be used both when creating a WebContents ourselves and when a new window's WebContents is created for us. Change-Id: I032262e867931dc40a7c2eca0c993027a555f56e Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/widgets/qwebenginepage/tst_qwebenginepage.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/widgets/qwebenginepage/tst_qwebenginepage.cpp
index e5fa60e32..bbdc6c2e9 100644
--- a/tests/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -463,8 +463,8 @@ private Q_SLOTS:
void tst_QWebEnginePage::popupFormSubmission()
{
-#if !defined(QWEBENGINEPAGE_CREATEWINDOW)
- QSKIP("QWEBENGINEPAGE_CREATEWINDOW");
+#if !defined(QWEBENGINEPAGE_EVALUATEJAVASCRIPT)
+ QSKIP("QWEBENGINEPAGE_EVALUATEJAVASCRIPT");
#else
TestPage page;
page.settings()->setAttribute(QWebEngineSettings::JavascriptCanOpenWindows, true);