Skip to content

Commit

Permalink
[android_engine_test] Remove background/foreground from surface textu…
Browse files Browse the repository at this point in the history
…re trampoline test. (flutter#161441)

See if this fixes the golden. The background/foreground isn't necessary
for this test which is just a gold comparison of the rendering
  • Loading branch information
jonahwilliams authored Jan 11, 2025
1 parent 00b6a4e commit bd1ebf2
Showing 1 changed file with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import '_luci_skia_gold_prelude.dart';
void main() async {
// To test the golden file generation locally, comment out the following line.
// autoUpdateGoldenFiles = true;

const String appName = 'com.example.android_engine_test';
late final FlutterDriver flutterDriver;
late final NativeDriver nativeDriver;

Expand All @@ -31,21 +29,9 @@ void main() async {
await flutterDriver.close();
});

test('should screenshot and match an external smiley face texture', () async {
test('should screenshot and match a smiley face texture using the trampoline', () async {
await flutterDriver.waitFor(find.byType('Texture'));

// On Android: Background the app, trim memory, and restore the app.
if (nativeDriver case final AndroidNativeDriver nativeDriver) {
print('Backgrounding the app, trimming memory, and resuming the app.');
await nativeDriver.backgroundApp();

print('Trimming memory.');
await nativeDriver.simulateLowMemory(appName: appName);

print('Resuming the app.');
await nativeDriver.resumeApp(appName: appName);
}

await expectLater(
nativeDriver.screenshot(),
matchesGoldenFile('external_texture_other_face.android.png'),
Expand Down

0 comments on commit bd1ebf2

Please sign in to comment.