Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(54)

Issue 24710043: Make scanner self-test omit prototypes. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 3 months ago by kpreid2
Modified:
12 years, 3 months ago
Reviewers:
felix8a
CC:
google-caja-discuss_googlegroups.com
Base URL:
http://google-caja.googlecode.com/svn/trunk/
Visibility:
Public.

Description

test-scan-guest testScanner is unnecessarily fragile because it exposes more ordinary object structure than just what was tested for, possibly reacting to changes in the scan or problem reporting than what it was looking for. Now the test object graph is run through detach(), which reproduces the graph with no [[Prototype]]s to keep it to the explicitly written structure. @r5628

Patch Set 1 #

Patch Set 2 : Make scanner self-test omit prototypes. #

Patch Set 3 : Make scanner self-test omit prototypes. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -3 lines) Patch
M tests/com/google/caja/plugin/test-scan-guest.js View 1 2 2 chunks +26 lines, -3 lines 2 comments Download

Messages

Total messages: 6
kpreid2
12 years, 3 months ago (2013-11-11 20:28:17 UTC) #1
kpreid2
test-scan-guest testScanner is unnecessarily fragile because it exposes more ordinary object structure than just what ...
12 years, 3 months ago (2013-11-11 21:58:17 UTC) #2
kpreid2
test-scan-guest testScanner is unnecessarily fragile because it exposes more ordinary object structure than just what ...
12 years, 3 months ago (2013-11-11 23:19:34 UTC) #3
felix8a
lgtm modulo comment https://codereview.appspot.com/24710043/diff/40001/tests/com/google/caja/plugin/test-scan-guest.js File tests/com/google/caja/plugin/test-scan-guest.js (right): https://codereview.appspot.com/24710043/diff/40001/tests/com/google/caja/plugin/test-scan-guest.js#newcode1491 tests/com/google/caja/plugin/test-scan-guest.js:1491: var specimen = detach(Object.freeze({a: {}, 1: ...
12 years, 3 months ago (2013-11-12 01:26:12 UTC) #4
kpreid2
https://codereview.appspot.com/24710043/diff/40001/tests/com/google/caja/plugin/test-scan-guest.js File tests/com/google/caja/plugin/test-scan-guest.js (right): https://codereview.appspot.com/24710043/diff/40001/tests/com/google/caja/plugin/test-scan-guest.js#newcode1491 tests/com/google/caja/plugin/test-scan-guest.js:1491: var specimen = detach(Object.freeze({a: {}, 1: {}, '!': {}})); ...
12 years, 3 months ago (2013-11-12 01:58:35 UTC) #5
felix8a
12 years, 3 months ago (2013-11-12 06:28:28 UTC) #6
On 2013/11/12 01:58:35, kpreid2 wrote:
>
https://codereview.appspot.com/24710043/diff/40001/tests/com/google/caja/plug...
> File tests/com/google/caja/plugin/test-scan-guest.js (right):
> 
>
https://codereview.appspot.com/24710043/diff/40001/tests/com/google/caja/plug...
> tests/com/google/caja/plugin/test-scan-guest.js:1491: var specimen =
> detach(Object.freeze({a: {}, 1: {}, '!': {}}));
> On 2013/11/12 01:26:13, felix8a wrote:
> > the frozenness is not preserved. detach only preserves isExtensible. is that
> > important?
> 
> It preserves frozenness because it preserves the extensible flag and the
> writable and configurable flags for each property. There is no independent
> frozen flag.

ah, right, duh. ok. still lgtm.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b