| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #library('WindowNSMETest'); | 5 #library('WindowNSMETest'); |
| 6 #import('../../../testing/unittest/unittest.dart'); | 6 #import('../../../testing/unittest/unittest_dom.dart'); |
| 7 #import('dart:dom', prefix: 'dom'); | 7 #import('dart:dom', prefix: 'dom'); |
| 8 | 8 |
| 9 // Not defined in dom.Window. | 9 // Not defined in dom.Window. |
| 10 foo(x) => x; | 10 foo(x) => x; |
| 11 | 11 |
| 12 class Unused { | 12 class Unused { |
| 13 foo(x) => 'not $x'; | 13 foo(x) => 'not $x'; |
| 14 } | 14 } |
| 15 | 15 |
| 16 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); | 16 int inscrutable(int x) => x == 0 ? 0 : x | inscrutable(x & (x - 1)); |
| (...skipping 26 matching lines...) Expand all Loading... |
| 43 try { | 43 try { |
| 44 String x = dom.window.foo(message); | 44 String x = dom.window.foo(message); |
| 45 Expect.fail('Should not reach here: $x'); | 45 Expect.fail('Should not reach here: $x'); |
| 46 } catch (NoSuchMethodException e) { | 46 } catch (NoSuchMethodException e) { |
| 47 // Expected exception. | 47 // Expected exception. |
| 48 } catch (Exception e) { | 48 } catch (Exception e) { |
| 49 Expect.fail('Wrong exception: $e'); | 49 Expect.fail('Wrong exception: $e'); |
| 50 } | 50 } |
| 51 }); | 51 }); |
| 52 } | 52 } |
| OLD | NEW |