Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(246)

Side by Side Diff: chrome_frame/test/data/context_menu.html

Issue 3656002: Rewrite text field context menu tests using accessiblity framework.... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 <html>
2 <head>
3 <meta http-equiv="x-ua-compatible" content="chrome=1" />
4 <script type="text/javascript" src="chrome_frame_tester_helpers.js">
5 </script>
6 <script>
7 // Default text value used to test cut/copy/paste etc.
8 var INIT_VAL = "SomeInitializedTextValue";
9
10 // Verify the expected result based on action and post message to host.
11 function verifyTextFieldContents(event) {
12 var textField = document.getElementById("textField");
13 var selectedValue = textField.value.substring(textField.selectionStart,
14 textField.selectionEnd);
15
16 if (selectedValue == INIT_VAL) {
17 window.externalHost.postMessage("OK");
18 } else {
19 window.externalHost.postMessage("Fail");
20 }
21 }
22
23 // Do some initialization work like setting text field value,
24 // and selecting the value by default before the test starts.
25 function init() {
26 var action = getURLParameter("action");
27
28 document.getElementById("textField").value = INIT_VAL;
29 document.getElementById("textField").focus();
30 if (action != "selectall") {
31 document.getElementById("textField").select();
32 }
33
34 window.externalHost.onmessage = verifyTextFieldContents;
35 }
36 </script>
37 </head>
38
39 <body leftmargin="0" topmargin="0" onload="init()">
40 <input type="text" name="textField" id="textField" size="25" value=""></td>
41 </body>
42 </html>
43
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698