Author: mikesamuel
Date: Wed Jan 21 22:18:31 2009
New Revision: 3198
Modified:
trunk/src/com/google/caja/plugin/domita.js
trunk/tests/com/google/caja/plugin/domita_test_untrusted.html
Log:
Issue 11949 http://codereview.appspot.com/11949
DOMita fixes
Fix testPseudoElements which was failing on all browsers.
[email protected]
Modified: trunk/src/com/google/caja/plugin/domita.js
==============================================================================
--- trunk/src/com/google/caja/plugin/domita.js (original)
+++ trunk/src/com/google/caja/plugin/domita.js Wed Jan 21 22:18:31 2009
@@ -2586,6 +2586,7 @@
case 'body': return fakeNodeList([ this.getBody() ]);
case 'head': return fakeNodeList([ this.getHead() ]);
case 'title': return fakeNodeList([ this.getTitle() ]);
+ case 'html': return fakeNodeList([ this.getDocumentElement() ]);
default:
return tameGetElementsByTagName(
this.body___, tagName, this.editable___);
Modified: trunk/tests/com/google/caja/plugin/domita_test_untrusted.html
==============================================================================
--- trunk/tests/com/google/caja/plugin/domita_test_untrusted.html
(original)
+++ trunk/tests/com/google/caja/plugin/domita_test_untrusted.html Wed Jan
21 22:18:31 2009
@@ -655,13 +655,13 @@
var title = document.getElementsByTagName('title')[0];
var html = document.getElementsByTagName('html')[0];
- assertEquals('body', body.getTagName());
+ assertEquals('BODY', body.getTagName());
assertEquals('', body.getAttribute('foo'));
- assertEquals('head', head.getTagName());
+ assertEquals('HEAD', head.getTagName());
assertEquals('', head.getAttribute('foo'));
- assertEquals('title', title.getTagName());
+ assertEquals('TITLE', title.getTagName());
assertEquals('', title.getAttribute('foo'));
- assertEquals('html', body.getTagName());
+ assertEquals('HTML', html.getTagName());
assertEquals('', html.getAttribute('foo'));
pass('test-pseudo-elements');