diff options
| author | Misko Hevery | 2010-04-12 19:16:30 -0700 | 
|---|---|---|
| committer | Misko Hevery | 2010-04-12 19:16:30 -0700 | 
| commit | e8ac57caae624dca6509ce1619ae254ffd1fe0f4 (patch) | |
| tree | af11a1d66bacc2ae0eebc198e03875f69623c62e /test/testabilityPatch.js | |
| parent | 7c49b255483c0381c23de41d108800f93ebc1979 (diff) | |
| download | angular.js-e8ac57caae624dca6509ce1619ae254ffd1fe0f4.tar.bz2 | |
tests pass on chrome
Diffstat (limited to 'test/testabilityPatch.js')
| -rw-r--r-- | test/testabilityPatch.js | 16 | 
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; | 
