gecko/editor/libeditor/tests/test_bug520189.html
Ehsan Akhgari 56a7c31718 Bug 1055105 - Flatten editor/libeditor/html to editor/libeditor; r=poiru
--HG--
rename : editor/libeditor/html/TextEditorTest.cpp => editor/libeditor/TextEditorTest.cpp
rename : editor/libeditor/html/TextEditorTest.h => editor/libeditor/TextEditorTest.h
rename : editor/libeditor/html/TypeInState.cpp => editor/libeditor/TypeInState.cpp
rename : editor/libeditor/html/TypeInState.h => editor/libeditor/TypeInState.h
rename : editor/libeditor/html/crashtests/336081-1.xhtml => editor/libeditor/crashtests/336081-1.xhtml
rename : editor/libeditor/html/crashtests/382778-1.html => editor/libeditor/crashtests/382778-1.html
rename : editor/libeditor/html/crashtests/407074-1.html => editor/libeditor/crashtests/407074-1.html
rename : editor/libeditor/html/crashtests/407277-1.html => editor/libeditor/crashtests/407277-1.html
rename : editor/libeditor/html/crashtests/414178-1.html => editor/libeditor/crashtests/414178-1.html
rename : editor/libeditor/html/crashtests/418923-1.html => editor/libeditor/crashtests/418923-1.html
rename : editor/libeditor/html/crashtests/420439.html => editor/libeditor/crashtests/420439.html
rename : editor/libeditor/html/crashtests/428489-1.html => editor/libeditor/crashtests/428489-1.html
rename : editor/libeditor/html/crashtests/431086-1.xhtml => editor/libeditor/crashtests/431086-1.xhtml
rename : editor/libeditor/html/crashtests/448329-1.html => editor/libeditor/crashtests/448329-1.html
rename : editor/libeditor/html/crashtests/448329-2.html => editor/libeditor/crashtests/448329-2.html
rename : editor/libeditor/html/crashtests/448329-3.html => editor/libeditor/crashtests/448329-3.html
rename : editor/libeditor/html/crashtests/456727-1.html => editor/libeditor/crashtests/456727-1.html
rename : editor/libeditor/html/crashtests/456727-2.html => editor/libeditor/crashtests/456727-2.html
rename : editor/libeditor/html/crashtests/467647-1.html => editor/libeditor/crashtests/467647-1.html
rename : editor/libeditor/html/crashtests/499844-1.html => editor/libeditor/crashtests/499844-1.html
rename : editor/libeditor/html/crashtests/503709-1.xhtml => editor/libeditor/crashtests/503709-1.xhtml
rename : editor/libeditor/html/crashtests/513375-1.xhtml => editor/libeditor/crashtests/513375-1.xhtml
rename : editor/libeditor/html/crashtests/535632-1.xhtml => editor/libeditor/crashtests/535632-1.xhtml
rename : editor/libeditor/html/crashtests/574558-1.xhtml => editor/libeditor/crashtests/574558-1.xhtml
rename : editor/libeditor/html/crashtests/582138-1.xhtml => editor/libeditor/crashtests/582138-1.xhtml
rename : editor/libeditor/html/crashtests/612565-1.html => editor/libeditor/crashtests/612565-1.html
rename : editor/libeditor/html/crashtests/615015-1.html => editor/libeditor/crashtests/615015-1.html
rename : editor/libeditor/html/crashtests/615450-1.html => editor/libeditor/crashtests/615450-1.html
rename : editor/libeditor/html/crashtests/639736-1.xhtml => editor/libeditor/crashtests/639736-1.xhtml
rename : editor/libeditor/html/crashtests/643786-1.html => editor/libeditor/crashtests/643786-1.html
rename : editor/libeditor/html/crashtests/682650-1.html => editor/libeditor/crashtests/682650-1.html
rename : editor/libeditor/html/crashtests/716456-1.html => editor/libeditor/crashtests/716456-1.html
rename : editor/libeditor/html/crashtests/759748.html => editor/libeditor/crashtests/759748.html
rename : editor/libeditor/html/crashtests/761861.html => editor/libeditor/crashtests/761861.html
rename : editor/libeditor/html/crashtests/766305.html => editor/libeditor/crashtests/766305.html
rename : editor/libeditor/html/crashtests/766387.html => editor/libeditor/crashtests/766387.html
rename : editor/libeditor/html/crashtests/766795.html => editor/libeditor/crashtests/766795.html
rename : editor/libeditor/html/crashtests/767169.html => editor/libeditor/crashtests/767169.html
rename : editor/libeditor/html/crashtests/768748.html => editor/libeditor/crashtests/768748.html
rename : editor/libeditor/html/crashtests/769008-1.html => editor/libeditor/crashtests/769008-1.html
rename : editor/libeditor/html/crashtests/769967.xhtml => editor/libeditor/crashtests/769967.xhtml
rename : editor/libeditor/html/crashtests/793866.html => editor/libeditor/crashtests/793866.html
rename : editor/libeditor/html/nsEditProperty.cpp => editor/libeditor/nsEditProperty.cpp
rename : editor/libeditor/html/nsHTMLAbsPosition.cpp => editor/libeditor/nsHTMLAbsPosition.cpp
rename : editor/libeditor/html/nsHTMLAnonymousUtils.cpp => editor/libeditor/nsHTMLAnonymousUtils.cpp
rename : editor/libeditor/html/nsHTMLCSSUtils.cpp => editor/libeditor/nsHTMLCSSUtils.cpp
rename : editor/libeditor/html/nsHTMLCSSUtils.h => editor/libeditor/nsHTMLCSSUtils.h
rename : editor/libeditor/html/nsHTMLDataTransfer.cpp => editor/libeditor/nsHTMLDataTransfer.cpp
rename : editor/libeditor/html/nsHTMLEditRules.cpp => editor/libeditor/nsHTMLEditRules.cpp
rename : editor/libeditor/html/nsHTMLEditRules.h => editor/libeditor/nsHTMLEditRules.h
rename : editor/libeditor/html/nsHTMLEditUtils.cpp => editor/libeditor/nsHTMLEditUtils.cpp
rename : editor/libeditor/html/nsHTMLEditUtils.h => editor/libeditor/nsHTMLEditUtils.h
rename : editor/libeditor/html/nsHTMLEditor.cpp => editor/libeditor/nsHTMLEditor.cpp
rename : editor/libeditor/html/nsHTMLEditor.h => editor/libeditor/nsHTMLEditor.h
rename : editor/libeditor/html/nsHTMLEditorEventListener.cpp => editor/libeditor/nsHTMLEditorEventListener.cpp
rename : editor/libeditor/html/nsHTMLEditorEventListener.h => editor/libeditor/nsHTMLEditorEventListener.h
rename : editor/libeditor/html/nsHTMLEditorStyle.cpp => editor/libeditor/nsHTMLEditorStyle.cpp
rename : editor/libeditor/html/nsHTMLInlineTableEditor.cpp => editor/libeditor/nsHTMLInlineTableEditor.cpp
rename : editor/libeditor/html/nsHTMLObjectResizer.cpp => editor/libeditor/nsHTMLObjectResizer.cpp
rename : editor/libeditor/html/nsHTMLObjectResizer.h => editor/libeditor/nsHTMLObjectResizer.h
rename : editor/libeditor/html/nsHTMLURIRefObject.cpp => editor/libeditor/nsHTMLURIRefObject.cpp
rename : editor/libeditor/html/nsHTMLURIRefObject.h => editor/libeditor/nsHTMLURIRefObject.h
rename : editor/libeditor/html/nsTableEditor.cpp => editor/libeditor/nsTableEditor.cpp
rename : editor/libeditor/html/nsWSRunObject.cpp => editor/libeditor/nsWSRunObject.cpp
rename : editor/libeditor/html/nsWSRunObject.h => editor/libeditor/nsWSRunObject.h
rename : editor/libeditor/html/tests/browserscope/lib/richtext/LICENSE => editor/libeditor/tests/browserscope/lib/richtext/LICENSE
rename : editor/libeditor/html/tests/browserscope/lib/richtext/README => editor/libeditor/tests/browserscope/lib/richtext/README
rename : editor/libeditor/html/tests/browserscope/lib/richtext/README.Mozilla => editor/libeditor/tests/browserscope/lib/richtext/README.Mozilla
rename : editor/libeditor/html/tests/browserscope/lib/richtext/currentStatus.js => editor/libeditor/tests/browserscope/lib/richtext/currentStatus.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext/current_revision => editor/libeditor/tests/browserscope/lib/richtext/current_revision
rename : editor/libeditor/html/tests/browserscope/lib/richtext/richtext/editable.html => editor/libeditor/tests/browserscope/lib/richtext/richtext/editable.html
rename : editor/libeditor/html/tests/browserscope/lib/richtext/richtext/js/range.js => editor/libeditor/tests/browserscope/lib/richtext/richtext/js/range.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext/richtext/richtext.html => editor/libeditor/tests/browserscope/lib/richtext/richtext/richtext.html
rename : editor/libeditor/html/tests/browserscope/lib/richtext/update_from_upstream => editor/libeditor/tests/browserscope/lib/richtext/update_from_upstream
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/LICENSE => editor/libeditor/tests/browserscope/lib/richtext2/LICENSE
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/README => editor/libeditor/tests/browserscope/lib/richtext2/README
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/README.Mozilla => editor/libeditor/tests/browserscope/lib/richtext2/README.Mozilla
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/currentStatus.js => editor/libeditor/tests/browserscope/lib/richtext2/currentStatus.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/current_revision => editor/libeditor/tests/browserscope/lib/richtext2/current_revision
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/__init__.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/__init__.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/common.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/common.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/handlers.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/handlers.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/common.css => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/common.css
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/editable-body.html => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/editable-body.html
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/editable-dM.html => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/editable-dM.html
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/editable-div.html => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/editable-div.html
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/editable.css => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/editable.css
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/canonicalize.js => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/canonicalize.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/compare.js => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/compare.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/output.js => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/output.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/pad.js => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/pad.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/range-bootstrap.js => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/range-bootstrap.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/range.js => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/range.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/run.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/units.js => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/units.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/variables.js => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/static/js/variables.js
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/templates/output.html => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/templates/output.html
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/templates/richtext2.html => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/templates/richtext2.html
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/__init__.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/__init__.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/apply.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/apply.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/applyCSS.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/applyCSS.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/change.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/change.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/changeCSS.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/changeCSS.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/delete.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/delete.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/forwarddelete.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/forwarddelete.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/insert.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/insert.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/queryEnabled.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/queryEnabled.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/queryIndeterm.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/queryIndeterm.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/queryState.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/queryState.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/querySupported.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/querySupported.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/queryValue.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/queryValue.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/selection.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/selection.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/unapply.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/unapply.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/tests/unapplyCSS.py => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/tests/unapplyCSS.py
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/unittestexample.html => editor/libeditor/tests/browserscope/lib/richtext2/richtext2/unittestexample.html
rename : editor/libeditor/html/tests/browserscope/lib/richtext2/update_from_upstream => editor/libeditor/tests/browserscope/lib/richtext2/update_from_upstream
rename : editor/libeditor/html/tests/browserscope/mochitest.ini => editor/libeditor/tests/browserscope/mochitest.ini
rename : editor/libeditor/html/tests/browserscope/test_richtext.html => editor/libeditor/tests/browserscope/test_richtext.html
rename : editor/libeditor/html/tests/browserscope/test_richtext2.html => editor/libeditor/tests/browserscope/test_richtext2.html
rename : editor/libeditor/html/tests/data/cfhtml-chromium.txt => editor/libeditor/tests/data/cfhtml-chromium.txt
rename : editor/libeditor/html/tests/data/cfhtml-firefox.txt => editor/libeditor/tests/data/cfhtml-firefox.txt
rename : editor/libeditor/html/tests/data/cfhtml-ie.txt => editor/libeditor/tests/data/cfhtml-ie.txt
rename : editor/libeditor/html/tests/data/cfhtml-nocontext.txt => editor/libeditor/tests/data/cfhtml-nocontext.txt
rename : editor/libeditor/html/tests/data/cfhtml-ooo.txt => editor/libeditor/tests/data/cfhtml-ooo.txt
rename : editor/libeditor/html/tests/file_bug549262.html => editor/libeditor/tests/file_bug549262.html
rename : editor/libeditor/html/tests/file_bug674770-1.html => editor/libeditor/tests/file_bug674770-1.html
rename : editor/libeditor/html/tests/file_select_all_without_body.html => editor/libeditor/tests/file_select_all_without_body.html
rename : editor/libeditor/html/tests/green.png => editor/libeditor/tests/green.png
rename : editor/libeditor/html/tests/test_CF_HTML_clipboard.html => editor/libeditor/tests/test_CF_HTML_clipboard.html
rename : editor/libeditor/html/tests/test_bug200416.html => editor/libeditor/tests/test_bug200416.html
rename : editor/libeditor/html/tests/test_bug289384.html => editor/libeditor/tests/test_bug289384.html
rename : editor/libeditor/html/tests/test_bug290026.html => editor/libeditor/tests/test_bug290026.html
rename : editor/libeditor/html/tests/test_bug291780.html => editor/libeditor/tests/test_bug291780.html
rename : editor/libeditor/html/tests/test_bug316447.html => editor/libeditor/tests/test_bug316447.html
rename : editor/libeditor/html/tests/test_bug332636.html => editor/libeditor/tests/test_bug332636.html
rename : editor/libeditor/html/tests/test_bug332636.html^headers^ => editor/libeditor/tests/test_bug332636.html^headers^
rename : editor/libeditor/html/tests/test_bug366682.html => editor/libeditor/tests/test_bug366682.html
rename : editor/libeditor/html/tests/test_bug372345.html => editor/libeditor/tests/test_bug372345.html
rename : editor/libeditor/html/tests/test_bug404320.html => editor/libeditor/tests/test_bug404320.html
rename : editor/libeditor/html/tests/test_bug410986.html => editor/libeditor/tests/test_bug410986.html
rename : editor/libeditor/html/tests/test_bug414526.html => editor/libeditor/tests/test_bug414526.html
rename : editor/libeditor/html/tests/test_bug417418.html => editor/libeditor/tests/test_bug417418.html
rename : editor/libeditor/html/tests/test_bug432225.html => editor/libeditor/tests/test_bug432225.html
rename : editor/libeditor/html/tests/test_bug439808.html => editor/libeditor/tests/test_bug439808.html
rename : editor/libeditor/html/tests/test_bug442186.html => editor/libeditor/tests/test_bug442186.html
rename : editor/libeditor/html/tests/test_bug449243.html => editor/libeditor/tests/test_bug449243.html
rename : editor/libeditor/html/tests/test_bug455992.html => editor/libeditor/tests/test_bug455992.html
rename : editor/libeditor/html/tests/test_bug456244.html => editor/libeditor/tests/test_bug456244.html
rename : editor/libeditor/html/tests/test_bug460740.html => editor/libeditor/tests/test_bug460740.html
rename : editor/libeditor/html/tests/test_bug468353.html => editor/libeditor/tests/test_bug468353.html
rename : editor/libeditor/html/tests/test_bug478725.html => editor/libeditor/tests/test_bug478725.html
rename : editor/libeditor/html/tests/test_bug480647.html => editor/libeditor/tests/test_bug480647.html
rename : editor/libeditor/html/tests/test_bug480972.html => editor/libeditor/tests/test_bug480972.html
rename : editor/libeditor/html/tests/test_bug484181.html => editor/libeditor/tests/test_bug484181.html
rename : editor/libeditor/html/tests/test_bug487524.html => editor/libeditor/tests/test_bug487524.html
rename : editor/libeditor/html/tests/test_bug489202.xul => editor/libeditor/tests/test_bug489202.xul
rename : editor/libeditor/html/tests/test_bug490879.xul => editor/libeditor/tests/test_bug490879.xul
rename : editor/libeditor/html/tests/test_bug520189.html => editor/libeditor/tests/test_bug520189.html
rename : editor/libeditor/html/tests/test_bug525389.html => editor/libeditor/tests/test_bug525389.html
rename : editor/libeditor/html/tests/test_bug537046.html => editor/libeditor/tests/test_bug537046.html
rename : editor/libeditor/html/tests/test_bug549262.html => editor/libeditor/tests/test_bug549262.html
rename : editor/libeditor/html/tests/test_bug550434.html => editor/libeditor/tests/test_bug550434.html
rename : editor/libeditor/html/tests/test_bug551704.html => editor/libeditor/tests/test_bug551704.html
rename : editor/libeditor/html/tests/test_bug552782.html => editor/libeditor/tests/test_bug552782.html
rename : editor/libeditor/html/tests/test_bug570144.html => editor/libeditor/tests/test_bug570144.html
rename : editor/libeditor/html/tests/test_bug578771.html => editor/libeditor/tests/test_bug578771.html
rename : editor/libeditor/html/tests/test_bug587461.html => editor/libeditor/tests/test_bug587461.html
rename : editor/libeditor/html/tests/test_bug592592.html => editor/libeditor/tests/test_bug592592.html
rename : editor/libeditor/html/tests/test_bug597784.html => editor/libeditor/tests/test_bug597784.html
rename : editor/libeditor/html/tests/test_bug599322.html => editor/libeditor/tests/test_bug599322.html
rename : editor/libeditor/html/tests/test_bug607584.html => editor/libeditor/tests/test_bug607584.html
rename : editor/libeditor/html/tests/test_bug607584.xul => editor/libeditor/tests/test_bug607584.xul
rename : editor/libeditor/html/tests/test_bug611182.html => editor/libeditor/tests/test_bug611182.html
rename : editor/libeditor/html/tests/test_bug612128.html => editor/libeditor/tests/test_bug612128.html
rename : editor/libeditor/html/tests/test_bug612447.html => editor/libeditor/tests/test_bug612447.html
rename : editor/libeditor/html/tests/test_bug616590.xul => editor/libeditor/tests/test_bug616590.xul
rename : editor/libeditor/html/tests/test_bug620906.html => editor/libeditor/tests/test_bug620906.html
rename : editor/libeditor/html/tests/test_bug622371.html => editor/libeditor/tests/test_bug622371.html
rename : editor/libeditor/html/tests/test_bug629845.html => editor/libeditor/tests/test_bug629845.html
rename : editor/libeditor/html/tests/test_bug635636.html => editor/libeditor/tests/test_bug635636.html
rename : editor/libeditor/html/tests/test_bug640321.html => editor/libeditor/tests/test_bug640321.html
rename : editor/libeditor/html/tests/test_bug668599.html => editor/libeditor/tests/test_bug668599.html
rename : editor/libeditor/html/tests/test_bug674770-1.html => editor/libeditor/tests/test_bug674770-1.html
rename : editor/libeditor/html/tests/test_bug674770-2.html => editor/libeditor/tests/test_bug674770-2.html
rename : editor/libeditor/html/tests/test_bug674861.html => editor/libeditor/tests/test_bug674861.html
rename : editor/libeditor/html/tests/test_bug676401.html => editor/libeditor/tests/test_bug676401.html
rename : editor/libeditor/html/tests/test_bug677752.html => editor/libeditor/tests/test_bug677752.html
rename : editor/libeditor/html/tests/test_bug686203.html => editor/libeditor/tests/test_bug686203.html
rename : editor/libeditor/html/tests/test_bug697842.html => editor/libeditor/tests/test_bug697842.html
rename : editor/libeditor/html/tests/test_bug725069.html => editor/libeditor/tests/test_bug725069.html
rename : editor/libeditor/html/tests/test_bug735059.html => editor/libeditor/tests/test_bug735059.html
rename : editor/libeditor/html/tests/test_bug738366.html => editor/libeditor/tests/test_bug738366.html
rename : editor/libeditor/html/tests/test_bug757371.html => editor/libeditor/tests/test_bug757371.html
rename : editor/libeditor/html/tests/test_bug767684.html => editor/libeditor/tests/test_bug767684.html
rename : editor/libeditor/html/tests/test_bug780035.html => editor/libeditor/tests/test_bug780035.html
rename : editor/libeditor/html/tests/test_bug780908.xul => editor/libeditor/tests/test_bug780908.xul
rename : editor/libeditor/html/tests/test_bug787432.html => editor/libeditor/tests/test_bug787432.html
rename : editor/libeditor/html/tests/test_bug790475.html => editor/libeditor/tests/test_bug790475.html
rename : editor/libeditor/html/tests/test_bug796839.html => editor/libeditor/tests/test_bug796839.html
rename : editor/libeditor/html/tests/test_bug832025.html => editor/libeditor/tests/test_bug832025.html
rename : editor/libeditor/html/tests/test_bug857487.html => editor/libeditor/tests/test_bug857487.html
rename : editor/libeditor/html/tests/test_bug966155.html => editor/libeditor/tests/test_bug966155.html
rename : editor/libeditor/html/tests/test_bug966552.html => editor/libeditor/tests/test_bug966552.html
rename : editor/libeditor/html/tests/test_bug998188.html => editor/libeditor/tests/test_bug998188.html
rename : editor/libeditor/html/tests/test_contenteditable_focus.html => editor/libeditor/tests/test_contenteditable_focus.html
rename : editor/libeditor/html/tests/test_contenteditable_text_input_handling.html => editor/libeditor/tests/test_contenteditable_text_input_handling.html
rename : editor/libeditor/html/tests/test_dom_input_event_on_htmleditor.html => editor/libeditor/tests/test_dom_input_event_on_htmleditor.html
rename : editor/libeditor/html/tests/test_htmleditor_keyevent_handling.html => editor/libeditor/tests/test_htmleditor_keyevent_handling.html
rename : editor/libeditor/html/tests/test_keypress_untrusted_event.html => editor/libeditor/tests/test_keypress_untrusted_event.html
rename : editor/libeditor/html/tests/test_root_element_replacement.html => editor/libeditor/tests/test_root_element_replacement.html
rename : editor/libeditor/html/tests/test_select_all_without_body.html => editor/libeditor/tests/test_select_all_without_body.html
rename : editor/libeditor/html/tests/test_spellcheck_pref.html => editor/libeditor/tests/test_spellcheck_pref.html
2014-08-18 17:28:17 -04:00

