| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 CssStyleDeclarationTest; | 5 library CssStyleDeclarationTest; |
| 6 import 'package:unittest/unittest.dart'; | 6 import 'package:unittest/unittest.dart'; |
| 7 import 'package:unittest/html_config.dart'; | 7 import 'package:unittest/html_config.dart'; |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'utils.dart'; | 10 import 'utils.dart'; |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 elements = document.queryAll('.bar'); | 143 elements = document.queryAll('.bar'); |
| 144 expect(elements.style.backgroundColor, equals('green')); | 144 expect(elements.style.backgroundColor, equals('green')); |
| 145 elements = document.queryAll('#wat'); | 145 elements = document.queryAll('#wat'); |
| 146 expect(elements.style.backgroundColor, equals('yellow')); | 146 expect(elements.style.backgroundColor, equals('yellow')); |
| 147 | 147 |
| 148 elements.style.borderLeftWidth = '18px'; | 148 elements.style.borderLeftWidth = '18px'; |
| 149 expect(elements.style.borderLeftWidth, equals('18px')); | 149 expect(elements.style.borderLeftWidth, equals('18px')); |
| 150 elements = document.queryAll('li'); | 150 elements = document.queryAll('li'); |
| 151 expect(elements.style.borderLeftWidth, equals('10px')); | 151 expect(elements.style.borderLeftWidth, equals('10px')); |
| 152 }); | 152 }); |
| 153 |
| 154 test('supports property', () { |
| 155 expect(document.body.style.supportsProperty('bogus-property'), false); |
| 156 expect(document.body.style.supportsProperty('background'), true); |
| 157 expect(document.body.style.supportsProperty('borderBottomWidth'), true); |
| 158 expect(document.body.style.supportsProperty('animation'), true); |
| 159 }); |
| 153 } | 160 } |
| OLD | NEW |