Changeset 61819 in webkit
- Timestamp:
- Jun 24, 2010 9:45:09 PM (14 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r61816 r61819 1 2010-06-24 Antonio Gomes <tonikitoo@webkit.org> 2 3 Reviewed by Kenneth Christiansen. 4 5 Spatial Navigation: refactor spatial-navigation-utils.js to support testing nested frames deeper than one level 6 https://bugs.webkit.org/show_bug.cgi?id=41157 7 8 As is today, we can not test focused nodes in inner frames nested more than one level 9 deep, due to spatial-navigation-utils.js limitations. Patch addresses this problem: 10 any time before any focus check, it retrieves the proper focused frame in any level deep. 11 12 All spatial navigation test results changed output because the parameter passed in to 13 shouldBeEqualToString (from js-pre-test.js) changed in spatial-navigation-utils.js. 14 15 * fast/events/spatial-navigation/resources/spatial-navigation-utils.js: 16 (initTest): 17 (verifyAndAdvance): 18 (findFocusedDocument): 19 * fast/events/spatial-navigation/snav-clipped-overflowed-content-expected.txt: 20 * fast/events/spatial-navigation/snav-div-scrollable-but-without-focusable-content-expected.txt: 21 * fast/events/spatial-navigation/snav-fully-aligned-horizontally-expected.txt: 22 * fast/events/spatial-navigation/snav-fully-aligned-vertically-expected.txt: 23 * fast/events/spatial-navigation/snav-iframe-flattening-simple-expected.txt: 24 * fast/events/spatial-navigation/snav-iframe-no-focusable-content-expected.txt: 25 * fast/events/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt: 26 * fast/events/spatial-navigation/snav-iframe-recursive-offset-parent-expected.txt: 27 * fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt: 28 * fast/events/spatial-navigation/snav-offscreen-content-expected.txt: 29 * fast/events/spatial-navigation/snav-only-clipped-overflow-content-expected.txt: 30 * fast/events/spatial-navigation/snav-simple-content-overflow-expected.txt: 31 * fast/events/spatial-navigation/snav-table-traversal-expected.txt: 32 * fast/events/spatial-navigation/snav-tiny-table-traversal-expected.txt: 33 * fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt: 34 1 35 2010-06-24 Cris Neckar <cdn@chromium.org> 2 36 -
trunk/LayoutTests/fast/events/spatial-navigation/resources/spatial-navigation-utils.js
r55577 r61819 6 6 **/ 7 7 8 var gExpectedResults ;8 var gExpectedResults = 0; 9 9 var gIndex = 0; 10 10 var gClosureCallback = null; 11 var gFocusedDocument = 0; 11 12 12 13 function initTest(table, completedCb) { … … 15 16 gIndex = 0; 16 17 gClosureCallback = completedCb; 18 gFocusedDocument = 0; 17 19 18 20 prepareMove(); … … 49 51 var expectedID = gExpectedResults[gIndex][1]; 50 52 53 gFocusedDocument = document; 54 findFocusedDocument(document); 55 51 56 var i = 0; 52 57 var mainFrameHasFocus = true; 53 for (; i < window.frames.length; i++)58 for ( ; i < window.frames.length; i++) { 54 59 if (window.frames[i].document.hasFocus()) { 55 60 mainFrameHasFocus = false; 56 61 break; 57 62 } 63 } 58 64 59 // This support frames nested in one level deep only. 60 if (mainFrameHasFocus) 61 shouldBeEqualToString("document.activeElement.getAttribute(\"id\")", expectedID); 62 else 63 shouldBeEqualToString("document.defaultView.frames[" + i + "].document.activeElement.getAttribute(\"id\")", expectedID); 65 shouldBeEqualToString("gFocusedDocument.activeElement.getAttribute(\"id\")", expectedID); 64 66 65 67 gIndex++; … … 67 69 } 68 70 71 function findFocusedDocument(currentDocument) 72 { 73 var i = 0; 74 for ( ; i < currentDocument.defaultView.frames.length; i++) { 75 findFocusedDocument(currentDocument.defaultView.frames[i].document); 76 if (gFocusedDocument != document) 77 return; 78 } 79 80 if (currentDocument.hasFocus()) { 81 gFocusedDocument = currentDocument; 82 return; 83 } 84 } 85 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-clipped-overflowed-content-expected.txt
r61134 r61819 15 15 And this is another normal link_4. 16 16 17 PASS document.activeElement.getAttribute("id") is "1"18 PASS document.activeElement.getAttribute("id") is "1"19 PASS document.activeElement.getAttribute("id") is "2"20 PASS document.activeElement.getAttribute("id") is "3"21 PASS document.activeElement.getAttribute("id") is "2"22 PASS document.activeElement.getAttribute("id") is "1"23 PASS document.activeElement.getAttribute("id") is "start"17 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 18 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 19 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 20 PASS gFocusedDocument.activeElement.getAttribute("id") is "3" 21 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 22 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 23 PASS gFocusedDocument.activeElement.getAttribute("id") is "start" 24 24 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-div-scrollable-but-without-focusable-content-expected.txt
r61134 r61819 31 31 32 32 e 33 PASS document.activeElement.getAttribute("id") is "end"34 PASS document.activeElement.getAttribute("id") is "start"33 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 34 PASS gFocusedDocument.activeElement.getAttribute("id") is "start" 35 35 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-horizontally-expected.txt
r55794 r61819 16 16 17 17 test 18 PASS document.activeElement.getAttribute("id") is "1"19 PASS document.activeElement.getAttribute("id") is "2"20 PASS document.activeElement.getAttribute("id") is "4"21 PASS document.activeElement.getAttribute("id") is "3"22 PASS document.activeElement.getAttribute("id") is "5"23 PASS document.activeElement.getAttribute("id") is "6"24 PASS document.activeElement.getAttribute("id") is "8"25 PASS document.activeElement.getAttribute("id") is "7"26 PASS document.activeElement.getAttribute("id") is "9"27 PASS document.activeElement.getAttribute("id") is "10"28 PASS document.activeElement.getAttribute("id") is "12"29 PASS document.activeElement.getAttribute("id") is "11"30 PASS document.activeElement.getAttribute("id") is "13"31 PASS document.activeElement.getAttribute("id") is "14"32 PASS document.activeElement.getAttribute("id") is "16"33 PASS document.activeElement.getAttribute("id") is "15"34 PASS document.activeElement.getAttribute("id") is "17"35 PASS document.activeElement.getAttribute("id") is "18"36 PASS document.activeElement.getAttribute("id") is "20"37 PASS document.activeElement.getAttribute("id") is "19"38 PASS document.activeElement.getAttribute("id") is "21"39 PASS document.activeElement.getAttribute("id") is "22"40 PASS document.activeElement.getAttribute("id") is "24"41 PASS document.activeElement.getAttribute("id") is "23"42 PASS document.activeElement.getAttribute("id") is "25"43 PASS document.activeElement.getAttribute("id") is "26"44 PASS document.activeElement.getAttribute("id") is "27"45 PASS document.activeElement.getAttribute("id") is "end"18 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 19 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 20 PASS gFocusedDocument.activeElement.getAttribute("id") is "4" 21 PASS gFocusedDocument.activeElement.getAttribute("id") is "3" 22 PASS gFocusedDocument.activeElement.getAttribute("id") is "5" 23 PASS gFocusedDocument.activeElement.getAttribute("id") is "6" 24 PASS gFocusedDocument.activeElement.getAttribute("id") is "8" 25 PASS gFocusedDocument.activeElement.getAttribute("id") is "7" 26 PASS gFocusedDocument.activeElement.getAttribute("id") is "9" 27 PASS gFocusedDocument.activeElement.getAttribute("id") is "10" 28 PASS gFocusedDocument.activeElement.getAttribute("id") is "12" 29 PASS gFocusedDocument.activeElement.getAttribute("id") is "11" 30 PASS gFocusedDocument.activeElement.getAttribute("id") is "13" 31 PASS gFocusedDocument.activeElement.getAttribute("id") is "14" 32 PASS gFocusedDocument.activeElement.getAttribute("id") is "16" 33 PASS gFocusedDocument.activeElement.getAttribute("id") is "15" 34 PASS gFocusedDocument.activeElement.getAttribute("id") is "17" 35 PASS gFocusedDocument.activeElement.getAttribute("id") is "18" 36 PASS gFocusedDocument.activeElement.getAttribute("id") is "20" 37 PASS gFocusedDocument.activeElement.getAttribute("id") is "19" 38 PASS gFocusedDocument.activeElement.getAttribute("id") is "21" 39 PASS gFocusedDocument.activeElement.getAttribute("id") is "22" 40 PASS gFocusedDocument.activeElement.getAttribute("id") is "24" 41 PASS gFocusedDocument.activeElement.getAttribute("id") is "23" 42 PASS gFocusedDocument.activeElement.getAttribute("id") is "25" 43 PASS gFocusedDocument.activeElement.getAttribute("id") is "26" 44 PASS gFocusedDocument.activeElement.getAttribute("id") is "27" 45 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 46 46 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-fully-aligned-vertically-expected.txt
r55794 r61819 11 11 test 12 12 test 13 PASS document.activeElement.getAttribute("id") is "4"14 PASS document.activeElement.getAttribute("id") is "6"15 PASS document.activeElement.getAttribute("id") is "8"16 PASS document.activeElement.getAttribute("id") is "end"17 PASS document.activeElement.getAttribute("id") is "7"18 PASS document.activeElement.getAttribute("id") is "2"13 PASS gFocusedDocument.activeElement.getAttribute("id") is "4" 14 PASS gFocusedDocument.activeElement.getAttribute("id") is "6" 15 PASS gFocusedDocument.activeElement.getAttribute("id") is "8" 16 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 17 PASS gFocusedDocument.activeElement.getAttribute("id") is "7" 18 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 19 19 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-iframe-flattening-simple-expected.txt
r58883 r61819 2 2 3 3 e 4 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"5 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"6 PASS document.activeElement.getAttribute("id") is "end"7 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"8 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"9 PASS document.activeElement.getAttribute("id") is "start"4 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 5 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 6 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 7 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 8 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 9 PASS gFocusedDocument.activeElement.getAttribute("id") is "start" 10 10 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-focusable-content-expected.txt
r55796 r61819 3 3 4 4 e 5 PASS document.activeElement.getAttribute("id") is "end"6 PASS document.activeElement.getAttribute("id") is "start"5 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 6 PASS gFocusedDocument.activeElement.getAttribute("id") is "start" 7 7 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-iframe-no-scrollable-content-expected.txt
r57062 r61819 3 3 4 4 a 5 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"6 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"7 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "3"8 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "7"9 PASS document.defaultView.frames[1].document.activeElement.getAttribute("id") is "6"10 PASS document.activeElement.getAttribute("id") is "end"11 PASS document.defaultView.frames[1].document.activeElement.getAttribute("id") is "4"12 PASS document.defaultView.frames[1].document.activeElement.getAttribute("id") is "5"13 PASS document.defaultView.frames[1].document.activeElement.getAttribute("id") is "6"14 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "7"15 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "3"16 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"17 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"5 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 6 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 7 PASS gFocusedDocument.activeElement.getAttribute("id") is "3" 8 PASS gFocusedDocument.activeElement.getAttribute("id") is "7" 9 PASS gFocusedDocument.activeElement.getAttribute("id") is "6" 10 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 11 PASS gFocusedDocument.activeElement.getAttribute("id") is "4" 12 PASS gFocusedDocument.activeElement.getAttribute("id") is "5" 13 PASS gFocusedDocument.activeElement.getAttribute("id") is "6" 14 PASS gFocusedDocument.activeElement.getAttribute("id") is "7" 15 PASS gFocusedDocument.activeElement.getAttribute("id") is "3" 16 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 17 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 18 18 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-iframe-recursive-offset-parent-expected.txt
r61250 r61819 1 1 Link 2 2 3 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"4 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"5 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "3"6 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"7 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"8 PASS document.activeElement.getAttribute("id") is "start"3 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 4 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 5 PASS gFocusedDocument.activeElement.getAttribute("id") is "3" 6 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 7 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 8 PASS gFocusedDocument.activeElement.getAttribute("id") is "start" 9 9 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-iframe-with-offscreen-focusable-element-expected.txt
r55796 r61819 2 2 3 3 e 4 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"5 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"6 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"7 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"8 PASS document.activeElement.getAttribute("id") is "end"9 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"10 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"11 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "2"12 PASS document.defaultView.frames[0].document.activeElement.getAttribute("id") is "1"13 PASS document.activeElement.getAttribute("id") is "start"4 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 5 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 6 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 7 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 8 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 9 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 10 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 11 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 12 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 13 PASS gFocusedDocument.activeElement.getAttribute("id") is "start" 14 14 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-offscreen-content-expected.txt
r57304 r61819 2 2 3 3 Down link 4 PASS document.activeElement.getAttribute("id") is "1"4 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 5 5 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-only-clipped-overflow-content-expected.txt
r61298 r61819 15 15 And this is another normal link_2. 16 16 17 PASS document.activeElement.getAttribute("id") is "start"17 PASS gFocusedDocument.activeElement.getAttribute("id") is "start" 18 18 PASS true is true 19 19 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-simple-content-overflow-expected.txt
r57496 r61819 21 21 This link should NOT get focused. 22 22 23 PASS document.activeElement.getAttribute("id") is "start"23 PASS gFocusedDocument.activeElement.getAttribute("id") is "start" 24 24 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-table-traversal-expected.txt
r55578 r61819 3 3 a a a 4 4 End of table traversal test 5 PASS document.activeElement.getAttribute("id") is "4"6 PASS document.activeElement.getAttribute("id") is "7"7 PASS document.activeElement.getAttribute("id") is "end"8 PASS document.activeElement.getAttribute("id") is "7"9 PASS document.activeElement.getAttribute("id") is "8"10 PASS document.activeElement.getAttribute("id") is "9"11 PASS document.activeElement.getAttribute("id") is "6"12 PASS document.activeElement.getAttribute("id") is "3"13 PASS document.activeElement.getAttribute("id") is "2"14 FAIL document.activeElement.getAttribute("id") should be 1. Was start.5 PASS gFocusedDocument.activeElement.getAttribute("id") is "4" 6 PASS gFocusedDocument.activeElement.getAttribute("id") is "7" 7 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 8 PASS gFocusedDocument.activeElement.getAttribute("id") is "7" 9 PASS gFocusedDocument.activeElement.getAttribute("id") is "8" 10 PASS gFocusedDocument.activeElement.getAttribute("id") is "9" 11 PASS gFocusedDocument.activeElement.getAttribute("id") is "6" 12 PASS gFocusedDocument.activeElement.getAttribute("id") is "3" 13 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 14 FAIL gFocusedDocument.activeElement.getAttribute("id") should be 1. Was start. 15 15 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-tiny-table-traversal-expected.txt
r55578 r61819 5 5 a 6 6 a 7 PASS document.activeElement.getAttribute("id") is "1"8 PASS document.activeElement.getAttribute("id") is "4"9 PASS document.activeElement.getAttribute("id") is "7"10 PASS document.activeElement.getAttribute("id") is "end"11 PASS document.activeElement.getAttribute("id") is "7"12 PASS document.activeElement.getAttribute("id") is "8"13 PASS document.activeElement.getAttribute("id") is "9"14 PASS document.activeElement.getAttribute("id") is "6"15 PASS document.activeElement.getAttribute("id") is "right"16 PASS document.activeElement.getAttribute("id") is "6"17 PASS document.activeElement.getAttribute("id") is "3"18 PASS document.activeElement.getAttribute("id") is "2"19 PASS document.activeElement.getAttribute("id") is "1"7 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 8 PASS gFocusedDocument.activeElement.getAttribute("id") is "4" 9 PASS gFocusedDocument.activeElement.getAttribute("id") is "7" 10 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 11 PASS gFocusedDocument.activeElement.getAttribute("id") is "7" 12 PASS gFocusedDocument.activeElement.getAttribute("id") is "8" 13 PASS gFocusedDocument.activeElement.getAttribute("id") is "9" 14 PASS gFocusedDocument.activeElement.getAttribute("id") is "6" 15 PASS gFocusedDocument.activeElement.getAttribute("id") is "right" 16 PASS gFocusedDocument.activeElement.getAttribute("id") is "6" 17 PASS gFocusedDocument.activeElement.getAttribute("id") is "3" 18 PASS gFocusedDocument.activeElement.getAttribute("id") is "2" 19 PASS gFocusedDocument.activeElement.getAttribute("id") is "1" 20 20 -
trunk/LayoutTests/fast/events/spatial-navigation/snav-unit-overflow-and-scroll-in-direction-expected.txt
r55795 r61819 1 1 Start 2 2 End 3 PASS document.activeElement.getAttribute("id") is "start"3 PASS gFocusedDocument.activeElement.getAttribute("id") is "start" 4 4 PASS true is true 5 PASS document.activeElement.getAttribute("id") is "end"5 PASS gFocusedDocument.activeElement.getAttribute("id") is "end" 6 6
Note: See TracChangeset
for help on using the changeset viewer.