Commit a957a1db authored by Robert Knight's avatar Robert Knight

Add missing "origin" field to test fixtures

Without this field all the test cases still pass, but for the wrong
reason, since the origin field is checked before other event properties.
parent ab788ee7
...@@ -70,17 +70,21 @@ describe('sidebar.util.postmessage-json-rpc', () => { ...@@ -70,17 +70,21 @@ describe('sidebar.util.postmessage-json-rpc', () => {
}, },
},{ },{
// Non-object `data` field. // Non-object `data` field.
origin,
data: null, data: null,
},{ },{
// No jsonrpc header // No jsonrpc header
origin,
data: {}, data: {},
},{ },{
// No ID // No ID
origin,
data: { data: {
jsonrpc: '2.0', jsonrpc: '2.0',
}, },
},{ },{
// ID mismatch // ID mismatch
origin,
data: { data: {
jsonrpc: '2.0', jsonrpc: '2.0',
id: 'wrong-id', id: 'wrong-id',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment