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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4 var focused_elem = "{nothing focused}";
5
6 function setFocusedElem(id) {
7 focused_elem = id;
8 updateLog();
9 }
10
11 function clearFocus() {
12 focused_elem = "";
13 updateLog();
14 }
15
16 function getFocusedElement() {
17 return focused_elem;
18 }
19
20 function updateLog() {
21 document.getElementById("log").innerHTML = "Focused element: " + focused_ele m;
22 }
23
24 function selectLink1() {
25 clearFocus();
26 var sel = window.getSelection();
27 var range = document.createRange();
28 range.setStartBefore(document.getElementById('link1'));
29 range.setEndAfter(document.getElementById('link1'));
30 sel.addRange(range);
31 return "";
32 }
33
34 </script>
35 </head>
36
37 <body>
38 This is
39 a <a id="link1" href="http://www.google.com" onfocus="setFocusedElem(this.id) " onblur="clearFocus()">link</a>
40 to <a id="link2" href="http://www.google.com" onfocus="setFocusedElem(this.id) " onblur="clearFocus()">Google</a>.
41
42 <br><br><br>
43 <div id="log"><div>
44 </body>
45 </html>
OLDNEW
« 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