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

Unified Diff: chrome/test/data/find_in_page/end_state.html

Issue 79024: Fix 10573: Dismissing FindInPage doesn't set focus to the link... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 months 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
« no previous file with comments | « chrome/browser/views/find_bar_win_unittest.cc ('k') | chrome/test/ui_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/find_in_page/end_state.html
===================================================================
--- chrome/test/data/find_in_page/end_state.html (revision 0)
+++ chrome/test/data/find_in_page/end_state.html (revision 0)
@@ -0,0 +1,45 @@
+<html>
+<head>
+<script>
+ var focused_elem = "{nothing focused}";
+
+ function setFocusedElem(id) {
+ focused_elem = id;
+ updateLog();
+ }
+
+ function clearFocus() {
+ focused_elem = "";
+ updateLog();
+ }
+
+ function getFocusedElement() {
+ return focused_elem;
+ }
+
+ function updateLog() {
+ document.getElementById("log").innerHTML = "Focused element: " + focused_elem;
+ }
+
+ function selectLink1() {
+ clearFocus();
+ var sel = window.getSelection();
+ var range = document.createRange();
+ range.setStartBefore(document.getElementById('link1'));
+ range.setEndAfter(document.getElementById('link1'));
+ sel.addRange(range);
+ return "";
+ }
+
+</script>
+</head>
+
+<body>
+ This is
+ a <a id="link1" href="http://www.google.com" onfocus="setFocusedElem(this.id)" onblur="clearFocus()">link</a>
+ to <a id="link2" href="http://www.google.com" onfocus="setFocusedElem(this.id)" onblur="clearFocus()">Google</a>.
+
+ <br><br><br>
+ <div id="log"><div>
+</body>
+</html>
« no previous file with comments | « chrome/browser/views/find_bar_win_unittest.cc ('k') | chrome/test/ui_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698