Skip to content

Commit 13e4178

Browse files
Should also pass the plain cookie format and finish the async routine
1 parent 8e91807 commit 13e4178

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/utils.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,22 +74,24 @@
7474
var serverURL = getQuery('integration_baseurl');
7575
Cookies.set(name, value);
7676
if (!serverURL) {
77-
callback(Cookies.get(name));
77+
callback(Cookies.get(name), document.cookie);
7878
} else {
7979
var requestURL = serverURL + '/encoding/' + name;
8080
var done = assert.async();
8181
addEvent(iframe, 'load', function () {
82-
var content = iframe.contentWindow.document.innerHTML;
82+
var iframeDocument = iframe.contentWindow.document;
83+
var content = iframeDocument.innerHTML;
8384
if ( !content ) {
8485
ok(false, [
8586
'"' + requestURL + '"',
8687
'should return an object literal in the content body',
8788
'with name and value keys'
8889
].join(' '));
90+
done();
8991
return;
9092
}
9193
var result = JSON.parse(content);
92-
callback(result[name]);
94+
callback(result[name], iframeDocument.cookie);
9395
done();
9496
});
9597
iframe.src = requestURL;

0 commit comments

Comments
 (0)