Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Skia] Restore Runtime Tests #7271

Open
11 of 13 tasks
jeromelaban opened this issue Oct 4, 2021 · 6 comments
Open
11 of 13 tasks

[Skia] Restore Runtime Tests #7271

jeromelaban opened this issue Oct 4, 2021 · 6 comments
Labels
area/skia/stability ✏️ area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/tests 🧪 Categorizes an issue or PR as relevant to tests difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Something isn't working project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools

Comments

@jeromelaban
Copy link
Member

jeromelaban commented Oct 4, 2021

Current behavior

After the introduction of Skia runtime tests, the following runtime tests are failing:

  • ValidateLayoutRoundingForPixelDimensions
  • CanReplaceSingleItem
  • When_CloseLast_Then_FileDeleted
  • Should_Close_Open_Popups
  • When_TransformToVisual_WithMargin
  • When_MinWidth_SmallerThan_AvailableSize (fix: Workaround a lifecycle bug to allow ContentControl to be measured properly when not in visual tree #14368)
  • TestVariousArrangedPosition
  • When_ProgressRing_Visible
  • When_Calling_Select_With_Negative_Values
  • When_Calling_Select_With_In_Range_Values
  • When_Calling_Select_With_Out_Of_Range_Length
  • When_Calling_Select_With_Out_Of_Range_Start
  • When_Nested_In_Native_View

Those tests are now ignore in order to stabilize existing passing tests.

Expected behavior

The tests pass.

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

No response

Environment

No response

NuGet package version(s)

3.11-dev

Affected platforms

Skia (GTK on Linux/macOS/Windows)

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

@jeromelaban jeromelaban added kind/bug Something isn't working area/skia ✏️ Categorizes an issue or PR as relevant to Skia project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Oct 4, 2021
@Youssef1313
Copy link
Member

When_Calling_Select_With_Negative_Values this one is passing for me locally. The code for it is actually not platform-specific.

For other selection tests, Select in TextBoxViewExtension class seems to be missing EnsureWidget call. This was causing us to operate on a null _currentInputWidget and just returning without doing anything. BUT, even after adding the EnsureWidget call. The native APIs doesn't seem to be working. Will try to investigate further.

@Youssef1313
Copy link
Member

Youssef1313 commented Oct 4, 2021

ValidateLayoutRoundingForPixelDimensions is passing locally for me.

Should_Close_Open_Popups is failing due to RegisterOpenPopup being called twice for the same popup. It has an AddDistinct method, but to me the AddDistinct will never work since we're comparing a newly instantiated WeakReference, not the popup itself. I'm not sure if using WeakReferenceEqualityComparer is the correct fix here.

Anyway, instead of completely disable this test, let's turn the check into > 0 instead of == 1 (only on Skia), until it's properly fixed.

EDIT: Actually MessageDialog.ShowAsync isn't implemented in Skia. So even with this fix it will still not work. Let's link this test to #4810 instead?

@jeromelaban
Copy link
Member Author

We can enable those back one we find the proper fixes, the point of the associated PR is to have regression validation.

For the ValidateLayoutRoundingForPixelDimensions is suspect this is related to DPI awareness.

@MartinZikmund MartinZikmund added good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. area/tests 🧪 Categorizes an issue or PR as relevant to tests difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers area/eu and removed difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Jul 19, 2023
@MartinZikmund
Copy link
Member

@morning4coffe-dev maybe you could look into some of these

@mcNets
Copy link
Contributor

mcNets commented Oct 4, 2023

In reference to CanReplaceSingleItem

I've checked Skia and WPF and both fails, but I can't find the same test for WinUI.

When repeater is set

It takes only three child elements so, why it should be 4?

@jeromelaban is there a way to compare the UNO Windows.UI.Xaml.FrameworkElement with the MS version?

@Youssef1313 Youssef1313 self-assigned this Nov 9, 2023
@Youssef1313
Copy link
Member

I took a look at CanReplaceSingleItem. In FlowLayoutAlgorithm.Generate, there is this loop which is realizing elements:

				while (m_elementManager.IsIndexValidInData(currentIndex) &&
					(disableVirtualization || ShouldContinueFillingUpSpace(previousIndex, direction)))

For some reason, it only realizes three elements whereas in Windows it realizes four. I couldn't go further with this. 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/skia/stability ✏️ area/skia ✏️ Categorizes an issue or PR as relevant to Skia area/tests 🧪 Categorizes an issue or PR as relevant to tests difficulty/starter 🚀 Categorizes an issue for which the difficulty level is reachable by newcomers good first issue Denotes an issue ready for a new contributor, according to the "help wanted" guidelines. kind/bug Something isn't working project/core-tools 🛠️ Categorizes an issue or PR as relevant to core and tools
Projects
Status: No status
Development

No branches or pull requests

5 participants