OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../js/resources/js-test-pre.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
5 <script> | 5 <script> |
6 window.onload = function () { | 6 window.onload = function () { |
7 debug("This test ensures that content inside a seamless iframe does
not inherit editability via the contenteditable attribute on a parent element, b
ut does via a CSS rule that cascades into the frame."); | 7 debug("This test ensures that content inside a seamless iframe does
not inherit editability via the contenteditable attribute on a parent element, b
ut does via a CSS rule that cascades into the frame."); |
8 | 8 |
9 window.span = document.querySelector('div > iframe').contentDocument
.querySelector('span'); | 9 window.span = document.querySelector('div > iframe').contentDocument
.querySelector('span'); |
10 window.p = document.querySelector('body > iframe').contentDocument.q
uerySelector('p'); | 10 window.p = document.querySelector('body > iframe').contentDocument.q
uerySelector('p'); |
11 | 11 |
12 shouldBeEqualToString("window.getComputedStyle(span).getPropertyCSSV
alue('-webkit-user-modify').cssText", "read-only"); | 12 shouldBeEqualToString("window.getComputedStyle(span).getPropertyCSSV
alue('-webkit-user-modify').cssText", "read-only"); |
13 shouldBeEqualToString("window.getComputedStyle(p).getPropertyCSSValu
e('-webkit-user-modify').cssText", "read-write"); | 13 shouldBeEqualToString("window.getComputedStyle(p).getPropertyCSSValu
e('-webkit-user-modify').cssText", "read-write"); |
14 }; | 14 }; |
15 </script> | 15 </script> |
16 </head> | 16 </head> |
17 <body> | 17 <body> |
18 <div contenteditable> | 18 <div contenteditable> |
19 <iframe seamless srcdoc="<span>This span is not editable.</span>"></ifra
me> | 19 <iframe seamless srcdoc="<span>This span is not editable.</span>"></ifra
me> |
20 </div> | 20 </div> |
21 <style> | 21 <style> |
22 p { -webkit-user-modify: read-write; } | 22 p { -webkit-user-modify: read-write; } |
23 </style> | 23 </style> |
24 <iframe seamless srcdoc="<p>This paragraph is not editable.</p>"></iframe> | 24 <iframe seamless srcdoc="<p>This paragraph is not editable.</p>"></iframe> |
25 </body> | 25 </body> |
26 </html> | 26 </html> |
OLD | NEW |