| // Copyright 2019 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. |
| // Whether the current dart code is running in an environment that was compiled |
| const bool _kIsCompiledToJavaScript = identical(0, 0.0); |
| /// Whether the test is running on the Windows operating system. |
| /// This does not include test compiled to JavaScript running in a browser on |
| /// the Windows operating system. |
| if (_kIsCompiledToJavaScript) { |
| return Platform.isWindows; |
| /// Whether the test is running on the macOS operating system. |
| /// This does not include test compiled to JavaScript running in a browser on |
| /// the macOS operating system. |
| if (_kIsCompiledToJavaScript) { |
| /// Whether the test is running on the Linux operating system. |
| /// This does not include test compiled to JavaScript running in a browser on |
| /// the Linux operating system. |
| if (_kIsCompiledToJavaScript) { |
| /// Whether the test is running in a web browser compiled to JavaScript. |
| return _kIsCompiledToJavaScript; |