Bug 738385 part 2 - queryCommand*() should not throw for commands that don't support them; r=ehsan
authorAryeh Gregor <ayg@aryeh.name>
Fri, 06 Apr 2012 10:42:54 +0300
changeset 91852 bcc6fb80cd73b1016bac26505afcb2b62809d287
parent 91851 307272b019d4dd45a6afa29032b57c9acd51512d
child 91853 9caaf32e08fc012fb993b4bed2296fbb9086a75a
push id690
push usertim.taubert@gmx.de
push dateThu, 19 Apr 2012 08:49:11 +0000
treeherderfx-team@a9b543de6b67 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs738385
milestone14.0a1
Bug 738385 part 2 - queryCommand*() should not throw for commands that don't support them; r=ehsan
content/html/content/test/test_bug408231.html
content/html/document/src/nsHTMLDocument.cpp
editor/libeditor/html/tests/browserscope/lib/richtext2/currentStatus.js
--- a/content/html/content/test/test_bug408231.html
+++ b/content/html/content/test/test_bug408231.html
@@ -53,59 +53,99 @@ https://bugzilla.mozilla.org/show_bug.cg
       ["styleWithCSS", "true"],
       ["subscript", "true"],
       ["superscript", "true"],
       ["underline", "true"],
       ["undo", "false"],
       ["unlink", "true"],
       ["not-a-command", "false"]
     ];
