Provide XHR as an alternative fetcher for ES5 sandboxed code (issue 6209089)

3 views
Skip to first unread message

jas...@gmail.com

unread,
May 22, 2012, 2:55:34 PM5/22/12
to ihab...@gmail.com, google-ca...@googlegroups.com, re...@codereview-hr.appspotmail.com
Reviewers: ihab.awad,

Description:
* Adds two possible fetchers to caja.js to load external scripts in ES5
* Enables some CSS tests in ES5 which were previously off
* Adds tests for provided fetchers

Please review this at http://codereview.appspot.com/6209089/

Affected files:
M src/com/google/caja/plugin/caja.js
M src/com/google/caja/plugin/guest-manager.js
M tests/com/google/caja/plugin/es53-test-cajajs-invocation.js
A tests/com/google/caja/plugin/es53-test-external-script.js
M tests/com/google/caja/plugin/es53-test-guest.html


ihab...@gmail.com

unread,
May 22, 2012, 5:57:31 PM5/22/12
to jas...@gmail.com, google-ca...@googlegroups.com, re...@codereview-hr.appspotmail.com
lgtm++


http://codereview.appspot.com/6209089/diff/1/src/com/google/caja/plugin/caja.js
File src/com/google/caja/plugin/caja.js (right):

http://codereview.appspot.com/6209089/diff/1/src/com/google/caja/plugin/caja.js#newcode96
src/com/google/caja/plugin/caja.js:96: 'fetch':
proxyFetchMaker(undefined)
We don't want to point by default at the proxy server shipped with the
Caja service?

http://codereview.appspot.com/6209089/diff/1/src/com/google/caja/plugin/guest-manager.js
File src/com/google/caja/plugin/guest-manager.js (right):

http://codereview.appspot.com/6209089/diff/1/src/com/google/caja/plugin/guest-manager.js#newcode143
src/com/google/caja/plugin/guest-manager.js:143: setTimeout(function() {
There's a tab on the lhs of this line.

http://codereview.appspot.com/6209089/diff/1/tests/com/google/caja/plugin/es53-test-cajajs-invocation.js
File tests/com/google/caja/plugin/es53-test-cajajs-invocation.js
(right):

http://codereview.appspot.com/6209089/diff/1/tests/com/google/caja/plugin/es53-test-cajajs-invocation.js#newcode48
tests/com/google/caja/plugin/es53-test-cajajs-invocation.js:48: if
(inES5Mode)
Eek, please add curlies!

http://codereview.appspot.com/6209089/diff/1/tests/com/google/caja/plugin/es53-test-cajajs-invocation.js#newcode347
tests/com/google/caja/plugin/es53-test-cajajs-invocation.js:347: //
registerTest('testUrCajoledHtml', function testUrlCajoledHtml() { });
Spurious change

http://codereview.appspot.com/6209089/
Reply all
Reply to author
Forward
0 new messages