https://codereview.appspot.com/12801043/diff/70001/tests/com/google/caja/plugin/test-taming-inout-guest.js
File tests/com/google/caja/plugin/test-taming-inout-guest.js (right):
https://codereview.appspot.com/12801043/diff/70001/tests/com/google/caja/plugin/test-taming-inout-guest.js#newcode189
tests/com/google/caja/plugin/test-taming-inout-guest.js:189:
tamedApi.tamedHostPureFunction('assertEquals("2", 3, a.byteLength);',
buf);
Was the assertion label supposed to be "3"?
https://codereview.appspot.com/12801043/diff/70001/tests/com/google/caja/plugin/test-taming-inout-guest.js#newcode191
tests/com/google/caja/plugin/test-taming-inout-guest.js:191:
'assertEquals("3", 2, new Uint8Array(a)[1]);', buf);
Similar -- assertion label supposed to be "2"?
https://codereview.appspot.com/12801043/diff/70001/tests/com/google/caja/plugin/test-taming-inout-guest.js#newcode200
tests/com/google/caja/plugin/test-taming-inout-guest.js:200:
'assertNotEquals("5", a.buffer, b.buffer);', a, b);
I don't understand assertion label "5".
https://codereview.appspot.com/12801043/diff/70001/tests/com/google/caja/plugin/test-taming-inout-guest.js#newcode204
tests/com/google/caja/plugin/test-taming-inout-guest.js:204:
tamedApi.tamedHostPureFunction('assertEquals("not mutated", 1, b[0]);',
a, b);
I don't understand the invariant that the above 2 lines are trying to
maintain. I'm even confused that they work! :)
In line 201, we mutate a feral clone of "a". Then in line 203, we assert
that a *distinct* feral clone of "a" -- created by a *distinct* pass
through untame() -- still carries the mutation?
In line 204, we assert that yet another *distinct* feral clone, of "b"
this time, is *not* mutated. But should (feral clones of) "a" and "b"
not behave exactly the same, since they share a buffer?
https://codereview.appspot.com/12801043/
--
---
You received this message because you are subscribed to the Google Groups "Google Caja Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.