diff --git a/lib/web_ui/test/matchers.dart b/lib/web_ui/test/matchers.dart index b754d4b2387e0..6278fa2cfe65f 100644 --- a/lib/web_ui/test/matchers.dart +++ b/lib/web_ui/test/matchers.dart @@ -421,46 +421,6 @@ void expectHtml(DomElement element, String expectedHtml, expect(actualHtml, expectedHtml); } -/// Tests that [currentHtml] matches [expectedHtml]. -/// -/// The comparison does not consider every minutia of the DOM. By default it -/// tests the element tree structure and non-layout style attributes, and -/// ignores everything else. If you are testing layout specifically, pass the -/// [HtmlComparisonMode.layoutOnly] as the [mode] argument. -/// -/// To keep test HTML strings manageable, you may use short HTML tag names -/// instead of the full names: -/// -/// * is interchangeable with -/// * is interchangeable with -/// * is interchangeable with -/// * is interchangeable with -/// * is interchangeable with -/// * is interchangeable with -/// * is interchangeable with -/// * is interchangeable with -/// -/// To simplify test HTML strings further the elements corresponding to the -/// root view [RenderView], such as (i.e. ), are also stripped -/// out before comparison. -/// -/// Example: -/// -/// If you call [WidgetTester.pumpWidget] that results in HTML -/// `

Hello

`, you don't have to specify -/// `` tags and simply expect `

Hello

`. -void expectPageHtml(String expectedHtml, - {HtmlComparisonMode mode = HtmlComparisonMode.nonLayoutOnly}) { - expectedHtml = canonicalizeHtml(expectedHtml, mode: mode); - final String actualHtml = canonicalizeHtml(currentHtml, mode: mode); - expect(actualHtml, expectedHtml); -} - -/// Currently rendered HTML DOM as an HTML string. -String get currentHtml { - return flutterViewEmbedder.sceneElement?.outerHTML ?? ''; -} - class SceneTester { SceneTester(this.scene);