mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-07 09:25:03 +08:00
23 lines
803 B
Dart
23 lines
803 B
Dart
// Copyright 2018 The Chromium 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 'package:flutter_web/rendering.dart';
|
|
import 'package:flutter_web_test/flutter_web_test.dart';
|
|
|
|
import 'rendering_tester.dart';
|
|
|
|
void main() {
|
|
group('RenderView', () {
|
|
test('accounts for device pixel ratio in paintBounds', () {
|
|
layout(RenderAspectRatio(aspectRatio: 1.0));
|
|
pumpFrame();
|
|
final Size logicalSize = renderer.renderView.configuration.size;
|
|
final double devicePixelRatio =
|
|
renderer.renderView.configuration.devicePixelRatio;
|
|
final Size physicalSize = logicalSize * devicePixelRatio;
|
|
expect(renderer.renderView.paintBounds, Offset.zero & physicalSize);
|
|
});
|
|
});
|
|
}
|