Skip to content

Commit

Permalink
Fix RefreshVisualizer crash in release builds (#1321)
Browse files Browse the repository at this point in the history
  • Loading branch information
jevansaks committed Sep 13, 2019
1 parent 52f5bb1 commit 1c07c85
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions dev/dll/Microsoft.UI.Xaml.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
<AppxBundlePlatforms>x86|x64|arm|arm64</AppxBundlePlatforms>
<CppWinRTUsePrefixes>false</CppWinRTUsePrefixes>
<CppWinRTAddXamlMetaDataProviderIdl>false</CppWinRTAddXamlMetaDataProviderIdl>
<!-- In release builds our "experimental" features are under feature velocity as AlwaysDisabled. C++/WinRT assumes that
AlwaysDisabled features should be excluded by default, but we need them included for our component implementation.
Use -ignore_velocity to have the feature attributes be ignored by the tool.
-->
<CppWinRTParameters>-ignore_velocity</CppWinRTParameters>
</PropertyGroup>
<!-- <PropertyGroup Condition="'$(Use64BitLinker)' == 'true' AND '$(BuildingWithBuildExe)' != 'true'">
<LinkToolPath>$(OSBuildToolsRoot)\vc\HostX64\$(BuildArchName)</LinkToolPath>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ public void PullToRefreshLoadingTest()
var textBlock = new TextBlock(FindElement.ByName("TestTextBlock"));
Verify.IsNotNull(textBlock);
Verify.AreEqual(textBlock.DocumentText, "Loaded");

var button = new Button(FindElement.ById("RequestRefresh"));
button.Invoke();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

<Grid>
<controls:RefreshContainer>
<TextBlock x:Name="TestTextBlock" AutomationProperties.Name="TestTextBlock" Text="Loaded"/>
</controls:RefreshContainer>
<StackPanel Orientation="Vertical">
<Button Content="Call RequestRefresh" AutomationProperties.AutomationId="RequestRefresh" Click="RequestRefresh_Clicked"/>
<controls:RefreshContainer x:Name="refreshContainer">
<TextBlock x:Name="TestTextBlock" AutomationProperties.Name="TestTextBlock" Text="Loaded"/>
</controls:RefreshContainer>
</StackPanel>
</Grid>
</utils:TestPage>
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,10 @@ public PullToRefreshTestPage()
{
this.InitializeComponent();
}

private void RequestRefresh_Clicked(object sender, Windows.UI.Xaml.RoutedEventArgs e)
{
refreshContainer.RequestRefresh();
}
}
}

0 comments on commit 1c07c85

Please sign in to comment.