| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /// Whitebox integration/end-to-end test of Try Dart! site. | 5 /// Whitebox integration/end-to-end test of Try Dart! site. |
| 6 /// | 6 /// |
| 7 /// This test opens Try Dart! in an iframe. When opened the first time, Try | 7 /// This test opens Try Dart! in an iframe. When opened the first time, Try |
| 8 /// Dart! will display a simple hello-world example, color tokens, compile the | 8 /// Dart! will display a simple hello-world example, color tokens, compile the |
| 9 /// example, and run the result. We've instrumented Try Dart! to use | 9 /// example, and run the result. We've instrumented Try Dart! to use |
| 10 /// window.parent.postMessage when the running program prints anything. So this | 10 /// window.parent.postMessage when the running program prints anything. So this |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 ..src = '/root_build/try_dartlang_org/index.html' | 103 ..src = '/root_build/try_dartlang_org/index.html' |
| 104 ..style.width = '90vw' | 104 ..style.width = '90vw' |
| 105 ..style.height = '90vh' | 105 ..style.height = '90vh' |
| 106 ..onLoad.listen(onIframeLoaded); | 106 ..onLoad.listen(onIframeLoaded); |
| 107 document.body.append(iframe); | 107 document.body.append(iframe); |
| 108 // Install an error handler both on the new iframe element, and when it has | 108 // Install an error handler both on the new iframe element, and when it has |
| 109 // fired the load event. That seems to matter according to some sources on | 109 // fired the load event. That seems to matter according to some sources on |
| 110 // stackoverflow. | 110 // stackoverflow. |
| 111 installErrorHandlerOn(iframe); | 111 installErrorHandlerOn(iframe); |
| 112 } | 112 } |
| OLD | NEW |