You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by jb...@apache.org on 2010/06/16 05:46:56 UTC
svn commit: r955121 -
/commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/test/SCXMLCompiler.js
Author: jbeard
Date: Wed Jun 16 03:46:56 2010
New Revision: 955121
URL: http://svn.apache.org/viewvc?rev=955121&view=rev
Log:
All tests pass for Chrome using preprocessed xsl.
Modified:
commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/test/SCXMLCompiler.js
Modified: commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/test/SCXMLCompiler.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/test/SCXMLCompiler.js?rev=955121&r1=955120&r2=955121&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/test/SCXMLCompiler.js (original)
+++ commons/sandbox/gsoc/2010/scxml-js/branches/browser-tests.1.ie/test/SCXMLCompiler.js Wed Jun 16 03:46:56 2010
@@ -62,7 +62,18 @@ require.def(
}
function getResultTextFromDoc(d){
- resultText = d.documentElement.firstChild.textContent;
+ var resultText;
+ try{
+ //chrome
+ resultText = d.body.children[0].textContent
+ } catch (e){
+ try {
+ //firefox
+ resultText = d.documentElement.firstChild.textContent;
+ } catch (e) {
+ console.log("Cannot get resultText out of object " + d);
+ }
+ }
return resultText;
}