OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. |
| 4 |
| 5 import 'package:analysis_server/protocol/protocol_generated.dart'; |
| 6 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 7 |
| 8 import '../support/integration_tests.dart'; |
| 9 |
| 10 main() { |
| 11 defineReflectiveSuite(() { |
| 12 defineReflectiveTests(SendEventTest); |
| 13 }); |
| 14 } |
| 15 |
| 16 @reflectiveTest |
| 17 class SendEventTest extends AbstractAnalysisServerIntegrationTest { |
| 18 test_send_event() async { |
| 19 standardAnalysisSetup(); |
| 20 |
| 21 // Disable analytics. |
| 22 AnalyticsIsEnabledResult result1 = await sendAnalyticsIsEnabled(); |
| 23 await sendAnalyticsEnable(false); |
| 24 |
| 25 // Send an event. |
| 26 await sendAnalyticsSendEvent('test-action'); |
| 27 |
| 28 // Restore the original value. |
| 29 await sendAnalyticsEnable(result1.enabled); |
| 30 } |
| 31 } |
OLD | NEW |