mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-13 19:41:49 +00:00
Bug 735059 - Second and third execCommand() parameters should be optional; r=ehsan
This commit is contained in:
parent
cca9cd3b56
commit
6516ccca87
@ -91,8 +91,8 @@ interface nsIDOMHTMLDocument : nsIDOMDocument
|
||||
attribute DOMString designMode;
|
||||
|
||||
boolean execCommand(in DOMString commandID,
|
||||
in boolean doShowUI,
|
||||
in DOMString value);
|
||||
[optional] in boolean doShowUI,
|
||||
[optional] in DOMString value);
|
||||
|
||||
// returns true if the help is being shown for command (false if not)
|
||||
boolean execCommandShowHelp(in DOMString commandID);
|
||||
|
@ -93,6 +93,7 @@ _TEST_FILES = \
|
||||
test_bug677752.html \
|
||||
test_bug697842.html \
|
||||
test_bug725069.html \
|
||||
test_bug735059.html \
|
||||
test_CF_HTML_clipboard.html \
|
||||
test_contenteditable_focus.html \
|
||||
test_htmleditor_keyevent_handling.html \
|
||||
|
22
editor/libeditor/html/tests/test_bug735059.html
Normal file
22
editor/libeditor/html/tests/test_bug735059.html
Normal file
@ -0,0 +1,22 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=735059
|
||||
-->
|
||||
<title>Test for Bug 735059</title>
|
||||
<script src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" href="/tests/SimpleTest/test.css"/>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=735059">Mozilla Bug 735059</a>
|
||||
<div id="display" contenteditable>foo</div>
|
||||
<pre id="test">
|
||||
<script>
|
||||
/** Test for Bug 735059 **/
|
||||
|
||||
// Value defaults to the empty string, which evaluates to true, so this
|
||||
// disables CSS styling
|
||||
document.execCommand("usecss");
|
||||
getSelection().selectAllChildren(document.getElementById("display"));
|
||||
document.execCommand("bold");
|
||||
is(document.getElementById("display").innerHTML, "<b>foo</b>",
|
||||
"execCommand() needs to work with only one parameter");
|
||||
</script>
|
||||
</pre>
|
Loading…
x
Reference in New Issue
Block a user