options._fired = true;
};
- Popcorn.getScript("http://" + options.lang + ".wikipedia.org/w/api.php?action=parse&props=text&page=" + ( options.title || options.src.slice( options.src.lastIndexOf("/")+1) ) + "&format=json&callback=wikiCallback" + _guid);
+ Popcorn.getScript("http://" + options.lang + ".wikipedia.org/w/api.php?action=parse&props=text&page=" + options.src.slice( options.src.lastIndexOf("/")+1) + "&format=json&callback=wikiCallback" + _guid);
},
/**
test("Popcorn wikipedia Plugin", function () {
var popped = Popcorn("#video"),
- expects = 9,
+ expects = 10,
count = 0,
theArticle = document.getElementById('wikidiv');
plus();
equals (theArticle.childElementCount, 2, "wikidiv now contains two child elements" );
plus();
- equals (theArticle.childElement[0].innerHTML, "this is an article", "wikidiv has the right title" );
+ equals (theArticle.childNodes[0].innerHTML, "this is an article", "wikidiv has the right title" );
plus();
- equals (theArticle.childElement[1].innerHTML, "Cape Town metropolitan municipality. It is the provincial capital and primate city ...", "wikidiv has the right content" );
+ ok (theArticle.childNodes[1].innerHTML !="", "wikidiv has some content" );
plus();
});
plus();
equals (theArticle.childElementCount, 2, "wikidiv now contains two child elements" );
plus();
- equals (theArticle.childElement[1].innerHTML, "São Paulo is the largest city in Brazil, the largest city in the southern hemisphere, and the world's 7th largest metropolitan area. The city is the capital of the state of São Paulo, the most populou ...", "wikidiv has the right content" );
+ ok (theArticle.childNodes[1].innerHTML != "", "wikidiv has the right content" );
plus();
});
});