From 4fb7a68a81fe5e2a11d95f7ecaf119bc291b2691 Mon Sep 17 00:00:00 2001 From: lifesinger Date: Thu, 21 Mar 2013 11:53:38 +0800 Subject: [PATCH] Fix a bug in spec code --- tests/specs/extensible/plugin-style/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/specs/extensible/plugin-style/main.js b/tests/specs/extensible/plugin-style/main.js index 2fd30e48..db38c92b 100644 --- a/tests/specs/extensible/plugin-style/main.js +++ b/tests/specs/extensible/plugin-style/main.js @@ -11,7 +11,10 @@ define(function(require) { var styleCount = document.getElementsByTagName('style').length test.assert(styleCount === 3, styleCount) - test.assert(document.getElementById('b-css').innerText.indexOf('.b') >= 0, 'b.css') + + var styleEl = document.getElementById('b-css') + var cssText = styleEl.innerHTML || styleEl.styleSheet.cssText + test.assert(cssText.indexOf('.b') >= 0, 'b.css') test.next()