+
+    var commandIndetermResults = [
+      ["contentReadOnly", "false"],
+      ["copy", "false"],
+      ["createlink", "false"],
+      ["cut", "false"],
+      ["decreasefontsize", "false"],
+      ["delete", "false"],
+      ["fontname", "false"],
+      ["fontsize", "false"],
+      ["formatblock", "false"],
+      ["heading", "false"],
+      ["hilitecolor", "false"],
+      ["increasefontsize", "false"],
+      ["indent", "false"],
+      ["inserthorizontalrule", "false"],
+      ["inserthtml", "false"],
+      ["insertimage", "false"],
+      ["insertorderedlist", "false"],
+      ["insertunorderedlist", "false"],
+      ["insertparagraph", "false"],
+      ["italic", "false"],
+      ["justifycenter", "false"],
+      ["justifyfull", "false"],
+      ["justifyleft", "false"],
+      ["justifyright", "false"],
+      ["outdent", "false"],
+      //["paste", "false"],
+      ["redo", "false"],
+      ["removeformat", "false"],
+      ["selectall", "false"],
+      ["strikethrough", "false"],
+      ["styleWithCSS", "false"],
+      ["subscript", "false"],
+      ["superscript", "false"],
+      ["underline", "false"],
+      ["undo", "false"],
+      ["unlink", "false"],
+      ["not-a-command", "NS_ERROR_NOT_IMPLEMENTED"]
+    ];
     
     var commandStateResults = [
-      ["contentReadOnly", "exception"],
-      ["copy", "exception"],
-      ["createlink", "exception"],
-      ["cut", "exception"],
-      ["decreasefontsize", "exception"],
-      ["delete", "exception"],
-      ["fontname", "exception"],
-      ["fontsize", "exception"],
-      ["formatblock", "exception"],
-      ["heading", "exception"],
-      ["hilitecolor", "exception"],
-      ["increasefontsize", "exception"],
-      ["indent", "exception"],
-      ["inserthorizontalrule", "exception"],
-      ["inserthtml", "exception"],
-      ["insertimage", "exception"],
+      ["contentReadOnly", "false"],
+      ["copy", "false"],
+      ["createlink", "false"],
+      ["cut", "false"],
+      ["decreasefontsize", "false"],
+      ["delete", "false"],
+      ["fontname", "false"],
+      ["fontsize", "false"],
+      ["formatblock", "false"],
+      ["heading", "false"],
+      ["hilitecolor", "false"],
+      ["increasefontsize", "false"],
+      ["indent", "false"],
+      ["inserthorizontalrule", "false"],
+      ["inserthtml", "false"],
+      ["insertimage", "false"],
       ["insertorderedlist", "false"],
       ["insertunorderedlist", "false"],
-      ["insertparagraph", "exception"],
+      ["insertparagraph", "false"],
       ["italic", "false"],
       ["justifycenter", "false"],
       ["justifyfull", "false"],
       ["justifyleft", "true"],
       ["justifyright", "false"],
-      ["outdent", "exception"],
-      //["paste", "exception"],
-      ["redo", "exception"],
-      ["removeformat", "exception"],
-      ["selectall", "exception"],
+      ["outdent", "false"],
+      //["paste", "false"],
+      ["redo", "false"],
+      ["removeformat", "false"],
+      ["selectall", "false"],
       ["strikethrough", "false"],
       ["styleWithCSS", "false"],
       ["subscript", "false"],
       ["superscript", "false"],
       ["underline", "false"],
-      ["undo", "exception"],
+      ["undo", "false"],
       ["unlink", "false"],
-      ["not-a-command", "exception"]
+      ["not-a-command", "NS_ERROR_NOT_IMPLEMENTED"]
     ];
     
     var commandValueResults = [
-      ["contentReadOnly", "exception"],
+      ["contentReadOnly", ""],
       ["copy", ""],
       ["createlink", ""],
       ["cut", ""],
       ["decreasefontsize", ""],
       ["delete", ""],
       ["fontname", ""],
       ["fontsize", ""],
       ["formatblock", ""],
@@ -131,46 +171,56 @@ https://bugzilla.mozilla.org/show_bug.cg
       ["selectall", ""],
       ["strikethrough", ""],
       ["styleWithCSS", ""],
       ["subscript", ""],
       ["superscript", ""],
       ["underline", ""],
       ["undo", ""],
       ["unlink", ""],
-      ["not-a-command", "exception"],
+      ["not-a-command", "NS_ERROR_NOT_IMPLEMENTED"],
     ];
     
   
     function callQueryCommandEnabled(cmdName) {
       var result;
       try {
         result = '' + document.queryCommandEnabled( cmdName );
       } catch( error ) {
-        result = 'exception';
+        result = 'name' in error ? error.name : 'exception';
+      }
+      return result;
+    }
+
+    function callQueryCommandIndeterm(cmdName) {
+      var result;
+      try {
+        result = '' + document.queryCommandIndeterm( cmdName );
+      } catch( error ) {
+        result = 'name' in error ? error.name : 'exception';
       }
       return result;
     }
     
     function callQueryCommandState(cmdName) {
       var result;
       try {
         result = '' + document.queryCommandState( cmdName );
       } catch( error ) {
-        result = 'exception';
+        result = 'name' in error ? error.name : 'exception';
       }
       return result;
     }
 
     function callQueryCommandValue(cmdName) {
       var result;
       try {
         result = '' + document.queryCommandValue( cmdName );
       } catch( error ) {
-        result = 'exception';
+        result = 'name' in error ? error.name : 'exception';
       }
       return result;    
     }
 
     function testQueryCommand(expectedResults, fun, funName) {
       for (i=0; i<expectedResults.length; i++) {
         var commandName = expectedResults[i][0];
         var expectedResult = expectedResults[i][1];
@@ -178,16 +228,17 @@ https://bugzilla.mozilla.org/show_bug.cg
         ok(result == expectedResult, funName + '('+commandName+') result=' +result+ ' expected=' + expectedResult);
       }
     }
 
     function runTests() {
       document.designMode='on';
       window.getSelection().collapse(document.body, 0);
       testQueryCommand(commandEnabledResults, callQueryCommandEnabled, "queryCommandEnabled");
+      testQueryCommand(commandIndetermResults, callQueryCommandIndeterm, "queryCommandIndeterm");
       testQueryCommand(commandStateResults, callQueryCommandState, "queryCommandState");
       testQueryCommand(commandValueResults, callQueryCommandValue, "queryCommandValue");
       document.designMode='off';
       SimpleTest.finish();
     }
     
     window.onload = runTests;
     SimpleTest.waitForExplicitFinish();
