Bug 1255262 - convert test_selection_preventDefault.html to mochitest. r=smaug.

MozReview-Commit-ID: IPZKEA6082n

--HG--
extra : rebase_source : 47761c512e502cf8e0c73f3b9e03699e33f6b35d
This commit is contained in:
Shih-Chiang Chien 2016-03-10 11:11:41 +08:00
Родитель 3bdc12a666
Коммит d06a3c964a
3 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -14,6 +14,4 @@ skip-if = true # Bug 1163311
[test_bug514732-2.xul]
[test_bug632379.xul]
skip-if = buildapp == 'mulet'
[test_selection_preventDefault.html]
skip-if = buildapp == 'mulet'
[test_selection_underline.html]

Просмотреть файл

@ -135,6 +135,8 @@ skip-if = buildapp == 'b2g' # Bug 1062609
[test_selection_expanding.html]
skip-if = buildapp == 'mulet' || buildapp == 'b2g' # b2g(mouse selection not working) b2g-debug(mouse selection not working) b2g-desktop(mouse selection not working)
support-files = selection_expanding_xbl.xml
[test_selection_preventDefault.html]
skip-if = buildapp == 'mulet'
[test_selection_splitText-normalize.html]
[test_selection_touchevents.html]
[test_taintedfilters.html]

Просмотреть файл

@ -2,9 +2,9 @@
<html>
<head>
<title>selection preventDefault test</title>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css" />
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<style type="text/css">
#fixedDiv1 {
@ -40,8 +40,9 @@ function test()
function getSelectionForEditor(aEditorElement)
{
const nsIDOMNSEditableElement =
Components.interfaces.nsIDOMNSEditableElement;
return aEditorElement.QueryInterface(nsIDOMNSEditableElement).editor.selection;
SpecialPowers.Ci.nsIDOMNSEditableElement;
return SpecialPowers.wrap(aEditorElement)
.QueryInterface(nsIDOMNSEditableElement).editor.selection;
}
function clear()