Unverified Commit c2409797 authored by Yegor's avatar Yegor Committed by GitHub

Roll chrome 96 attempt 2 (#100073)

* [web] roll Chromium dep to 96.2

Roll Chromium 96.2.

This is the second attempt to roll it. The previous attempt
(https://github.com/flutter/flutter/pull/99725) failed due to a LUCI
cache issue.

* cache-bust CIPD dependency by changing its name
* specify chrome_and_driver version in canvaskit tests
* fix CRC corruption in kTransparentImage
parent decaa4cb
This diff is collapsed.
...@@ -38,25 +38,11 @@ void main() { ...@@ -38,25 +38,11 @@ void main() {
// TODO(ianh): this delay violates our style guide. We should instead wait for a triggering event. // TODO(ianh): this delay violates our style guide. We should instead wait for a triggering event.
await Future<void>.delayed(const Duration(seconds: 2)); await Future<void>.delayed(const Duration(seconds: 2));
// A flutter web app may be rendered directly on the body of the page, or final WebElement? fltSemantics = await driver.webDriver.execute(
// inside the shadow root of the flt-glass-pane (after Flutter 2.4). To 'return document.querySelector("flt-glass-pane")?.shadowRoot.querySelector("flt-semantics")',
// make this test backwards compatible, we first need to locate the correct
// root for the app.
//
// It's either the shadowRoot within flt-glass-pane, or [driver.webDriver].
final SearchContext appRoot = await driver.webDriver.execute(
'return document.querySelector("flt-glass-pane")?.shadowRoot;',
<dynamic>[], <dynamic>[],
) as SearchContext? ?? driver.webDriver; ) as WebElement?;
expect(fltSemantics, isNotNull);
// Elements with tag "flt-semantics" would show up after enabling
// accessibility.
//
// The tag used here is based on
// https://github.com/flutter/engine/blob/master/lib/web_ui/lib/src/engine/semantics/semantics.dart#L534
final WebElement element = await appRoot.findElement(const By.cssSelector('flt-semantics'));
expect(element, isNotNull);
}); });
}); });
} }
...@@ -10,6 +10,7 @@ import 'dart:math'; ...@@ -10,6 +10,7 @@ import 'dart:math';
import 'dart:ui'; import 'dart:ui';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
...@@ -324,7 +325,12 @@ void main() { ...@@ -324,7 +325,12 @@ void main() {
// Visually the "Cancel" button and "OK" button are the same height when using the // Visually the "Cancel" button and "OK" button are the same height when using the
// regular font. However, when using the test font, "Cancel" becomes 2 lines which // regular font. However, when using the test font, "Cancel" becomes 2 lines which
// is why the height we're verifying for "Cancel" is larger than "OK". // is why the height we're verifying for "Cancel" is larger than "OK".
expect(tester.getSize(find.text('The Title')), equals(const Size(270.0, 132.0)));
// TODO(yjbanov): https://github.com/flutter/flutter/issues/99933
// A bug in the HTML renderer and/or Chrome 96+ causes a
// discrepancy in the paragraph height.
const bool hasIssue99933 = kIsWeb && !bool.fromEnvironment('FLUTTER_WEB_USE_SKIA');
expect(tester.getSize(find.text('The Title')), equals(const Size(270.0, hasIssue99933 ? 133 : 132.0)));
expect(tester.getTopLeft(find.text('The Title')), equals(const Offset(265.0, 80.0 + 24.0))); expect(tester.getTopLeft(find.text('The Title')), equals(const Offset(265.0, 80.0 + 24.0)));
expect(tester.getSize(find.widgetWithText(CupertinoDialogAction, 'Cancel')), equals(const Size(310.0, 148.0))); expect(tester.getSize(find.widgetWithText(CupertinoDialogAction, 'Cancel')), equals(const Size(310.0, 148.0)));
expect(tester.getSize(find.widgetWithText(CupertinoDialogAction, 'OK')), equals(const Size(310.0, 98.0))); expect(tester.getSize(find.widgetWithText(CupertinoDialogAction, 'OK')), equals(const Size(310.0, 98.0)));
......
...@@ -19,9 +19,14 @@ const List<int> kBlueSquarePng = <int>[ ...@@ -19,9 +19,14 @@ const List<int> kBlueSquarePng = <int>[
const List<int> kTransparentImage = <int>[ const List<int> kTransparentImage = <int>[
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49,
0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06, 0x48, 0x44, 0x52, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x08, 0x06,
0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x0A, 0x49, 0x44, 0x00, 0x00, 0x00, 0x1F, 0x15, 0xC4, 0x89, 0x00, 0x00, 0x00, 0x06, 0x62, 0x4B,
0x41, 0x54, 0x78, 0x9C, 0x63, 0x00, 0x01, 0x00, 0x00, 0x05, 0x00, 0x01, 0x0D, 0x47, 0x44, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0xA0, 0xBD, 0xA7, 0x93, 0x00,
0x0A, 0x2D, 0xB4, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0B, 0x13, 0x00, 0x00,
0x0B, 0x13, 0x01, 0x00, 0x9A, 0x9C, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49,
0x4D, 0x45, 0x07, 0xE6, 0x03, 0x10, 0x17, 0x07, 0x1D, 0x2E, 0x5E, 0x30, 0x9B,
0x00, 0x00, 0x00, 0x0B, 0x49, 0x44, 0x41, 0x54, 0x08, 0xD7, 0x63, 0x60, 0x00,
0x02, 0x00, 0x00, 0x05, 0x00, 0x01, 0xE2, 0x26, 0x05, 0x9B, 0x00, 0x00, 0x00,
0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82,
]; ];
/// An animated GIF image with 3 1x1 pixel frames (a red, green, and blue /// An animated GIF image with 3 1x1 pixel frames (a red, green, and blue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment