Skip to content

Commit

Permalink
bug fixes, using proper svg filename and destroying the test widget
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvold committed Dec 11, 2012
1 parent daeb054 commit b322e58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/test-panel.js
Expand Up @@ -6,7 +6,6 @@ let { Cc, Ci } = require("chrome");
const { Loader } = require('sdk/test/loader');
const timer = require("sdk/timers");
const self = require('self');
const { Panel } = require('sdk/panel');

exports["test Panel"] = function(assert, done) {
const { Panel } = require('sdk/panel');
Expand Down Expand Up @@ -456,16 +455,16 @@ exports["test Content URL Option"] = function(assert) {
};

exports.testSVGDocument = function(assert) {
let URL_STRING = self.data.url("mozilla_foundation_logo.svg");
let SVG_URL = self.data.url("mofo_logo.SVG");

let panel = Panel({ contentURL: URL_STRING });
let panel = require("sdk/panel").Panel({ contentURL: SVG_URL });

panel.show();
panel.hide();
panel.destroy();

assert.pass("contentURL accepts a svg document");
assert.equal(panel.contentURL, URL_STRING,
assert.equal(panel.contentURL, SVG_URL,
"contentURL is the string to which it was set.");
};

Expand Down
1 change: 1 addition & 0 deletions test/test-widget.js
Expand Up @@ -1042,6 +1042,7 @@ exports.testSVGWidget = function(test) {
contentURL: SVG_URL,
contentScript: "self.postMessage({count: window.document.images.length, src: window.document.images[0].src});",
onMessage: function(data) {
widget.destroy();
test.assertEqual(data.count, 1, 'only one image');
test.assertEqual(data.src, SVG_URL, 'only one image');
test.done();
Expand Down

0 comments on commit b322e58

Please sign in to comment.