aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/testabilityPatch.js16
1 files changed, 6 insertions, 10 deletions
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index dfa14b97..0c08e39e 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -64,16 +64,12 @@ function sortedHtml(element) {
}
attrs.sort();
html += attrs.join('');
- var style = [];
- for(var name in node.style) {
- var value = node.style[name];
- if (value && isString(value) && (name != 1*name) && (name != 'cssText')) {
- style.push(name + ': ' + value + ';');
- }
- }
- style.sort();
- if (style.length) {
- html += ' style="' + style.join(' ') + '"';
+ if (node.style && node.style.cssText) {
+ var style = node.style.cssText.split('; ');
+ style.sort();
+ if (style[0] == '')
+ style.shift();
+ html += ' style="' + style.join('; ') + ';"';
}
html += '>';
var children = node.childNodes;