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

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

Issue 11047008: CSSStyleDeclaration.getPropertyValue returns empty string instead of null. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
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('../../pkg/unittest/unittest.dart'); 6 #import('../../pkg/unittest/unittest.dart');
7 #import('../../pkg/unittest/html_config.dart'); 7 #import('../../pkg/unittest/html_config.dart');
8 #import('dart:html'); 8 #import('dart:html');
9 9
10 main() { 10 main() {
(...skipping 28 matching lines...) Expand all
39 expect(style.getPropertyPriority("width"), equals("important")); 39 expect(style.getPropertyPriority("width"), equals("important"));
40 }); 40 });
41 41
42 test('removeProperty is wrapped', () { 42 test('removeProperty is wrapped', () {
43 var style = createTestStyle(); 43 var style = createTestStyle();
44 style.removeProperty("width"); 44 style.removeProperty("width");
45 expect(style.cssText.trim(), 45 expect(style.cssText.trim(),
46 equals("color: blue;")); 46 equals("color: blue;"));
47 }); 47 });
48 48
49 test('CSS property empty getters and setters', () {
50 var style = createTestStyle();
51 expect(style.border, equals(""));
52
53 style.border = "1px solid blue";
54 style.border = "";
55 expect(style.border, equals(""));
56 });
57
49 test('CSS property getters and setters', () { 58 test('CSS property getters and setters', () {
50 var style = createTestStyle(); 59 var style = createTestStyle();
51 expect(style.color, equals("blue")); 60 expect(style.color, equals("blue"));
52 expect(style.width, equals("2px")); 61 expect(style.width, equals("2px"));
53 62
54 style.color = "red"; 63 style.color = "red";
55 style.transform = "translate(10px, 20px)"; 64 style.transform = "translate(10px, 20px)";
56 65
57 expect(style.color, equals("red")); 66 expect(style.color, equals("red"));
58 expect(style.transform, equals("translate(10px, 20px)")); 67 expect(style.transform, equals("translate(10px, 20px)"));
(...skipping 22 matching lines...) Expand all
81 window.setTimeout(expectAsync0(() { 90 window.setTimeout(expectAsync0(() {
82 element.style.textDecoration = 'underline'; 91 element.style.textDecoration = 'underline';
83 element.getComputedStyle('').then(expectAsync1( 92 element.getComputedStyle('').then(expectAsync1(
84 (CSSStyleDeclaration style) { 93 (CSSStyleDeclaration style) {
85 expect(style.textDecoration, equals('underline')); 94 expect(style.textDecoration, equals('underline'));
86 } 95 }
87 )); 96 ));
88 }), 10); 97 }), 10);
89 }); 98 });
90 } 99 }
OLDNEW
« no previous file with comments | « lib/html/templates/html/impl/impl_CSSStyleDeclaration.darttemplate ('k') | tests/html/html.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698