Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: tests/html/cssstyledeclaration_test.dart

Issue 442523003: Add property to CssStyleDeclaration to detect if a CSS value is available. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/dom.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tools/dom/dom.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698