Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

Commit

Permalink
Make sandboxed test work in IE8 again - iframe.onload = ... doesn't s…
Browse files Browse the repository at this point in the history
…eem to be reliable.
  • Loading branch information
carhartl committed Jan 24, 2013
1 parent e158809 commit 9954d00
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test.js
Expand Up @@ -95,8 +95,8 @@ test('json: true', function () {
asyncTest('malformed cookie value in IE (#88, #117)', function() {
expect(1);
// Sandbox in an iframe so that we can poke around with document.cookie.
var iframe = document.createElement('iframe');
iframe.onload = function() {
var iframe = $('<iframe src="sandbox.html"></iframe>')[0];
$(iframe).on('load', function() {
start();
if (iframe.contentWindow.ok) {
equal(iframe.contentWindow.testValue, 'two', 'reads all cookie values, skipping duplicate occurences of "; "');
Expand All @@ -106,8 +106,7 @@ asyncTest('malformed cookie value in IE (#88, #117)', function() {
// Chrome, Firefox and IE 8+.
ok(true, 'N/A');
}
};
iframe.src = '/sandbox.html';
});
document.body.appendChild(iframe);
});

Expand Down

0 comments on commit 9954d00

Please sign in to comment.