зеркало из https://github.com/mozilla/popcorn-js.git
fixed unit test as per review [#358 state:peer-review-requested]
This commit is contained in:
Родитель
fd520a3526
Коммит
1d89d108e8
|
@ -22,43 +22,43 @@ test("Popcorn wikipedia Plugin", function () {
|
|||
plus();
|
||||
|
||||
popped.wikipedia({
|
||||
start: 5, // seconds
|
||||
end: 10, // seconds
|
||||
start: 1, // seconds
|
||||
end: 3, // seconds
|
||||
src: 'http://en.wikipedia.org/wiki/Cape_Town',
|
||||
title: "this is an article",
|
||||
target: 'wikidiv'
|
||||
} )
|
||||
.wikipedia({
|
||||
start: 12, // seconds
|
||||
end: 20, // seconds
|
||||
start: 4, // seconds
|
||||
end: 8, // seconds
|
||||
src: 'http://en.wikipedia.org/wiki/S%C3%A3o_Paulo',
|
||||
target: 'wikidiv'
|
||||
} )
|
||||
.volume(0)
|
||||
.play();
|
||||
|
||||
popped.exec( 5, function() {
|
||||
popped.exec( 2, function() {
|
||||
ok (theArticle.innerHTML !== "", "wikidiv now contains information" );
|
||||
plus();
|
||||
equals (theArticle.childElementCount, 2, "wikidiv now contains two child elements" );
|
||||
plus();
|
||||
equals (theArticle.childNodes[0].innerHTML, "this is an article", "wikidiv has the right title" );
|
||||
plus();
|
||||
ok (theArticle.childNodes[1].innerHTML !="", "wikidiv has some content" );
|
||||
ok (theArticle.childNodes[1].innerHTML !=="", "wikidiv has some content" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 10, function() {
|
||||
popped.exec( 3, function() {
|
||||
equals (theArticle.innerHTML, "", "wikidiv was cleared properly" );
|
||||
plus();
|
||||
});
|
||||
|
||||
popped.exec( 13, function() {
|
||||
popped.exec( 5, function() {
|
||||
ok (theArticle.innerHTML !== "", "wikidiv now contains information" );
|
||||
plus();
|
||||
equals (theArticle.childElementCount, 2, "wikidiv now contains two child elements" );
|
||||
plus();
|
||||
ok (theArticle.childNodes[1].innerHTML != "", "wikidiv has the right content" );
|
||||
ok (theArticle.childNodes[1].innerHTML !== "", "wikidiv has the right content" );
|
||||
plus();
|
||||
});
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче