// Copyright 2014 The Flutter Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file.import'dart:math';import'package:flutter_driver/flutter_driver.dart';import'package:integration_test/integration_test_driver_extended.dart'astest;/// Browser screen dimensions for the FlutterDriver test.constint_kScreenshotWidth=1024;constint_kScreenshotHeight=1024;/// Convenience wrapper around [test.integrationDriver].////// Adds the capability to take test screenshots.Future<void>runTestWithScreenshots({intbrowserWidth=_kScreenshotWidth,intbrowserHeight=_kScreenshotHeight,})async{finalWebFlutterDriverdriver=awaitFlutterDriver.connect()asWebFlutterDriver;(awaitdriver.webDriver.window).setSize(Rectangle<int>(0,0,browserWidth,browserHeight));test.integrationDriver(driver:driver,onScreenshot:(StringscreenshotName,List<int>screenshotBytes)async{// TODO(yjbanov): implement, see https://github.com/flutter/flutter/issues/86120returntrue;},);}