1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/libeditor/html/tests/test_bug686203.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,50 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<!-- This Source Code Form is subject to the terms of the Mozilla Public 1.6 + - License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.7 + - You can obtain one at http://mozilla.org/MPL/2.0/. --> 1.8 +<html> 1.9 +<!-- 1.10 +https://bugzilla.mozilla.org/show_bug.cgi?id=686203 1.11 +--> 1.12 + 1.13 +<head> 1.14 + <title>Test for Bug 686203</title> 1.15 + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.16 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 1.17 + <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script> 1.18 +</head> 1.19 + 1.20 +<body> 1.21 + <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=686203">Mozilla Bug 686203</a> 1.22 + <p id="display"></p> 1.23 + <div id="content" style="display: none"> 1.24 + </div> 1.25 + 1.26 + <pre id="test"> 1.27 + <script type="application/javascript"> 1.28 + 1.29 + /** Test for Bug 686203 **/ 1.30 + SimpleTest.waitForExplicitFinish(); 1.31 + SimpleTest.waitForFocus(function() { 1.32 + var ce = document.getElementById("ce"); 1.33 + var input = document.getElementById("input"); 1.34 + ce.focus(); 1.35 + 1.36 + var eventDetails = { button : 2 }; 1.37 + synthesizeMouseAtCenter(input, eventDetails); 1.38 + 1.39 + synthesizeKey("Z", {}); 1.40 + 1.41 + /* check values */ 1.42 + is(input.value, "Z", "input correctly focused after right-click"); 1.43 + is(ce.textContent, "abc", "contenteditable correctly blurred after right-click on input"); 1.44 + 1.45 + SimpleTest.finish(); 1.46 + }); 1.47 + </script> 1.48 + </pre> 1.49 + 1.50 + <input type="text" value="" id="input" /> 1.51 + <div id="ce" contenteditable="true">abc</div> 1.52 +</body> 1.53 +</html>