OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
4 // | 4 // |
5 // This file has been automatically generated. Please do not edit it manually. | 5 // This file has been automatically generated. Please do not edit it manually. |
6 // To regenerate the file, use the script | 6 // To regenerate the file, use the script |
7 // "pkg/analysis_server/tool/spec/generate_files". | 7 // "pkg/analysis_server/tool/spec/generate_files". |
8 | 8 |
9 /** | 9 /** |
10 * Convenience methods for running integration tests | 10 * Convenience methods for running integration tests |
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1730 * The diagnostic server port. | 1730 * The diagnostic server port. |
1731 */ | 1731 */ |
1732 Future<DiagnosticGetServerPortResult> sendDiagnosticGetServerPort() async { | 1732 Future<DiagnosticGetServerPortResult> sendDiagnosticGetServerPort() async { |
1733 var result = await server.send("diagnostic.getServerPort", null); | 1733 var result = await server.send("diagnostic.getServerPort", null); |
1734 ResponseDecoder decoder = new ResponseDecoder(null); | 1734 ResponseDecoder decoder = new ResponseDecoder(null); |
1735 return new DiagnosticGetServerPortResult.fromJson( | 1735 return new DiagnosticGetServerPortResult.fromJson( |
1736 decoder, 'result', result); | 1736 decoder, 'result', result); |
1737 } | 1737 } |
1738 | 1738 |
1739 /** | 1739 /** |
| 1740 * Query whether analytics is enabled. |
| 1741 * |
| 1742 * Returns |
| 1743 * |
| 1744 * enabled: bool |
| 1745 * |
| 1746 * Whether sending analytics is enabled or not. |
| 1747 */ |
| 1748 Future<AnalyticsIsEnabledResult> sendAnalyticsIsEnabled() async { |
| 1749 var result = await server.send("analytics.isEnabled", null); |
| 1750 ResponseDecoder decoder = new ResponseDecoder(null); |
| 1751 return new AnalyticsIsEnabledResult.fromJson(decoder, 'result', result); |
| 1752 } |
| 1753 |
| 1754 /** |
| 1755 * Enable or disable sending analytics information. |
| 1756 * |
| 1757 * Parameters |
| 1758 * |
| 1759 * value: bool |
| 1760 * |
| 1761 * Enable or disable analytics. |
| 1762 */ |
| 1763 Future sendAnalyticsEnable(bool value) async { |
| 1764 var params = new AnalyticsEnableParams(value).toJson(); |
| 1765 var result = await server.send("analytics.enable", params); |
| 1766 outOfTestExpect(result, isNull); |
| 1767 return null; |
| 1768 } |
| 1769 |
| 1770 /** |
| 1771 * Send information about client events. |
| 1772 * |
| 1773 * Parameters |
| 1774 * |
| 1775 * action: String |
| 1776 * |
| 1777 * The client action name. |
| 1778 */ |
| 1779 Future sendAnalyticsSendEvent(String action) async { |
| 1780 var params = new AnalyticsSendEventParams(action).toJson(); |
| 1781 var result = await server.send("analytics.sendEvent", params); |
| 1782 outOfTestExpect(result, isNull); |
| 1783 return null; |
| 1784 } |
| 1785 |
| 1786 /** |
| 1787 * Send timing information for client events (e.g. code completions). |
| 1788 * |
| 1789 * Parameters |
| 1790 * |
| 1791 * variable: String |
| 1792 * |
| 1793 * The variable name for the event. |
| 1794 * |
| 1795 * millis: int |
| 1796 * |
| 1797 * The duration of the event in milliseconds. |
| 1798 */ |
| 1799 Future sendAnalyticsSendTiming(String variable, int millis) async { |
| 1800 var params = new AnalyticsSendTimingParams(variable, millis).toJson(); |
| 1801 var result = await server.send("analytics.sendTiming", params); |
| 1802 outOfTestExpect(result, isNull); |
| 1803 return null; |
| 1804 } |
| 1805 |
| 1806 /** |
1740 * Initialize the fields in InttestMixin, and ensure that notifications will | 1807 * Initialize the fields in InttestMixin, and ensure that notifications will |
1741 * be handled. | 1808 * be handled. |
1742 */ | 1809 */ |
1743 void initializeInttestMixin() { | 1810 void initializeInttestMixin() { |
1744 _onServerConnected = | 1811 _onServerConnected = |
1745 new StreamController<ServerConnectedParams>(sync: true); | 1812 new StreamController<ServerConnectedParams>(sync: true); |
1746 onServerConnected = _onServerConnected.stream.asBroadcastStream(); | 1813 onServerConnected = _onServerConnected.stream.asBroadcastStream(); |
1747 _onServerError = new StreamController<ServerErrorParams>(sync: true); | 1814 _onServerError = new StreamController<ServerErrorParams>(sync: true); |
1748 onServerError = _onServerError.stream.asBroadcastStream(); | 1815 onServerError = _onServerError.stream.asBroadcastStream(); |
1749 _onServerStatus = new StreamController<ServerStatusParams>(sync: true); | 1816 _onServerStatus = new StreamController<ServerStatusParams>(sync: true); |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 outOfTestExpect(params, isExecutionLaunchDataParams); | 1949 outOfTestExpect(params, isExecutionLaunchDataParams); |
1883 _onExecutionLaunchData.add( | 1950 _onExecutionLaunchData.add( |
1884 new ExecutionLaunchDataParams.fromJson(decoder, 'params', params)); | 1951 new ExecutionLaunchDataParams.fromJson(decoder, 'params', params)); |
1885 break; | 1952 break; |
1886 default: | 1953 default: |
1887 fail('Unexpected notification: $event'); | 1954 fail('Unexpected notification: $event'); |
1888 break; | 1955 break; |
1889 } | 1956 } |
1890 } | 1957 } |
1891 } | 1958 } |
OLD | NEW |