Skip to main content
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2018-01-30Bug 529870 – [webkit2]BrowserProblemI20180130-2000Leo Ufimtsev1-0/+51
Fixing a corner case that can generate a deadlock. - A) User calls evaluate(SCRIPT) - B) The SCRIPT calls a BrowserFunction, (java/swt) - C) The BrowserFunction calls evaluate() Now webkit_web_view_run_javascript() in C never starts because webkit is still executing A. But A never finishes because it's waiting for C to complete to get a return value for A's callback. Solution: Don't allow blocking evaluation in BrowserFunction() callbacks. This shouldn't affect folks mostly, because from what I gather people use 'evaluate' as a form of execute(). This has gone unnoticed on Win32/Cocoa because issue isn't explicitly raised and 'evaluate()' return value wasn't used. Verified with AllBrowser JUnits. Bug: Change-Id: Iddc8c753051455f6706ea81db85e0c6610be11a9 Signed-off-by: Leo Ufimtsev <>
2018-01-29Force qualifier update.I20180129-0540Alexander Kurtakov1-0/+1
Due to Bug 521182 - [compiler] method reference on null object should throw NPE at runtime (JLS compliance) Change-Id: I2acd20d411748d8e3c9d5b806aadff9cfa19f35d Signed-off-by: Alexander Kurtakov <>
2018-01-26Bug 530397 – [Gtk] Make gdbus initialization dynamicLeo Ufimtsev1-4/+7
Bug: Change-Id: Ia99129ce35b8e190402abea3a2eb75d668e8c825 Signed-off-by: Leo Ufimtsev <>
2018-01-22Bug 525305 – [API]Provide SWT.OpenUrl event (Linux implementation)Leo Ufimtsev1-0/+47
(For review/merge) Linux implementation for OpenUrl event, with use of GDBus. (As per original patch *1). URL vs file detection done via "new URI(file).getScheme()". I tested, this distinguishes URI's from files quite well. I.e: /myfile/ ./file file .. -> (OpenFile) .. -> (OpenUrl) I've tested with latest launcher: 1) Via launcher: eclipse /tmp/myFile 2) Via gdbus calls: gdbus call --session --dest org.eclipse.swt --object-path /org/eclipse/swt --method org.eclipse.swt.FileOpen "['', '/tmp/myFile']" Patchset 2: - Updated URL detection logic so that files/urls are properly distinguished. Links: [1] Original patch: Bug: Change-Id: I6531989e3eb766fdf0715a0a9cb86c9ed2b973f3 Signed-off-by: Leo Ufimtsev <>
2018-01-17Bug 527738 [Webkit2] Add test case for calling setUrl with POST data.Roland Grunberg1-0/+28
Simply call and pass some x-www-form-urlencoded data in the POST message body. Change-Id: I9148ee19468c910044b5f2b93b4a7e96f3730edb Signed-off-by: Roland Grunberg <>
2018-01-17Bug 528284: [GTK3] Toolbar: TCF dropdown control is cutoffEric Williams1-0/+79
Still testing, DO NOT MERGE. PART 1/2: SWT fix (other fix is for TCF UI code) Use gtk_button_set_image() instead of gtk_container_add() to prevent smaller buttons from having trimmed arrow icons when SWT.ARROW is specified. This change in logic is due to GTK3 using an actual GtkImage for icons, where GTK2 uses GtkArrow which is its own widget. Tested with ControlExample and the TCF Target Explorer ToolBar contribution. No AllNonBrowser JUnit tests fail. Change-Id: I3c4c33acb689ac36c4567cc8d7bbb5b3ff4e4c19 Signed-off-by: Eric Williams <>
2018-01-10Bug 529474 - [GTK] Fix array initialization problemRené Purrio2-2/+54
- Added test for treeitems also. - Added test for third column as well Change-Id: Ia16837a105bad053948faa079ab328aba88a8100 Signed-off-by: René Purrio <> Signed-off-by: Sravan Kumar Lakkimsetti <>
2018-01-09Bug 519295: [GTK3] Invisible settings button in validation preferencesEric Williams1-0/+74
Bug snippet to reproduce the issue. Change-Id: Ida0ebe281bc2fa7e6b73d6a63ff78f38b34412a8 Signed-off-by: Eric Williams <>
2018-01-07Bug 529494 - Convert to StringBuilderAlexander Kurtakov1-3/+3
Change-Id: Ic959ed6d7ae7aa50da85837105570b2b69ae66d3 Signed-off-by: Alexander Kurtakov <>
2018-01-05Bug 529442: [Webkit2] Add more restrictions on clearAllSessionCookies.Roland Grunberg1-1/+7
The clear all sessions functionality for Webkit2 is only available since version 2.16, so skip the test if this is not satisfied. Change-Id: I0ee752be9f5cc65191b31b1f4f101dea6c2e5570 Signed-off-by: Roland Grunberg <>
2018-01-04Bug 528155: [GTK] Table/Tree forgets to set SWT.SELECTED bit onEric Williams1-0/+112
PaintItem Bug snippet to reproduce the issue. Change-Id: I7047c7cae0fc126b6c7be3db7814b836b9234b43 Signed-off-by: Eric Williams <>
2017-12-22Bug 529126: [Wayland][GTK3] Tree does not notify SWT.MouseDown listenersEric Williams1-0/+134
Added bug snippet to reproduce the issue. Change-Id: Ib4bfdab5fb2230ea7a33898af7db069704548216 Signed-off-by: Eric Williams <>
2017-12-22Bug 528968: [Wayland] JVM crashes when running JUnit tests on WaylandEric Williams2-4/+7
Guard call to takeScreenshot() so that running the SWT JUnit tests doesn't crash the JVM on Wayland. Change-Id: I0ea725a491dfc1f7781ccd647b706e5a5517fc59 Signed-off-by: Eric Williams <>
2017-12-21Bug 528746 - Added test for StyledText#getOffsetAtPoint(Point)Karsten Thoms2-2/+34
Change-Id: I4e9a0024ec8b5a167815f2a60d313e5596c5217d Signed-off-by: Karsten Thoms <>
2017-12-19Bug 528691: [GTK] StyledText ignores text after \u0000 characterEric Williams1-0/+38
Bug snippet to reproduce the issue. Change-Id: Iac21d9c89fcc9d25a5e0d3cd1f004dba0e40736c Signed-off-by: Eric Williams <>
2017-12-18Bug 483791: [GTK3] setBackground overrides GC drawing in PaintListenerEric Williams1-2/+2
Fix typo in bug snippet. Change-Id: I55a9fe0c4e933b6fe8bbfee45b0e9fcb51aa7ba7 Signed-off-by: Eric Williams <>
2017-12-18Bug 483791: [GTK3] setBackground overrides GC drawing in PaintListenerEric Williams1-0/+60
Bug snippet to reproduce the issue. Change-Id: Iecf426d7599426a3bc2e479ba24e4685bf046321 Signed-off-by: Eric Williams <>
2017-12-18Bug 528415 - CTabFolder tabs vanish after mouse-overSimeon Andreev1-0/+47
If a CTabFolder specifies SWT.RIGHT_TO_LEFT as one of its styles, mouse-over on a tab will make the tab not draw. This painting artifact remains until another window becomes active. See the bug snippet. This is due to wrong clipping set to the draw event in Control.gtk_draw(). The event bounds are correctly set in the case of SWT.MIRRORED (derived from SWT.RIGHT_TO_LEFT), but for the clipping area SWT.MIRRORED is not taken into account. This is a regression coming from bug 421127. This change ensures the event clipping equals the event bounds, on draw event creation. This ensures the tabs of the CTabFolder are redrawn. Change-Id: I3bb9049bac98c5f5d360135771ef43ef1cc1a9b1 Signed-off-by: Simeon Andreev <> Signed-off-by: Andrey Loskutov <>
2017-12-15Bug 475659 Data race asyncExecRanLeo Ufimtsev1-3/+5
Use AtomicBoolean instead an array to avoid concurrent read/write warning/issues. Bug Change-Id: I80f5e026e1cfa6503e45e65e074de855454989cc Signed-off-by: Leo Ufimtsev <>
2017-12-13Bug 528549 – (webkit2MouseListener) Snippet to reproduce.Leo Ufimtsev1-0/+136
bug Change-Id: I23490a3add32745be5a1aa93ac40ffc222430f41 Signed-off-by: Leo Ufimtsev <>
2017-12-13Bug 528251 - Test to check tab highlight with nested CTabFoldersSimeon Andreev1-0/+83
When a view contains a selected CTabFolder, selecting another view in the same part stack results in non-highlighted view tab. This is the case, since CTabFolder.onActivate/onDeactivate will tell ancestor CTabFolders to highlight resp. not highlight. Selecting another view results in deactivating the nested CTabFolder and so removing highlighting from the part stack tabs. This is a test for the missing highlight. Change-Id: Iad92b122883068114ddeebe96bc422da206d2c85 Signed-off-by: Simeon Andreev <>
2017-12-12Bug 528251 - view CTabFolders result in not highlighted part stack tabSimeon Andreev1-0/+96
When a view contains a selected CTabFolder, selecting another view in the same part stack results in non-highlighted view tab. This is the case, since CTabFolder.onActivate/onDeactivate will tell ancestor CTabFolders to highlight resp. not highlight. Selecting another view results in deactivating the nested CTabFolder and so removing highlighting from the part stack tabs. This regression was introduced with the fix for Bug 474444. With this change, highlighting is toggled only for the CTabFolder which is being activated/deactivated. The change was verified both on Windows and on RHEL+GTK3.14. The problem from Bug 474444 is not observed. Change-Id: I6fd4bf7f049e84d95bd5e83332a6484164623576 Signed-off-by: Simeon Andreev <>
2017-12-11Bug 528404 - Remove Maven Nature and BuilderKarsten Thoms2-12/+0
Signed-off-by: Karsten Thoms <>
2017-12-08Remove useless code.Alexander Kurtakov2-2/+1
Useless suppress warnings and semicolon. Change-Id: I23b782aae94b774c9a9b38f89f541c659c4c5566 Signed-off-by: Alexander Kurtakov <>
2017-12-01Bug 510905 [Webkit2] BrowserFunction with return value back toLeo Ufimtsev3-4/+226
Javascript (PRIOR TO MERGING, SWT BINARY REPO NEEDS TO BE PATCHED) Webkit2 moved it's webprocess into a separate process. For javascript to call a function, it needs to do so via the separate process. To interact with the separate process, we need to implement a webextension, which is a separate '.so' file loaded at run time. The extension needs to reside in it's own folder otherwise webkit will try to load the other .so files as extensions. (See changes). Communication between the extension and the main process is done via a gdbus channel. Javascript/Java types are packaged into GVariants and transmitted via gdbus. Compilation of the webextension requires webkit2gtk package to be present on build servers. Tests: - All jUnits pass - SWT Snippet (307) that use BrowserFunction work. - Attached local snippet can be used to test sending various paramaters over gdbus and receiving them back prints to main webview. - Child eclipse works fine with the patch. - Afaik, no known error/warnings are produced. (If there are, let me know). This might break 32bit build of SWT though, not tested on 32 bit. Patch set log: -------------- Patchset 6: - Passing webview as string in javascript function. Patchset 8: - Implemented dynamic gdbus bindigs on SWT/Java side. Works. (fairly large patch) Patchset 9: - Implemented gdbus bindings on client side, such that it can reach server. (working) Patchset 10: - Added GVariant conversion functions on SWT side. Works. - Moved code out of to reside only in WebKitGTK Patchset 11: - Figured out how to provide return value as an object array. Added snippet to show how to provide a string return value. (working) Patchset 12: - Passed webview pointer, index and token to Java. - Fixed typo in type definition. > (Working) Patchset 13: - Now passing javascript arguments along through gdbus to java. > (Working) Patchset 14: (Week 46) - Implemented support for 'null'. (use byte as magic number). - Found that there is a bug in how I deal with return value in gdbus, gdbus returns an array (always). Need to return first item in array. Patchset 15: (Week 46) - Implemented proper return value of java to javascript. - Found that js calls with no paramaters call() fail, need to fix. Patchset 16: (Week 46) - Implemented support for empty arrays (including calls without args). - Code tidy. - Found that I need to implement input argument verification from JS call and from java code ran by user, otherwise gdbus can crash. Patchset 17: (Week 46) - Implement checking of user-input arguments, to ensure it won't break gdbus connection. Patchset 18: (Week 46) - Implemented checking of return value from userfunction, so bad return value doesn't break gdbus. - Code tidy/polish. - Need to implement lazy loading of gdbus, only init gdbus for the first function that we instantiate. - Also still getting warning when loading webkit library. Patchset 19: [Week 47] - Implemented lazy loading of gdbus, to only load when needed. - wrapped getPID() into lock, otherwise had strange debug/execution behaviour. Patchset 20: [Week 47] - Two BrowserInstances with Two BrowserFunctions seem to hang (snippet), (need to investigate) Patchset 21: [W47] - Removed redundant print statements. Cleaned up code. Patchset 22: [W47] - Moved Webkit extension initialization logic into a callback, so that it's guaranteed to be loaded at the most optimal time. (All jUnits pass). Patchset 23: [W47] - Removed redundant println. Patchset 24: [W47] - Implemented mechanism by which webextension is compiled and loaded from a folder. (This needs a patch to binary project's Patchset 25: [W47] - Code tidy. Patch complete (ish). Patchset 26: [W47] - forgot to add files to patchset 25. Patchset 27: [W47] - Verified that Browser widget will continue to work if webextension fails to load. - Added relevant warnings. Patchset 28: - Minor update on SWT_LIB_VERSIONS. Change-Id: Iccfc48bc78774ac4120aafd976186381f247c562 Signed-off-by: Leo Ufimtsev <>
2017-11-30Bug 527935 - Add Automatic-Module-Name to MANIFEST.MF in SWT repoAlexander Kurtakov4-0/+4
Change-Id: I7ac7f58b3c252b6baabaacae3ac4d3b197b76ba3 Signed-off-by: Alexander Kurtakov <>
2017-11-28Bug 522020 - [API] Customize different line spacing of StyledText withangelozerr2-2/+88
LineSpacingProvider Change-Id: I5c622f791b6561c1af080cc455343b15c0fba784 Signed-off-by: angelozerr <>
2017-11-20Bug 522181: [Webkit2] Implement clearSessions() on WebKit2.Roland Grunberg1-0/+107
The WebKit2 implementation of clearSessions() will remove session and non-session (those with an expiry) cookies. The API specifies only the former shall be removed but there is no way to be more selective for now. Tested on WEBKIT1 and WEBKIT2 using the JUnit test provided. The general test approach involves manipulating cookies through javascript. Some additional tests have also been added. test_evaluate_Cookie acts as a sanity check for the correct functioning of 'document.cookie' and the browser.evaluate() functionality. test_get_set_Cookies will eventually help with further implementation of the Cookie API on WEBKIT2. Change-Id: Icc17fe90bf4de38c8d5f0fbb7b5937552ce33d54 Signed-off-by: Roland Grunberg <>
2017-11-14Bug 221611: [Accessibility] Radio button being read as check boxesEric Williams1-0/+53
The issue is not reproducible, but I am adding the sample snippet into the repository anyways for testing purposes. Change-Id: I4fdd59860cb650a34cb14db420e0eb1b7cf887d5 Signed-off-by: Eric Williams <>
2017-11-06Bug 525946: [Webkit2] Port download functionality to WebKit2.Roland Grunberg1-0/+32
- On WEBKIT2, the file dialog logic is now done in same thread as the signal handler since it does not freeze the UI, as may have been the case on WEBKIT1 - Use the 'download-requested' signal on WEBKIT2 as an entrypoint for other signals necessary to successfully download a file - Handle 'decide-destination' signal on WEBKIT2, and place file dialog logic there so that file path may be changed while still having the suggested file name - Handle 'finished', and 'failed' to be aware of download termination as well as disposing of the progress dialog - On WEBKIT2, state of a WebKitDownload is only informed through signals so create a webkitDownloadStatus Map so that the download window may be aware of download state - Re-use status codes from WEBKIT1 in the WEBKIT2 code to keep logic as similar as possible Tested on WEBKIT1 and WEBKIT2 with 2 browser instances each downloading the same large file (different destination) while alternating between instances and downloading smaller files. Change-Id: Ib4d1e5552eedcb73a61ae671f14408ff00f9b9a4 Signed-off-by: Roland Grunberg <>
2017-10-17Bug 526083 [Gtk] For swt.tests.gtk, make api restrictions warningsLeo Ufimtsev2-1/+5
For the test project: org.eclipse.tests.gtk, sometimes we need to test internal gtk api. This generates compile errors. As this project is intended only for testing, we're changing the error to a warning instead. Change-Id: Ie3f3196328d8041d65d8423045bef6c4fe9a9ee4 Signed-off-by: Leo Ufimtsev <>
2017-10-17Bug 526083: [GTK3] Menu.getBounds() returns wrong x & y coordinateEric Williams1-0/+131
Adding bug snippet to SWT platform specific tests repo. Change-Id: Iee2197325e7aeb9c0827b0ad0de0a2d3d9b2840a Signed-off-by: Eric Williams <>
2017-10-10Bug 525807 - Use surefire 2.20.1 for swt testsAlexander Kurtakov1-2/+3
Extract surefire version to property to change the version only in one place in the future. Change-Id: Ifbf8891084e0de990c268503639ce382b3cc2a3d Signed-off-by: Alexander Kurtakov <>
2017-10-02Bug 525340 [Gtk][Webkit2] Javascript evaluate fails with "SyntaxError:Leo Ufimtsev1-0/+18
Return statements are only valid inside functions" jUnit test to catch such issues in the future. Change-Id: Ib94b293232a42a3c14748a325ea388a3e37ff88b Signed-off-by: Leo Ufimtsev <>
2017-09-27Bug 525264 - Use foreach in snippets and examplesAlexander Kurtakov2-8/+4
Change-Id: I083db281df708346964203015bd9663bb8e943e1 Signed-off-by: Alexander Kurtakov <>
2017-09-25Bug 515915: [GTK3] ScrolledComposite within CTabFolder does not showEric Williams1-0/+59
scrollbars until resize Add test snippet to snippet repo. Change-Id: I6d8c7caf5a29eacd3e6bbbe100ea24adefaf8b57 Signed-off-by: Eric Williams <>
2017-08-21Bug 517264 – Refactor Test_*_Browser (setText issues on win)Leo Ufimtsev1-1/+2
On Windows, setTitle() sometimes seems to trigger multiple title changes, once to "about:blank" and then to the actual desired page. This patch skips over "about:blank" changes. Change-Id: I8b30988e32e23162cf81ea45ea267e1aa39445c7 Signed-off-by: Leo Ufimtsev <>
2017-08-18[Bug 500475] Guard 'doubleClickSelection' with 'doubleClickEnabled'.Arne Deutsch1-0/+34
The field 'doubleClickSelection' might be accessed only in case 'doubleClickEnabled' is true. Otherwise it will be null and NPE is the result. In case 'doubleClickEnabled = false" 'selectionAnchor' will already have the correct value. Added snippet to reproduce bug. Change-Id: Id5743435fd231dc03df8376122495a51b9bcb662 Signed-off-by: Arne Deutsch <>
2017-08-17Bug 521024 - [api] Provide helpers to use lambda expressions for BrowserAlexander Kurtakov2-284/+159
listeners Adapt tests and examples. Change-Id: I49288d44f25ec2c7f370bc1481f5dd09a35c31a4 Signed-off-by: Alexander Kurtakov <>
2017-08-16Bug 520948: [Tests] [GTK] Increase color test coverage in SWTEric Williams1-0/+254
Add background/foreground color tests to widgets that have different internal mechanisms for setting a background/foreground color. This ensures that certain corner case styles get tested properly. Change-Id: I43bdcd3f4cc620cd94e0ac6f3326a7a8cb43acf8 Signed-off-by: Eric Williams <>
2017-08-16[Bug 520446] Added test cases to cover most code for block selection.Arne Deutsch1-0/+200
Fix test_getSelectionRangesInBlockSelection to work on linux, too. Fix test_getSelectionCountInBlockSelection to work on linux, too. Change-Id: I83dc68ccc7d10f59a138311d0be9249ac624dd39 Signed-off-by: Arne Deutsch <>
2017-08-16Bug 520983 - [api] Provide helpers to use lambda expressions forAlexander Kurtakov1-0/+242
ShellListener Add tests. Change-Id: Ia5cfa9c43e5dacb5a0aebba20c8e557321767105 Signed-off-by: Alexander Kurtakov <>
2017-08-15Bug 520948: [Tests] [GTK] Increase color test coverage in SWTEric Williams2-0/+174
Add background/foreground color tests to widgets that have different internal mechanisms for setting a background/foreground color. This ensures that certain corner case styles get tested properly. Change-Id: I52139f3a4e1352790c4f8495dd8cbed637e2af8f Signed-off-by: Eric Williams <>
2017-08-15Bug 517264 Refactor old Browser* tests -- Skip test_setUrl_remote on badLeo Ufimtsev1-2/+39
connection. test_setUrl_remote() requires a live Internet connection. This test sometimes times out when a build server happens to have a bad Internet connection. This causes noise in the test logs. It's difficult to ensure live connectivity is always present, so instead this test will be skipped if there is no internet present. Note, setUrl(..) is still tested against local files even if an internet connection is not available. Change-Id: I098c1ecf3707c23260440fa0cf9081805198a627 Signed-off-by: Leo Ufimtsev <>
2017-08-14Bug 517264 – Refactor old Browser* tests into Test_*_BrowserI20170814-2000Leo Ufimtsev1-3/+10
Increasing timeout for test_setUrl_remote() as it sometimes timesout on windows. (I presume due to bad internet connection). Change-Id: Ibbaac8538f71a91292fe4d935bd3e4ba0bda6b41 Signed-off-by: Leo Ufimtsev <>
2017-08-13Bug 520884 - [api] Provide helpers to use lambda expressions forAlexander Kurtakov1-0/+97
MouseTrackListener Add tests. Change-Id: I9846addac996fedf6f975e651232f6c9e24af9f4 Signed-off-by: Alexander Kurtakov <>
2017-08-11Bug 520831 - [api] Provide helpers to use lambda expressions forAlexander Kurtakov1-1/+51
TreeListener Add tests. Change-Id: I9f17b21053e70834dd52d859e6352f8a1d5779f2 Signed-off-by: Alexander Kurtakov <>
2017-08-11Bug 520822 - [api] Provide helpers to use lambda expressions forAlexander Kurtakov1-1/+50
MenuListener Add tests for the helper methods. Change-Id: Ifc7f5238a7d60e982d7560bddd3b853e993ecaae Signed-off-by: Alexander Kurtakov <>
2017-08-11Bug 520806 - [api] Provide helpers to use lambda expressions forAlexander Kurtakov1-1/+49
ExpandListener Add tests. Change-Id: Id8fd3c2d81a7465ece5b02e4cad1b2f6d07239d4 Signed-off-by: Alexander Kurtakov <>
2017-08-10[Bug 520442] Add test cases to cover StyledText.handleMouseDown.Arne Deutsch1-0/+101
Change-Id: Id5d5c5a4d05f05dff9b9142572cd07d40a7c7593 Signed-off-by: Arne Deutsch <>

Back to the top