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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome_frame/test/data/context_menu.html
===================================================================
--- chrome_frame/test/data/context_menu.html (revision 0)
+++ chrome_frame/test/data/context_menu.html (revision 0)
@@ -0,0 +1,43 @@
+<html>
+ <head>
+ <meta http-equiv="x-ua-compatible" content="chrome=1" />
+ <script type="text/javascript" src="chrome_frame_tester_helpers.js">
+ </script>
+ <script>
+ // Default text value used to test cut/copy/paste etc.
+ var INIT_VAL = "SomeInitializedTextValue";
+
+ // Verify the expected result based on action and post message to host.
+ function verifyTextFieldContents(event) {
+ var textField = document.getElementById("textField");
+ var selectedValue = textField.value.substring(textField.selectionStart,
+ textField.selectionEnd);
+
+ if (selectedValue == INIT_VAL) {
+ window.externalHost.postMessage("OK");
+ } else {
+ window.externalHost.postMessage("Fail");
+ }
+ }
+
+ // Do some initialization work like setting text field value,
+ // and selecting the value by default before the test starts.
+ function init() {
+ var action = getURLParameter("action");
+
+ document.getElementById("textField").value = INIT_VAL;
+ document.getElementById("textField").focus();
+ if (action != "selectall") {
+ document.getElementById("textField").select();
+ }
+
+ window.externalHost.onmessage = verifyTextFieldContents;
+ }
+ </script>
+ </head>
+
+ <body leftmargin="0" topmargin="0" onload="init()">
+ <input type="text" name="textField" id="textField" size="25" value=""></td>
+ </body>
+</html>
+
Property changes on: chrome_frame\test\data\context_menu.html
___________________________________________________________________
Added: svn:eol-style
+ LF

Powered by Google App Engine
This is Rietveld 408576698