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

Unified Diff: tests/html/cssstyledeclaration_test.dart

Issue 10544167: Some unit test fixes (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 | « tests/html/css_test.dart ('k') | tests/html/fileapi_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/cssstyledeclaration_test.dart
===================================================================
--- tests/html/cssstyledeclaration_test.dart (revision 8732)
+++ tests/html/cssstyledeclaration_test.dart (working copy)
@@ -20,10 +20,10 @@
test('default constructor is empty', () {
var style = new CSSStyleDeclaration();
- Expect.equals("", style.cssText);
- Expect.equals("", style.getPropertyPriority('color'));
- Expect.equals("", style.item(0));
- Expect.equals(0, style.length);
+ expect(style.cssText, isEmpty);
+ expect(style.getPropertyPriority('color'), isEmpty);
+ expect(style.item(0), isEmpty);
+ expect(style, hasLength(0));
// These assertions throw a NotImplementedException in dartium:
// Expect.isNull(style.parentRule);
// Expect.isNull(style.getPropertyCSSValue('color'));
@@ -32,48 +32,47 @@
test('cssText is wrapped', () {
var style = createTestStyle();
- Expect.equals(
- "color: blue; width: 2px !important; -webkit-transform: rotate(90deg); ",
- style.cssText);
+ expect(style.cssText,
+ equals("color: blue; width: 2px !important; "
+ "-webkit-transform: rotate(90deg); "));
style.cssText = "color: red";
- Expect.equals("color: red; ", style.cssText);
+ expect(style.cssText, equals("color: red; "));
});
test('length is wrapped', () {
- Expect.equals(3, createTestStyle().length);
+ expect(createTestStyle(), hasLength(3));
});
test('getPropertyPriority is wrapped', () {
var style = createTestStyle();
- Expect.equals("", style.getPropertyPriority("color"));
- Expect.equals("important", style.getPropertyPriority("width"));
+ expect(style.getPropertyPriority("color"), isEmpty);
+ expect(style.getPropertyPriority("width"), equals("important"));
});
test('item is wrapped', () {
var style = createTestStyle();
- Expect.equals("color", style.item(0));
- Expect.equals("width", style.item(1));
- Expect.equals("-webkit-transform", style.item(2));
+ expect(style.item(0), equals("color"));
+ expect(style.item(1), equals("width"));
+ expect(style.item(2), equals("-webkit-transform"));
});
test('removeProperty is wrapped', () {
var style = createTestStyle();
style.removeProperty("width");
- Expect.equals(
- "color: blue; -webkit-transform: rotate(90deg); ",
- style.cssText);
+ expect(style.cssText,
+ equals("color: blue; -webkit-transform: rotate(90deg); "));
});
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);
+ expect(style.color, equals("blue"));
+ expect(style.width, equals("2px"));
+ expect(style.transform, equals("rotate(90deg)"));
style.color = "red";
style.transform = "translate(10px, 20px)";
- Expect.equals(
- "color: red; width: 2px !important; -webkit-transform: translate(10px, 20px); ",
- style.cssText);
+ expect(style.cssText,
+ equals("color: red; width: 2px !important;"
+ " -webkit-transform: translate(10px, 20px); "));
});
}
« no previous file with comments | « tests/html/css_test.dart ('k') | tests/html/fileapi_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698