summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * QWebEngineUrlRequestJob: QUrl("null") for unique initiator originsJüri Valdmann2018-07-201-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | The empty URL is used both for representing a missing origin (browser-initiated navigation request) and a unique/opaque origin. This is problematic since the security implications are very different in these two cases: browser-initiated requests usually should have high security clearance, while requests from unique origins should be restricted. Task-number: QTBUG-69372 Change-Id: Iff73fd1c9a29f1c5c281a8945536333081ff2d6b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Move tst_qwebenginefaviconmanager to off-the-record profileAllan Sandfeld Jensen2018-07-191-1/+6
| | | | | | | | | | | | | | Avoids it crashing due to newer databases found Change-Id: I5a3c926e5d13fe79d3af80e94e95516035ee75b8 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| * Stabilize tst_QWebEngineView::microFocusCoordinates()Allan Sandfeld Jensen2018-06-271-1/+1
| | | | | | | | | | | | | | Fix classic race in using QSignalSpy::wait Change-Id: If922609825c8652f326c2e252f64cc407e06ad9c Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Remove support for GPU_BLACKLIST files from some testsEdward Welbourne2018-08-142-5/+0
| | | | | | | | | | | | | | | | The feature has long been unused and support for it shall soon be dropped. Change-Id: Ia82082fa6cd2d83d461b6db40670dd541015e9f2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Make WebChannel an optional featureMichal Klocek2018-08-094-10/+20
| | | | | | | | | | | | | | Add webengine-webchannel feature. Change-Id: I600572180f8169aafe79cf0408527cc087d9a007 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fix origin test to compile without websocketsMichal Klocek2018-08-092-2/+11
| | | | | | | | | | Change-Id: I7dc0ed033b3b99e633802d92176aca6f672d89e0 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Add printRequest()Michal Klocek2018-08-091-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | Adds printRequested() signal for web content. This signal is emitted on javascript window.print(). This change updates also qt printview manager implementation, fixes a corner case and warnings about ipc unconsumed attachments. Task-number: QTBUG-69237 Task-number: QTBUG-53745 Change-Id: I0c47b732e27e929ac6db237fb562b7d5f9b959c2 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Add printToPdfPoppler testMichal Klocek2018-08-092-6/+54
| | | | | | | | | | | | Task-number: QTBUG-69550 Change-Id: I38fb8a32ad1967fc8a8568ad6c02ca3ca3000354 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Revert "Add HTTP request headers to custom URL schemes"Michal Klocek2018-08-092-63/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a5bdc6236ad52586579a9a3da6a059835ed60761 and 04355f4d6f311adebfc354b094a5f79c6327e86f. CI still crashes on tst_QWebEngineProfile::urlSchemeHandler tests, issue is not reproducible locally and it will take time to investigate. Task-number: QTBUG-69844 Change-Id: I7ddb6a32383400d553fe692c24effb6dfb7b6102 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Unblock ci integrationsMichal Klocek2018-08-081-0/+2
| | | | | | | | | | | | | | | | | | | | It seems that change a5bdc6236a introduced test urlSchemeHandlerRequestHeaders, which triggers some thread safety issue with interceptor, skip the test for now. Task-number: QTBUG-69844 Change-Id: I2d0dc4b72f22a963eef1aa059e1520aeb9da9d8f Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Add HTTP request headers to custom URL schemesAllan Sandfeld Jensen2018-08-031-0/+61
| | | | | | | | | | | | | | Makes it possible to read extra headers added to the request. Change-Id: I4af0ba8a5b28488b8f12a2cff29807575c24f026 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add QWebEngineUrlScheme classJüri Valdmann2018-08-029-37/+412
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Public API for the new url/url_util_qt extension to Chromium, which allows to integrate custom schemes into Chromium's url parsing library and security model. Previously custom schemes would be treated as 'unknown' schemes and rely on fallback behavior in Chromium. [ChangeLog][Custom Schemes] Added the QWebEngineUrlScheme class for configuring how custom schemes are parsed and which security restrictions should apply. Task-number: QTBUG-62536 Change-Id: I7d8b9da3ad742f568b82ccc6a2456ad35e84069b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Increase loadFinished timeouts in tst_originsJüri Valdmann2018-08-021-1/+1
| | | | | | | | | | Change-Id: Ifc9a24d4f887a2ca63aed283db3d7d1b56bc243d Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Add QWebEngineDownloadItem page/view accessorAllan Sandfeld Jensen2018-08-021-0/+4
| | | | | | | | | | | | | | | | | | | | To be able to determine where a download was triggered. [ChangeLog][DownloadItem] Added a page/view accessor to tell were the download was triggered. Change-Id: I21843a545a3e0eb66f5e5fa8a50e77564f2118a7 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Introduce WebEngineAction in Quick APIValentin Fokin2018-08-025-6/+150
| | | | | | | | | | | | | | | | | | | | | | Also implement QQuickWebEngineView::action() method similar to the Widget API to access the WebEngineActions. [ChangeLog][QtWebEngine] Introduce WebEngineAction in Quick API Task-number: QTBUG-56117 Change-Id: I758cd4703db4c111c1ed9187e091d4c845486c46 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Try to fix assert in tst_QWebEngineProfile::urlSchemeHandlerStreamingAllan Sandfeld Jensen2018-07-301-7/+1
| | | | | | | | | | | | | | | | The mutex could potentially be destroyed while still being locked in closed(). Instead let the job delete the device. Change-Id: I0aeb678b73a45e247ebb2690851f1c13f6d71307 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Enable and rename qwebengineinspector testAllan Sandfeld Jensen2018-07-293-43/+30
| | | | | | | | | | | | | | Also makes it a bit a more testing. Change-Id: I5cb5fe5936cf94e8589e86637771082127d7a341 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | Speculative fix for crash on RHELAllan Sandfeld Jensen2018-07-271-9/+24
| | | | | | | | | | | | | | | | Based on what appears to be the only difference in initialization we have compared to other tests. Change-Id: I6f8737e5de31e8a74872bfee05fecbff3b8dd096 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Clean-up of test namesAllan Sandfeld Jensen2018-07-2336-115/+115
| | | | | | | | | | | | | | We want to only use the qwebengine-prefix for tests of actual classes. Change-Id: I0ab4e17f3b4994cc67e836112965307236d61549 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Move printing out of tst_qwebenginepageMichal Klocek2018-07-188-49/+96
| | | | | | | | | | Change-Id: Ida7ee0e4a31a1c19d7b2eaf572b6ff703cbab79d Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Create WebContents with initially_hidden = trueJüri Valdmann2018-07-163-0/+20
| | | | | | | | | | | | | | Task-number: QTBUG-69360 Change-Id: Ia17ce79a8221aa339c72763a984bf1958935ef96 Reviewed-by: Kai Koehne <kai.koehne@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add tst_loadsignalsMichal Klocek2018-07-0310-1/+340
| | | | | | | | | | | | | | | | | | | | Because of the recent problems with unexpected or missing loadStarted and loadFinished signals (which sometimes interfere with other load's signals), we add a set of auto-tests for load-signals. Done-By: Viktor Engelmann <viktor.engelmann@qt.io> Change-Id: Ia3b65c7b3c4d1ed44e94f409e047db6c6defb821 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove race condition workaround from downloadTwoLinksJüri Valdmann2018-06-281-20/+4
| | | | | | | | | | | | | | Not needed with Chromium 67 anymore. Change-Id: I3fd3557181b8140ca15762e8551611cc8c4baed4 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Test iframes over file scheme in tst_Origins::mixedSchemesJüri Valdmann2018-06-286-43/+64
| | | | | | | | | | | | | | | | Add previously missing combinations of schemes to the test. Task-number: QTBUG-62536 Change-Id: Idee99ba03ee17af056e57dd0b1ecbf1b6bc80dcd Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Stabilize tst_QWebEngineView::crashTestsAllan Sandfeld Jensen2018-06-271-1/+8
| | | | | | | | | | | | | | We keep getting progress 100 without any in between on some CIs Change-Id: Iaa3a9911b97ab5b5f642ee32668b9e081cd0fe51 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge "Merge remote-tracking branch 'origin/5.11' into dev" into ↵Allan Sandfeld Jensen2018-06-264-0/+45941
|\ \ | | | | | | | | | refs/staging/dev
| * | Merge remote-tracking branch 'origin/5.11' into devAllan Sandfeld Jensen2018-06-264-0/+45941
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf configure.json src/3rdparty tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp Change-Id: Id79ff6cf01c2db3a2044881ddcbf044abdf84936
| | * Add binary compatibility files for 5.11 for QtWebEngineMilla Pohjanheimo2018-06-063-0/+45931
| | | | | | | | | | | | | | | | | | | | | Files for bic test added. Change-Id: I1ae9f54d70a9891248ad9d65efbf9ec29f022452 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| | * Fix segfault in QWebEnginePage::triggerActionJüri Valdmann2018-05-301-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | Calling triggerAction for a context-menu-specific action (like DownloadLinkToDisk), when no context menu exists, will crash. Change-Id: Ife647b7a7d8ab1a0d9dcb7d3566be130516e6e63 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
| | * Apply settings on pending RVH tooPeter Varga2018-05-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an improvement of: bab4abab Keep settings synchronized when RVH swaps Updating settings during RVH swap is flaky because it happens after the load start of RenderFrame thus it is not guaranteed the ViewMsg_UpdateWebPreferences message is received by the render process before the load finishes. This means that the setting might not be applied on the current page if it was set during the navigation. The new RVH is created at the very beginning of the navigation, so access it via the pending or speculative main frame of the page thereby make it possible to update its settings before the load of RenderFrame starts. Task-number: QTBUG-66656 Task-number: QTBUG-68424 Change-Id: I4fbba597579551bb3329936ccd7b357cf8daa4ea Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
| | * Blacklist tst_QWebEngineSettings::setInAcceptNavigationRequestPeter Varga2018-05-241-0/+2
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-68424 Change-Id: Idb72162b8aaa92a619fb7baf578f63e3d0171470 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | | Stabilize IME auto testsPeter Varga2018-06-261-0/+5
|/ / | | | | | | | | | | | | | | | | | | Set focus on navigation if testing IME composition in an input field. Otherwise, RenderWidget::ShouldHandleImeEvents() may ignore the event. Related fails occurred after 67-based update on macOS. Change-Id: I9e048a52dcc14a4bd99fe00c4a42cd3f8330c8f4 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations for Chromium 67Allan Sandfeld Jensen2018-06-2611-21/+28
| | | | | | | | | | Change-Id: I13cedba56012f74651a044d6fa8f0957487bf3eb Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Adaptations for Chromium 66Allan Sandfeld Jensen2018-06-262-9/+9
| | | | | | | | | | Change-Id: Iee88721a50036d4ef85a23dd1708d4fb84218708 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Make tests work on high-dpi screensKai Koehne2018-06-253-7/+9
| | | | | | | | | | | | Change-Id: I89c39ccf6fd383cad33639959a90b7592467edac Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* | Fine tune configure and clean up header includesMichal Klocek2018-06-1212-30/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously configure was generating two config headers qtwebengine-config.h and qtwebengine-config_p.h, however those headers were never installed or included as dependency in Makefiles. Moreover, due to the name clash all features were included into qt_lib_webengine_*.pri which is QtWebEngine QML module. Move configure to core so all features belong now to qt_lib_webenginecore*.pri. Fix global includes to include qtwebenginecore-config*.h. Drop all DEFINES and use QT_CONFIG instead. Cleanup all evil looking includes in headers for webengine and webenginewidgets. Change-Id: Iddbc8bf4487d9a5f0c19a71a9569535083507756 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Use range-based for instead of Q_FOREACHJüri Valdmann2018-06-064-23/+29
| | | | | | | | | | Change-Id: Ibf016b795ff98fddfa29fb5dc63924a2d2159d71 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Don't try to run user scripts if provisional load failedJüri Valdmann2018-06-053-0/+27
| | | | | | | | | | | | | | | | | | Fixes DCHECK in UserResourceController::DidFinishDocumentLoad. Task-number: QTBUG-68594 Change-Id: I67128e2144420e61f8bffe080fa16a828b8202ad Reviewed-by: Szabolcs David <davidsz@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | RWHVQDW: Remove QGuiApplication::sync() callJüri Valdmann2018-06-041-51/+46
| | | | | | | | | | | | | | | | It is a workaround that is no longer needed. Task-number: QTBUG-64501 Change-Id: I51b7ad0a24cf80ee0c90be0c8c463ceeeee4239e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add dialog unit testMichal Klocek2018-05-3010-1/+628
| | | | | | | | | | | | | | | | Add test to see if correct dialogs are requested Change-Id: I10a7d384b5704fd337b42ea788b6ec6411828d87 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* | Test runJavaScript without JavascriptEnabledJüri Valdmann2018-05-181-0/+16
|/ | | | | Change-Id: I5fef99d3674fe4dee43df79d740988853d144abd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Remove qwebchannel.js from test and exampleMichal Klocek2018-05-175-418/+3
| | | | | | | | Use qwebchannel.js shipped with qtwebchannel. Change-Id: Iceead5131d22a6988bbb4e7a3cca1e9f21908e3e Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Keep settings synchronized when RVH swapsPeter Varga2018-05-171-0/+35
| | | | | | | | | | | There can be more than one RenderViewHost assigned to a single WebContents. This is the case when starting a page load results changing processes. When applying settings during the load it updates only the old RVH. This fix applies the settings to the new RVH too after the swap. Task-number: QTBUG-66656 Change-Id: I833415b2a34f58e2a9a18c209a025c82b73aa65a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Replace invalid characters in WebChannel messagesJüri Valdmann2018-05-163-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out JavaScript's JSON.stringify is not guaranteed to produce valid UTF-16 strings. It is possible in JavaScript to produce string objects which contain invalid code units (unmatched surrogate pairs) and JSON.stringify will simply copy this data to it's output. However, such a string cannot be losslessly converted to UTF-8 and this leads to fun errors in WebChannelIPCTransport. This patch - Adds a test for the scenario above. - Changes WebChannelIPCTransport to replace these invalid code units with the Unicode replacement character U+FFFD. - Changes WebChannelIPCTransportHost to validate the data it gets from the renderer. Not validating the data defeats the whole point of Chromium's fancy multi-process architecture: the renderer is not to be trusted. - Changes WebChannelIPCTransport to throw JavaScript exceptions for various errors (missing argument, wrong type, invalid JSON). Seems like the polite thing to do. Task-number: QTBUG-61969 Change-Id: I83275a0eaed77109dc458b80e27217108dde9f7b Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Fix tst_QWebEnginePage::openLinkInDifferentProfileJüri Valdmann2018-05-151-0/+1
| | | | | Change-Id: I9468faccfc8d943302bb643a57b9f7d1eed8862a Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.11.0' into 5.11Qt Forward Merge Bot2018-05-091-0/+28
|\ | | | | | | Change-Id: Id41b0b07a934994471df40de884e1231ee1c0e8e
| * Fix invalid site instance when switching browser contextsJüri Valdmann2018-04-301-0/+28
| | | | | | | | | | | | | | | | | | All pages in a site instance should belong to the same browser context, an invariant which is violated by our WebContentsDelegateQt::OpenURLFromTab. Task-number: QTBUG-67900 Change-Id: I754180bb96de07448ee3058210391f7856f4caeb Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Remove hardcoded size from QWebEngineView::sizeHint()Szabolcs David2018-05-093-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | 800x600 takes more space than expected when building a layout which contains QWebEngineView. Now this function does exactly the same as QWidget::sizeHint(). Add an auto test and update examples which were depending on this hardcoded size. Change-Id: I3b34b7d37cc99a8d6a49100d6c4b66b5b6a1c999 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Update tests for "Don't create undeserializable mojo origins"Jüri Valdmann2018-05-022-9/+14
| | | | | | | | | | | | | | | | Check that the workaround in src/3rdparty bf10f2f32a behaves as expected. Task-number: QTBUG-62536 Change-Id: Ieae4ad61df303aae5c65d4f7be487574ce32eae0 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Add tests of Web Workers over local and custom schemesJüri Valdmann2018-05-028-0/+129
| | | | | | | | | | | | | | | | | | Shared workers work, service workers don't. Dedicated workers over custom schemes trigger the same serialization error as WebSockets. Task-number: QTBUG-62536 Change-Id: I97b4b8c267f6cfca74bc0abfcca905b0adeabe3d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>