[Android] add runtime flag to determine if HCPP is supported. (#163004)
Developers will need to _conditionally_ use HCPP (or the framework will need to handle it automatically). This requires the ability to query at runtime whether HCPP mode is enabled + supported. Add a message channel to do so, and add the usage of this to the android_engine_test. Does not yet add any automatic selection. --------- Co-authored-by: Matan Lurey <matanlurey@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:android_driver_extensions/native_driver.dart';
|
||||
import 'package:android_driver_extensions/skia_gold.dart';
|
||||
import 'package:flutter_driver/flutter_driver.dart';
|
||||
@@ -43,6 +45,13 @@ void main() async {
|
||||
await flutterDriver.close();
|
||||
});
|
||||
|
||||
test('verify that HCPP is supported and enabled', () async {
|
||||
final Map<String, Object?> response =
|
||||
json.decode(await flutterDriver.requestData('')) as Map<String, Object?>;
|
||||
|
||||
expect(response['supported'], true);
|
||||
}, timeout: Timeout.none);
|
||||
|
||||
test('should screenshot an HCPP platform view', () async {
|
||||
await expectLater(
|
||||
nativeDriver.screenshot(),
|
||||
|
||||
Reference in New Issue
Block a user