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

Unified Diff: client/tests/client/html/CSSStyleDeclarationTests.dart

Issue 8392023: Code review fixes for CSSStyleDeclaration. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/tests/client/client.status ('k') | client/tests/client/html/DocumentFragmentTests.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/client/html/CSSStyleDeclarationTests.dart
diff --git a/client/tests/client/html/CSSStyleDeclarationTests.dart b/client/tests/client/html/CSSStyleDeclarationTests.dart
index 486222857b4d3e8288703f5b50c2044fd9747bd9..c217e64ba9da8b11bd6578150bc5ac50788bca5f 100644
--- a/client/tests/client/html/CSSStyleDeclarationTests.dart
+++ b/client/tests/client/html/CSSStyleDeclarationTests.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
testCSSStyleDeclaration() {
- getStyle() {
+ createTestStyle() {
return new CSSStyleDeclaration.css("""
color: blue;
width: 2px !important;
@@ -17,13 +17,14 @@ testCSSStyleDeclaration() {
Expect.equals("", style.getPropertyPriority('color'));
Expect.equals("", style.item(0));
Expect.equals(0, style.length);
+ // These assertions throw a NotImplementedException in dartium:
// Expect.isNull(style.parentRule);
// Expect.isNull(style.getPropertyCSSValue('color'));
// Expect.isNull(style.getPropertyShorthand('color'));
});
test('cssText is wrapped', () {
- var style = getStyle();
+ var style = createTestStyle();
Expect.equals(
"color: blue; width: 2px !important; -webkit-transform: rotate(90deg); ",
style.cssText);
@@ -32,32 +33,32 @@ testCSSStyleDeclaration() {
});
test('length is wrapped', () {
- Expect.equals(3, getStyle().length);
+ Expect.equals(3, createTestStyle().length);
});
test('getPropertyPriority is wrapped', () {
- var style = getStyle();
+ var style = createTestStyle();
Expect.equals("", style.getPropertyPriority("color"));
Expect.equals("important", style.getPropertyPriority("width"));
});
test('item is wrapped', () {
- var style = getStyle();
+ var style = createTestStyle();
Expect.equals("color", style.item(0));
Expect.equals("width", style.item(1));
Expect.equals("-webkit-transform", style.item(2));
});
test('removeProperty is wrapped', () {
- var style = getStyle();
+ var style = createTestStyle();
style.removeProperty("width");
Expect.equals(
"color: blue; -webkit-transform: rotate(90deg); ",
style.cssText);
});
- test('getters and setters are generated', () {
- var style = getStyle();
+ test('CSS property getters and setters', () {
+ var style = createTestStyle();
Expect.equals("blue", style.color);
Expect.equals("2px", style.width);
Expect.equals("rotate(90deg)", style.transform);
« no previous file with comments | « client/tests/client/client.status ('k') | client/tests/client/html/DocumentFragmentTests.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698