--- a/content/html/document/src/nsHTMLDocument.cpp
+++ b/content/html/document/src/nsHTMLDocument.cpp
@@ -3194,20 +3194,21 @@ nsHTMLDocument::QueryCommandIndeterm(con
   nsCOMPtr<nsICommandParams> cmdParams = do_CreateInstance(
                                            NS_COMMAND_PARAMS_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = cmdMgr->GetCommandState(cmdToDispatch.get(), window, cmdParams);
   if (NS_FAILED(rv))
     return rv;
 
-  // if command does not have a state_mixed value, this call fails, so we fail too,
-  // which is what is expected
-  rv = cmdParams->GetBooleanValue("state_mixed", _retval);
-  return rv;
+  // If command does not have a state_mixed value, this call fails and sets
+  // *_retval to false.  This is fine -- we want to return false in that case
+  // anyway (bug 738385), so we just return NS_OK regardless.
+  cmdParams->GetBooleanValue("state_mixed", _retval);
+  return NS_OK;
 }
 
 /* boolean queryCommandState(in DOMString commandID); */
 NS_IMETHODIMP
 nsHTMLDocument::QueryCommandState(const nsAString & commandID, bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
   *_retval = false;
@@ -3258,24 +3259,24 @@ nsHTMLDocument::QueryCommandState(const 
   if (cmdToDispatch.Equals("cmd_align")) {
     char * actualAlignmentType = nsnull;
     rv = cmdParams->GetCStringValue("state_attribute", &actualAlignmentType);
     if (NS_SUCCEEDED(rv) && actualAlignmentType && actualAlignmentType[0]) {
       *_retval = paramToCheck.Equals(actualAlignmentType);
     }
     if (actualAlignmentType)
       nsMemory::Free(actualAlignmentType);
+    return rv;
   }
-  else {
-    rv = cmdParams->GetBooleanValue("state_all", _retval);
-    if (NS_FAILED(rv))
-      *_retval = false;
-  }
-
-  return rv;
+
+  // If command does not have a state_all value, this call fails and sets
+  // *_retval to false.  This is fine -- we want to return false in that case
+  // anyway (bug 738385), so we just return NS_OK regardless.
+  cmdParams->GetBooleanValue("state_all", _retval);
+  return NS_OK;
 }
 
 /* boolean queryCommandSupported(in DOMString commandID); */
 NS_IMETHODIMP
 nsHTMLDocument::QueryCommandSupported(const nsAString & commandID,
                                       bool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
@@ -3347,22 +3348,26 @@ nsHTMLDocument::QueryCommandValue(const 
   rv = cmdParams->SetCStringValue("state_attribute", paramStr.get());
   if (NS_FAILED(rv))
     return rv;
 
   rv = cmdMgr->GetCommandState(cmdToDispatch.get(), window, cmdParams);
   if (NS_FAILED(rv))
     return rv;
 
+  // If command does not have a state_attribute value, this call fails, and
+  // _retval will wind up being the empty string.  This is fine -- we want to
+  // return "" in that case anyway (bug 738385), so we just return NS_OK
+  // regardless.
   nsXPIDLCString cStringResult;
-  rv = cmdParams->GetCStringValue("state_attribute",
-                                  getter_Copies(cStringResult));
+  cmdParams->GetCStringValue("state_attribute",
+                             getter_Copies(cStringResult));
   CopyUTF8toUTF16(cStringResult, _retval);
 
-  return rv;
+  return NS_OK;
 }
 
 nsresult
 nsHTMLDocument::Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const
 {
   NS_ASSERTION(aNodeInfo->NodeInfoManager() == mNodeInfoManager,
                "Can't import this document into another document!");
 
--- a/editor/libeditor/html/tests/browserscope/lib/richtext2/currentStatus.js
+++ b/editor/libeditor/html/tests/browserscope/lib/richtext2/currentStatus.js
@@ -19193,35 +19193,35 @@ const TEST_RESULTS = {
         }
       }
     }
   },
   "QI": {
     "Proposed": {
       "SELECTALL_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "UNSELECT_TEXT-1": {
         "dM": {
           "valscore": 0,
           "selscore": 0,
           "valresult": 2,
           "selresult": 3,
@@ -19239,58 +19239,58 @@ const TEST_RESULTS = {
           "selscore": 0,
           "valresult": 2,
           "selresult": 3,
           "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
         }
       },
       "UNDO_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "REDO_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "BOLD_TEXT-1": {
         "dM": {
           "valscore": 1,
           "selscore": 0,
           "valresult": 8,
           "selresult": 3,
@@ -19423,58 +19423,58 @@ const TEST_RESULTS = {
           "selscore": 0,
           "valresult": 8,
           "selresult": 3,
           "output": false
         }
       },
       "FORMATBLOCK_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "CREATELINK_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "UNLINK_TEXT-1": {
         "dM": {
           "valscore": 1,
           "selscore": 0,
           "valresult": 8,
           "selresult": 3,
@@ -19492,81 +19492,81 @@ const TEST_RESULTS = {
           "selscore": 0,
           "valresult": 8,
           "selresult": 3,
           "output": false
         }
       },
       "INSERTHTML_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "INSERTHORIZONTALRULE_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "INSERTIMAGE_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "INSERTLINEBREAK_TEXT-1": {
         "dM": {
           "valscore": 0,
           "selscore": 0,
           "valresult": 2,
           "selresult": 3,
@@ -19676,35 +19676,35 @@ const TEST_RESULTS = {
           "selscore": 0,
           "valresult": 2,
           "selresult": 3,
           "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
         }
       },
       "DELETE_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "FORWARDDELETE_TEXT-1": {
         "dM": {
           "valscore": 0,
           "selscore": 0,
           "valresult": 2,
           "selresult": 3,
@@ -19722,58 +19722,58 @@ const TEST_RESULTS = {
           "selscore": 0,
           "valresult": 2,
           "selresult": 3,
           "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
         }
       },
       "STYLEWITHCSS_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "CONTENTREADONLY_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "BACKCOLOR_TEXT-1": {
         "dM": {
           "valscore": 1,
           "selscore": 0,
           "valresult": 8,
           "selresult": 3,
@@ -19883,127 +19883,127 @@ const TEST_RESULTS = {
           "selscore": 0,
           "valresult": 8,
           "selresult": 3,
           "output": false
         }
       },
       "INCREASEFONTSIZE_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "DECREASEFONTSIZE_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "HEADING_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004001 (NS_ERROR_NOT_IMPLEMENTED) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004001 (NS_ERROR_NOT_IMPLEMENTED)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "INDENT_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "OUTDENT_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "CREATEBOOKMARK_TEXT-1": {
         "dM": {
           "valscore": 0,
           "selscore": 0,
           "valresult": 2,
           "selresult": 3,
@@ -20136,104 +20136,104 @@ const TEST_RESULTS = {
           "selscore": 0,
           "valresult": 8,
           "selresult": 3,
           "output": false
         }
       },
       "REMOVEFORMAT_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "COPY_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "CUT_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "PASTE_TEXT-1": {
         "dM": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "body": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
-        },
-        "div": {
-          "valscore": 0,
-          "selscore": 0,
-          "valresult": 2,
-          "selresult": 3,
-          "output": "EXECUTION EXCEPTION: [Exception... \"Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMHTMLDocument.queryCommandIndeterm]\"  nsresult: \"0x80004005 (NS_ERROR_FAILURE)\"  location: \"JS frame :: http://mochi.test:8888/tests/editor/libeditor/html/tests/browserscope/lib/richtext2/richtext2/static/js/run.js :: runSingleTest :: line 152\"  data: no]"
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "body": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
+        },
+        "div": {
+          "valscore": 1,
+          "selscore": 0,
+          "valresult": 8,
+          "selresult": 3,
+          "output": false
         }
       },
       "garbage-1_TEXT-1": {
         "dM": {
           "valscore": 0,
           "selscore": 0,
           "valresult": 2,
           "selresult": 3,