Skip to content

Commit

Permalink
[mozilla#312] review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rwaldron committed Feb 10, 2011
1 parent 847a1bd commit 918bd7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
8 changes: 1 addition & 7 deletions test/data/remoteA.js
@@ -1,7 +1 @@
var AlphaLib = function() {
this.a = "Alpha";
}

function alpha() {
return new AlphaLib();
}
Popcorn.AlphaLib = function() {};
8 changes: 1 addition & 7 deletions test/data/remoteB.js
@@ -1,7 +1 @@
var BetaLib = function() {
this.a = "Beta";
}

function beta() {
return new BetaLib();
}
Popcorn.BetaLib = function() {};
13 changes: 4 additions & 9 deletions test/popcorn.unit.js
Expand Up @@ -1207,7 +1207,7 @@ test("JSONP Response", function () {

test("Popcorn.getScript()", function () {

var expects = 10,
var expects = 8,
count = 0;

function plus() {
Expand All @@ -1232,11 +1232,9 @@ test("Popcorn.getScript()", function () {
ok( true, "getScript A returned");
plus();

ok( ("alpha" in window) , "Popcorn.xhr.getScript remoteA.js loaded: `alpha` is available");
plus();


ok( ("AlphaLib" in window) , "Popcorn.xhr.getScript remoteA.js loaded: `AlphaLib` is available");
ok( Popcorn.AlphaLib, "Popcorn.xhr.getScript remoteA.js loaded: `Popcorn.AlphaLib` is available");
plus();

}
Expand All @@ -1250,13 +1248,9 @@ test("Popcorn.getScript()", function () {

ok( true, "getScript B returned");
plus();


ok( ("beta" in window) , "Popcorn.getScript remoteB.js loaded: `beta` is available");
plus();


ok( ("BetaLib" in window) , "Popcorn.getScript remoteB.js loaded: `BetaLib` is available ");
ok( Popcorn.BetaLib , "Popcorn.getScript remoteB.js loaded: `Popcorn.BetaLib` is available ");
plus();

}
Expand All @@ -1277,6 +1271,7 @@ test("Popcorn.getScript()", function () {
plus();


delete window["Processing"];
}
);

Expand Down

0 comments on commit 918bd7e

Please sign in to comment.