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

Side by Side Diff: LayoutTests/fast/events/resources/tabindex-focus-blur-all.js

Issue 427011: Revert WebKit 48257 on the 249 branch.... (Closed) Base URL: svn://chrome-svn/chrome/branches/WebKit/249/
Patch Set: Created 11 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
OLDNEW
1 if (window.layoutTestController) { 1 if (window.layoutTestController) {
2 layoutTestController.waitUntilDone(); 2 layoutTestController.waitUntilDone();
3 layoutTestController.dumpAsText(); 3 layoutTestController.dumpAsText();
4 } 4 }
5 5
6 var consoleOutput = null; 6 var consoleOutput = null;
7 var stopTest = false; 7 var stopTest = false;
8 var focusCount = 0; 8 var focusCount = 0;
9 var blurCount = 0; 9 var blurCount = 0;
10 var focusedElem = null; 10 var focusedElem = null;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 function test() 43 function test()
44 { 44 {
45 for (var i = 0; i < 2; ++i) 45 for (var i = 0; i < 2; ++i)
46 focusEachChild(window.frames[i].document.body); 46 focusEachChild(window.frames[i].document.body);
47 47
48 // focus an untested element so that blur can be dispatched on the last ifra me tested 48 // focus an untested element so that blur can be dispatched on the last ifra me tested
49 var homeBase = window.frames[1].document.getElementsByClassName('homebase'); 49 var homeBase = window.frames[1].document.getElementsByClassName('homebase');
50 homeBase[0].focus(); 50 homeBase[0].focus();
51 51
52 var resultSummary = focusCount+" focus / "+blurCount+" blur events dispatche d, and should be 329 / 329 "; 52 var resultSummary = focusCount+" focus / "+blurCount+" blur events dispatche d, and should be 335 / 335 ";
53 resultSummary += (focusCount==blurCount) ? "<span style='color:green'>PASSED </span><br>" : "<span style='color:red'>FAILED</span><br>"; 53 resultSummary += (focusCount==blurCount) ? "<span style='color:green'>PASSED </span><br>" : "<span style='color:red'>FAILED</span><br>";
54 resultSummary += "Total of "+failedTestCount+" focus test(s) failed."; 54 resultSummary += "Total of "+failedTestCount+" focus test(s) failed.";
55 if (failedTestCount) 55 if (failedTestCount)
56 resultSummary += "<br>Details:<br>"+consoleOutput.innerHTML; 56 resultSummary += "<br>Details:<br>"+consoleOutput.innerHTML;
57 else 57 else
58 resultSummary += " <span style='color:green'>PASSED</span>"; 58 resultSummary += " <span style='color:green'>PASSED</span>";
59 59
60 document.write(resultSummary); 60 document.write(resultSummary);
61 document.close(); 61 document.close();
62 62
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 failedTestCount++; 119 failedTestCount++;
120 printToConsole(elem.id+" FAILED - was " + (focusedElem ? "" : " not ") + " focused but focus " + (elemThatShouldFocus ? " was " : " wasn\'t") + " expect ed"); 120 printToConsole(elem.id+" FAILED - was " + (focusedElem ? "" : " not ") + " focused but focus " + (elemThatShouldFocus ? " was " : " wasn\'t") + " expect ed");
121 if (elemThatShouldFocus && focusedElem) 121 if (elemThatShouldFocus && focusedElem)
122 printToConsole("elemThatShouldFocus is <"+elemThatShouldFocus.tagNam e+"> "+elemThatShouldFocus.id+", focusedElem is <"+focusedElem.tagName+"> "+focu sedElem.id); 122 printToConsole("elemThatShouldFocus is <"+elemThatShouldFocus.tagNam e+"> "+elemThatShouldFocus.id+", focusedElem is <"+focusedElem.tagName+"> "+focu sedElem.id);
123 if (!elemThatShouldFocus) 123 if (!elemThatShouldFocus)
124 printToConsole("elemThatShouldFocus is null, focusedElem is <"+focus edElem.tagName+"> "+focusedElem.id); 124 printToConsole("elemThatShouldFocus is null, focusedElem is <"+focus edElem.tagName+"> "+focusedElem.id);
125 if (!focusedElem) 125 if (!focusedElem)
126 printToConsole("elemThatShouldFocus is <"+elemThatShouldFocus.tagNam e+"> "+elemThatShouldFocus.id+", focusedElem is null"); 126 printToConsole("elemThatShouldFocus is <"+elemThatShouldFocus.tagNam e+"> "+elemThatShouldFocus.id+", focusedElem is null");
127 } 127 }
128 } 128 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698