622 lines
24 KiB
HTML

<!DOCTYPE HTML>
<html>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=520182
-->
<head>
<title>Test for Bug 520182</title>
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=520182">Mozilla Bug 520182</a>
<p id="display"></p>
<div id="content">
<iframe id="a" src="about:blank"></iframe>
<iframe id="b" src="about:blank"></iframe>
<iframe id="c" src="about:blank"></iframe>
<div id="d" contenteditable="true"></div>
<div id="e" contenteditable="true"></div>
<div id="f" contenteditable="true"></div>
<iframe id="g" src="about:blank"></iframe>
<iframe id="h" src="about:blank"></iframe>
<div id="i" contenteditable="true"></div>
<div id="j" contenteditable="true"></div>
<iframe id="k" src="about:blank"></iframe>
<div id="l" contenteditable="true"></div>
<iframe id="m" src="about:blank"></iframe>
<div id="n" contenteditable="true"></div>
<iframe id="o" src="about:blank"></iframe>
<div id="p" contenteditable="true"></div>
<iframe id="q" src="about:blank"></iframe>
<div id="r" contenteditable="true"></div>
<iframe id="s" src="about:blank"></iframe>
<div id="t" contenteditable="true"></div>
<iframe id="u" src="about:blank"></iframe>
<div id="v" contenteditable="true"></div>
<iframe id="w" src="about:blank"></iframe>
<div id="x" contenteditable="true"></div>
<iframe id="y" src="about:blank"></iframe>
<div id="z" contenteditable="true"></div>
<iframe id="aa" src="about:blank"></iframe>
<div id="bb" contenteditable="true"></div>
<iframe id="cc" src="about:blank"></iframe>
<div id="dd" contenteditable="true"></div>
<iframe id="ee" src="about:blank"></iframe>
<div id="ff" contenteditable="true"></div>
<iframe id="gg" src="about:blank"></iframe>
<div id="hh" contenteditable="true"></div>
<iframe id="ii" src="about:blank"></iframe>
<div id="jj" contenteditable="true"></div>
<iframe id="kk" src="about:blank"></iframe>
<div id="ll" contenteditable="true"></div>
<iframe id="mm" src="about:blank"></iframe>
<div id="nn" contenteditable="true"></div>
<iframe id="oo" src="about:blank"></iframe>
<div id="pp" contenteditable="true"></div>
<iframe id="qq" src="about:blank"></iframe>
<div id="rr" contenteditable="true"></div>
<iframe id="ss" src="about:blank"></iframe>
<div id="tt" contenteditable="true"></div>
<iframe id="uu" src="about:blank"></iframe>
<div id="vv" contenteditable="true"></div>
<div id="sss" contenteditable="true"></div>
<iframe id="ssss" src="about:blank"></iframe>
<div id="ttt" contenteditable="true"></div>
<iframe id="tttt" src="about:blank"></iframe>
<div id="uuu" contenteditable="true"></div>
<iframe id="uuuu" src="about:blank"></iframe>
<div id="vvv" contenteditable="true"></div>
<iframe id="vvvv" src="about:blank"></iframe>
<div id="www" contenteditable="true"></div>
<iframe id="wwww" src="about:blank"></iframe>
<div id="xxx" contenteditable="true"></div>
<iframe id="xxxx" src="about:blank"></iframe>
<div id="yyy" contenteditable="true"></div>
<iframe id="yyyy" src="about:blank"></iframe>
</div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 520182 **/
const dataPayload = "foo<iframe src=\"data:text/html,bar\"></iframe>baz";
const jsPayload = "foo<iframe src=\"javascript:void('bar');\"></iframe>baz";
const httpPayload = "foo<iframe src=\"http://mochi.test:8888/\"></iframe>baz";
const scriptPayload ="foo<script>document.write(\"<iframe></iframe>\");</sc" + "ript>baz";
const scriptExternalPayload = "foo<script src=\"data:text/javascript,document.write('<iframe></iframe>');\"></sc" + "ript>baz";
const validStyle1Payload = "foo<style>#bar{color:red;}</style>baz";
const validStyle2Payload = "foo<span style=\"color:red\">bar</span>baz";
const validStyle3Payload = "foo<style>@font-face{font-family:xxx;src:'xxx.ttf';}</style>baz";
const validStyle4Payload = "foo<style>@namespace xxx url(http://example.com/);</style>baz";
const invalidStyle1Payload = "foo<style>#bar{-moz-binding:url('data:text/xml,<?xml version=\"1.0\"><binding xmlns=\"http://www.mozilla.org/xbl\"/>');}</style>baz";
const invalidStyle2Payload = "foo<span style=\"-moz-binding:url('data:text/xml,<?xml version=&quot;1.0&quot;><binding xmlns=&quot;http://www.mozilla.org/xbl&quot;/>');\">bar</span>baz";
const invalidStyle3Payload = "foo<style>@import 'xxx.css';</style>baz";
const invalidStyle4Payload = "foo<span style=\"@import 'xxx.css';\">bar</span>baz";
const invalidStyle5Payload = "foo<span style=\"@font-face{font-family:xxx;src:'xxx.ttf';}\">bar</span>baz";
const invalidStyle6Payload = "foo<span style=\"@namespace xxx url(http://example.com/);\">bar</span>baz";
const invalidStyle7Payload = "<html><head><title>xxx</title></head><body>foo</body></html>";
const invalidStyle8Payload = "foo<style>@-moz-document url(http://example.com/) {};</style>baz";
const invalidStyle9Payload = "foo<style>@-moz-keyframes bar {};</style>baz";
const nestedStylePayload = "foo<style>#bar1{-moz-binding:url('data:text/xml,<?xml version=&quot;1.0&quot;><binding xmlns=&quot;http://www.mozilla.org/xbl&quot; id=&quot;binding-1&quot;/>');<style></style>#bar2{-moz-binding:url('data:text/xml,<?xml version=&quot;1.0&quot;><binding xmlns=&quot;http://www.mozilla.org/xbl&quot; id=&quot;binding-2&quot;/>');</style>baz";
const validImgSrc1Payload = "foo<img src=\"data:image/png,bar\">baz";
const validImgSrc2Payload = "foo<img src=\"javascript:void('bar');\">baz";
const validImgSrc3Payload = "foo<img src=\"file:///bar.png\">baz";
const validDataFooPayload = "foo<span data-bar=\"value\">baz</span>";
const validDataFoo2Payload = "foo<span _bar=\"value\">baz</span>";
const svgPayload = "foo<svg><title>svgtitle</title></svg>bar";
const svg2Payload = "foo<svg><bogussvg/></svg>bar";
const mathPayload = "foo<math><bogusmath/></math>bar";
const math2Payload = "foo<math><style>@import \"yyy.css\";</style</math>bar";
const math3Payload = "foo<math><mi></mi></math>bar";
const videoPayload = "foo<video></video>bar";
const microdataPayload = "<head><meta name=foo content=bar><link rel=stylesheet href=url></head><body><meta itemprop=foo content=bar><link itemprop=bar href=url></body>";
var tests = [
{
id: "a",
isIFrame: true,
payload: dataPayload,
iframeCount: 0,
rootElement: function() document.getElementById("a").contentDocument.documentElement
},
{
id: "b",
isIFrame: true,
payload: jsPayload,
iframeCount: 0,
rootElement: function() document.getElementById("b").contentDocument.documentElement
},
{
id: "c",
isIFrame: true,
payload: httpPayload,
iframeCount: 0,
rootElement: function() document.getElementById("c").contentDocument.documentElement
},
{
id: "g",
isIFrame: true,
payload: scriptPayload,
rootElement: function() document.getElementById("g").contentDocument.documentElement,
iframeCount: 0
},
{
id: "h",
isIFrame: true,
payload: scriptExternalPayload,
rootElement: function() document.getElementById("h").contentDocument.documentElement,
iframeCount: 0
},
{
id: "d",
payload: dataPayload,
iframeCount: 0,
rootElement: function() document.getElementById("d")
},
{
id: "e",
payload: jsPayload,
iframeCount: 0,
rootElement: function() document.getElementById("e")
},
{
id: "f",
payload: httpPayload,
iframeCount: 0,
rootElement: function() document.getElementById("f")
},
{
id: "i",
payload: scriptPayload,
rootElement: function() document.getElementById("i"),
iframeCount: 0
},
{
id: "j",
payload: scriptExternalPayload,
rootElement: function() document.getElementById("j"),
iframeCount: 0
},
{
id: "k",
isIFrame: true,
payload: validStyle1Payload,
rootElement: function() document.getElementById("k").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("style"), -1, "Should have retained style")
},
{
id: "l",
payload: validStyle1Payload,
rootElement: function() document.getElementById("l"),
checkResult: function(html) isnot(html.indexOf("style"), -1, "Should have retained style")
},
{
id: "m",
isIFrame: true,
payload: validStyle2Payload,
rootElement: function() document.getElementById("m").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("style"), -1, "Should have retained style")
},
{
id: "n",
payload: validStyle2Payload,
rootElement: function() document.getElementById("n"),
checkResult: function(html) isnot(html.indexOf("style"), -1, "Should have retained style")
},
{
id: "o",
isIFrame: true,
payload: invalidStyle1Payload,
rootElement: function() document.getElementById("o").contentDocument.documentElement,
checkResult: function(html) is(html.indexOf("binding"), -1, "Should not have retained the binding style")
},
{
id: "p",
payload: invalidStyle1Payload,
rootElement: function() document.getElementById("p"),
checkResult: function(html) is(html.indexOf("binding"), -1, "Should not have retained the binding style")
},
{
id: "q",
isIFrame: true,
payload: invalidStyle2Payload,
rootElement: function() document.getElementById("q").contentDocument.documentElement,
checkResult: function(html) is(html.indexOf("binding"), -1, "Should not have retained the binding style")
},
{
id: "r",
payload: invalidStyle2Payload,
rootElement: function() document.getElementById("r"),
checkResult: function(html) is(html.indexOf("binding"), -1, "Should not have retained the binding style")
},
{
id: "s",
isIFrame: true,
payload: invalidStyle1Payload,
rootElement: function() document.getElementById("s").contentDocument.documentElement,
checkResult: function(html) is(html.indexOf("xxx"), -1, "Should not have retained the import style")
},
{
id: "t",
payload: invalidStyle1Payload,
rootElement: function() document.getElementById("t"),
checkResult: function(html) is(html.indexOf("xxx"), -1, "Should not have retained the import style")
},
{
id: "u",
isIFrame: true,
payload: invalidStyle2Payload,
rootElement: function() document.getElementById("u").contentDocument.documentElement,
checkResult: function(html) is(html.indexOf("xxx"), -1, "Should not have retained the import style")
},
{
id: "v",
payload: invalidStyle2Payload,
rootElement: function() document.getElementById("v"),
checkResult: function(html) is(html.indexOf("xxx"), -1, "Should not have retained the import style")
},
{
id: "w",
isIFrame: true,
payload: validStyle3Payload,
rootElement: function() document.getElementById("w").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("xxx"), -1, "Should have retained the font-face style")
},
{
id: "x",
payload: validStyle3Payload,
rootElement: function() document.getElementById("x"),
checkResult: function(html) isnot(html.indexOf("xxx"), -1, "Should have retained the font-face style")
},
{
id: "y",
isIFrame: true,
payload: invalidStyle5Payload,
rootElement: function() document.getElementById("y").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("xxx"), -1, "Should not have retained the font-face style")
},
{
id: "z",
payload: invalidStyle5Payload,
rootElement: function() document.getElementById("z"),
checkResult: function(html) isnot(html.indexOf("xxx"), -1, "Should not have retained the font-face style")
},
{
id: "aa",
isIFrame: true,
payload: nestedStylePayload,
rootElement: function() document.getElementById("aa").contentDocument.documentElement,
checkResult: function(html, text) {
is(html.indexOf("binding-1"), -1, "Should not have retained the binding-1 style");
isnot(text.indexOf("#bar2"), -1, "Should have retained binding-2 as text content");
is(text.indexOf("binding-2"), -1, "Should not have retained binding-2 as a tag");
}
},
{
id: "bb",
payload: nestedStylePayload,
rootElement: function() document.getElementById("bb"),
checkResult: function(html, text) {
is(html.indexOf("binding-1"), -1, "Should not have retained the binding-1 style");
isnot(text.indexOf("#bar2"), -1, "Should have retained binding-2 as text content");
is(text.indexOf("binding-2"), -1, "Should not have retained binding-2 as a tag");
}
},
{
id: "cc",
isIFrame: true,
payload: validStyle4Payload,
rootElement: function() document.getElementById("cc").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("xxx"), -1, "Should have retained the namespace style")
},
{
id: "dd",
payload: validStyle4Payload,
rootElement: function() document.getElementById("dd"),
checkResult: function(html) isnot(html.indexOf("xxx"), -1, "Should have retained the namespace style")
},
{
id: "ee",
isIFrame: true,
payload: invalidStyle6Payload,
rootElement: function() document.getElementById("ee").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("xxx"), -1, "Should not have retained the namespace style")
},
{
id: "ff",
payload: invalidStyle6Payload,
rootElement: function() document.getElementById("ff"),
checkResult: function(html) isnot(html.indexOf("xxx"), -1, "Should not have retained the namespace style")
},
{
id: "gg",
isIFrame: true,
payload: invalidStyle6Payload,
rootElement: function() document.getElementById("gg").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the src attribute for the image")
},
{
id: "hh",
payload: invalidStyle6Payload,
rootElement: function() document.getElementById("hh"),
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the src attribute for the image")
},
{
id: "ii",
isIFrame: true,
payload: invalidStyle6Payload,
rootElement: function() document.getElementById("ii").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the src attribute for the image")
},
{
id: "jj",
payload: invalidStyle6Payload,
rootElement: function() document.getElementById("jj"),
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the src attribute for the image")
},
{
id: "kk",
isIFrame: true,
payload: invalidStyle6Payload,
rootElement: function() document.getElementById("kk").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the src attribute for the image")
},
{
id: "ll",
payload: invalidStyle6Payload,
rootElement: function() document.getElementById("ll"),
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the src attribute for the image")
},
{
id: "mm",
isIFrame: true,
indirectPaste: true,
payload: invalidStyle7Payload,
rootElement: function() document.getElementById("mm").contentDocument.documentElement,
checkResult: function(html) {
is(html.indexOf("xxx"), -1, "Should not have retained the title text");
isnot(html.indexOf("foo"), -1, "Should have retained the body text");
}
},
{
id: "nn",
indirectPaste: true,
payload: invalidStyle7Payload,
rootElement: function() document.getElementById("nn"),
checkResult: function(html) {
is(html.indexOf("xxx"), -1, "Should not have retained the title text");
isnot(html.indexOf("foo"), -1, "Should have retained the body text");
}
},
{
id: "oo",
isIFrame: true,
payload: validDataFooPayload,
rootElement: function() document.getElementById("oo").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the data-bar attribute")
},
{
id: "pp",
payload: validDataFooPayload,
rootElement: function() document.getElementById("pp"),
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the data-bar attribute")
},
{
id: "qq",
isIFrame: true,
payload: validDataFoo2Payload,
rootElement: function() document.getElementById("qq").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the _bar attribute")
},
{
id: "rr",
payload: validDataFoo2Payload,
rootElement: function() document.getElementById("rr"),
checkResult: function(html) isnot(html.indexOf("bar"), -1, "Should have retained the _bar attribute")
},
{
id: "ss",
isIFrame: true,
payload: invalidStyle8Payload,
rootElement: function() document.getElementById("ss").contentDocument.documentElement,
checkResult: function(html) is(html.indexOf("@-moz-document"), -1, "Should not have retained the @-moz-document rule")
},
{
id: "tt",
payload: invalidStyle8Payload,
rootElement: function() document.getElementById("tt"),
checkResult: function(html) is(html.indexOf("@-moz-document"), -1, "Should not have retained the @-moz-document rule")
},
{
id: "uu",
isIFrame: true,
payload: invalidStyle9Payload,
rootElement: function() document.getElementById("uu").contentDocument.documentElement,
checkResult: function(html) is(html.indexOf("@-moz-keyframes"), -1, "Should not have retained the @-moz-keyframes rule")
},
{
id: "vv",
payload: invalidStyle9Payload,
rootElement: function() document.getElementById("vv"),
checkResult: function(html) is(html.indexOf("@-moz-keyframes"), -1, "Should not have retained the @-moz-keyframes rule")
},
{
id: "sss",
payload: svgPayload,
rootElement: function() document.getElementById("sss"),
checkResult: function(html) isnot(html.indexOf("svgtitle"), -1, "Should have retained SVG title")
},
{
id: "ssss",
isIFrame: true,
payload: svgPayload,
rootElement: function() document.getElementById("ssss").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("svgtitle"), -1, "Should have retained SVG title")
},
{
id: "ttt",
payload: svg2Payload,
rootElement: function() document.getElementById("ttt"),
checkResult: function(html) is(html.indexOf("bogussvg"), -1, "Should have dropped bogussvg element")
},
{
id: "tttt",
isIFrame: true,
payload: svg2Payload,
rootElement: function() document.getElementById("tttt").contentDocument.documentElement,
checkResult: function(html) is(html.indexOf("bogussvg"), -1, "Should have dropped bogussvg element")
},
{
id: "uuu",
payload: mathPayload,
rootElement: function() document.getElementById("uuu"),
checkResult: function(html) is(html.indexOf("bogusmath"), -1, "Should have dropped bogusmath element")
},
{
id: "uuuu",
isIFrame: true,
payload: mathPayload,
rootElement: function() document.getElementById("uuuu").contentDocument.documentElement,
checkResult: function(html) is(html.indexOf("bogusmath"), -1, "Should have dropped bogusmath element")
},
{
id: "vvv",
payload: math2Payload,
rootElement: function() document.getElementById("vvv"),
checkResult: function(html) is(html.indexOf("yyy.css"), -1, "Should have dropped MathML style element")
},
{
id: "vvvv",
isIFrame: true,
payload: math2Payload,
rootElement: function() document.getElementById("vvvv").contentDocument.documentElement,
checkResult: function(html) is(html.indexOf("yyy.css"), -1, "Should have dropped MathML style element")
},
{
id: "www",
payload: math3Payload,
rootElement: function() document.getElementById("www"),
checkResult: function(html) isnot(html.indexOf("<mi"), -1, "Should not have dropped MathML mi element")
},
{
id: "wwww",
isIFrame: true,
payload: math3Payload,
rootElement: function() document.getElementById("wwww").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("<mi"), -1, "Should not have dropped MathML mi element")
},
{
id: "xxx",
payload: videoPayload,
rootElement: function() document.getElementById("xxx"),
checkResult: function(html) isnot(html.indexOf("controls="), -1, "Should have added the controls attribute")
},
{
id: "xxxx",
isIFrame: true,
payload: videoPayload,
rootElement: function() document.getElementById("xxxx").contentDocument.documentElement,
checkResult: function(html) isnot(html.indexOf("controls="), -1, "Should have added the controls attribute")
},
{
id: "yyy",
payload: microdataPayload,
rootElement: function() document.getElementById("yyy"),
checkResult: function(html) { is(html.indexOf("name"), -1, "Should have dropped name."); is(html.indexOf("rel"), -1, "Should have dropped rel."); isnot(html.indexOf("itemprop"), -1, "Should not have dropped itemprop."); }
},
{
id: "yyyy",
isIFrame: true,
payload: microdataPayload,
rootElement: function() document.getElementById("yyyy").contentDocument.documentElement,
checkResult: function(html) { is(html.indexOf("name"), -1, "Should have dropped name."); is(html.indexOf("rel"), -1, "Should have dropped rel."); isnot(html.indexOf("itemprop"), -1, "Should not have dropped itemprop."); }
}
];
function doNextTest() {
if (typeof testCounter == "undefined")
testCounter = 0;
else if (++testCounter == tests.length) {
SimpleTest.finish();
return;
}
runTest(tests[testCounter]);
doNextTest();
}
function getLoadContext() {
const Ci = SpecialPowers.Ci;
return SpecialPowers.wrap(window)
.QueryInterface(Ci.nsIInterfaceRequestor)
.getInterface(Ci.nsIWebNavigation)
.QueryInterface(Ci.nsILoadContext);
}
function runTest(test) {
var elem = document.getElementById(test.id);
if ("isIFrame" in test) {
elem.contentDocument.designMode = "on";
elem.contentWindow.focus();
} else
elem.focus();
var trans = SpecialPowers.Cc["@mozilla.org/widget/transferable;1"]
.createInstance(SpecialPowers.Ci.nsITransferable);
trans.init(getLoadContext());
var data = SpecialPowers.Cc["@mozilla.org/supports-string;1"]
.createInstance(SpecialPowers.Ci.nsISupportsString);
data.data = test.payload;
trans.addDataFlavor("text/html");
trans.setTransferData("text/html", data, data.data.length * 2);
if ("indirectPaste" in test) {
var editor, win;
if ("isIFrame" in test) {
win = elem.contentDocument.defaultView;
} else {
getSelection().collapse(elem, 0);
win = window;
}
editor = SpecialPowers.wrap(win).QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
.getInterface(SpecialPowers.Ci.nsIWebNavigation)
.QueryInterface(SpecialPowers.Ci.nsIDocShell)
.editor;
editor.pasteTransferable(trans);
} else {
var clipboard = SpecialPowers.Cc["@mozilla.org/widget/clipboard;1"]
.getService(SpecialPowers.Ci.nsIClipboard);
clipboard.setData(trans, null, SpecialPowers.Ci.nsIClipboard.kGlobalClipboard);
synthesizeKey("V", {accelKey: true});
}
if ("checkResult" in test) {
if ("isIFrame" in test) {
test.checkResult(elem.contentDocument.documentElement.innerHTML,
elem.contentDocument.documentElement.textContent);
} else {
test.checkResult(elem.innerHTML, elem.textContent);
}
} else {
var iframes = test.rootElement().querySelectorAll("iframe");
var expectedIFrameCount = ("iframeCount" in test) ? test.iframeCount : 1;
is(iframes.length, expectedIFrameCount, "Only " + expectedIFrameCount + " iframe should be pasted");
if (expectedIFrameCount > 0) {
ok(!iframes[0].hasAttribute("src"), "iframe should not have a src attrib");
}
}
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(doNextTest);
</script>
</pre>
</body>
</html>