var page = require('webpage').create();

var test_url = 'http://127.0.0.1:8888/crossdomain.xml';

page.open(test_url, function(status) {
    if (status !== 'success') {
        console.error('Failed in downloading crossdomain.xml...');
        phantom.exit(1);
    } else {
        // console.log(page.content);
        if (page.content !== // '<?xml version="1.0" encoding="UTF-8"?>' + // without the first line?
                '<cross-domain-policy><allow-access-from domain="*"/></cross-domain-policy>') {
            console.error("crossdomain.xml file isn't correct!");
            phantom.exit(2);
        } else {
            phantom.exit(0);
        }
    }
});

@@ -279,155 +279,22 @@
     
-// console.log(page.content);%0A        if (page.content !== // '%3C?xml version=%221.0%22 encoding=%22UTF-8%22?%3E' + // without the first line?%0A               
+var expected =
  '%3Cc
@@ -366,16 +366,66 @@
 policy%3E'
+;%0A        if (page.content.indexOf(expected) == -1
 ) %7B%0A    

Fix test for crossdomain-xml