| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 function populateConsoleWithMessages(count) | 6 function populateConsoleWithMessages(count) |
| 7 { | 7 { |
| 8 for (var i = 0; i < count; ++i) | 8 for (var i = 0; i < count; ++i) |
| 9 console.log("Message #" + i); | 9 console.log("Message #" + i); |
| 10 } | 10 } |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 viewport.forceScrollItemToBeLast(messagesCount - 1); | 87 viewport.forceScrollItemToBeLast(messagesCount - 1); |
| 88 dumpSelectionModel(); | 88 dumpSelectionModel(); |
| 89 dumpBottom(); | 89 dumpBottom(); |
| 90 next(); | 90 next(); |
| 91 }, | 91 }, |
| 92 | 92 |
| 93 function testShiftClickSelectionOver(next) | 93 function testShiftClickSelectionOver(next) |
| 94 { | 94 { |
| 95 emulateShiftClickOnMessage(minimumViewportMessagesCount); | 95 emulateShiftClickOnMessage(minimumViewportMessagesCount); |
| 96 dumpSelectionModel(); | 96 dumpSelectionModel(); |
| 97 dumpBottom(); | 97 dumpTop(); |
| 98 next(); | 98 next(); |
| 99 }, | 99 }, |
| 100 | 100 |
| 101 function testShiftClickSelectionBelow(next) | 101 function testShiftClickSelectionBelow(next) |
| 102 { | 102 { |
| 103 emulateShiftClickOnMessage(messagesCount - minimumViewportMessagesCo
unt); | 103 emulateShiftClickOnMessage(messagesCount - minimumViewportMessagesCo
unt); |
| 104 dumpSelectionModel(); | 104 dumpSelectionModel(); |
| 105 dumpBottom(); | 105 dumpTop(); |
| 106 next(); | 106 next(); |
| 107 }, | 107 }, |
| 108 | 108 |
| 109 function testRemoveSelection(next) | 109 function testRemoveSelection(next) |
| 110 { | 110 { |
| 111 var selection = window.getSelection(); | 111 var selection = window.getSelection(); |
| 112 selection.removeAllRanges(); | 112 selection.removeAllRanges(); |
| 113 dumpSelectionModel(); | 113 dumpSelectionModel(); |
| 114 dumpBottom(); | 114 dumpBottom(); |
| 115 next(); | 115 next(); |
| 116 }, | 116 }, |
| 117 | 117 |
| 118 function testReversedVisibleSelection(next) | 118 function testReversedVisibleSelection(next) |
| 119 { | 119 { |
| 120 selectMessages(middleMessage + 1, 6, middleMessage - 4, 6); | 120 selectMessages(middleMessage + 1, 6, middleMessage - 4, 6); |
| 121 dumpSelectionModel(); | 121 dumpSelectionModel(); |
| 122 dumpBottom(); | 122 dumpBottom(); |
| 123 next(); | 123 next(); |
| 124 }, | 124 }, |
| 125 | 125 |
| 126 function testShiftClickReversedSelectionOver(next) | 126 function testShiftClickReversedSelectionOver(next) |
| 127 { | 127 { |
| 128 emulateShiftClickOnMessage(minimumViewportMessagesCount); | 128 emulateShiftClickOnMessage(minimumViewportMessagesCount); |
| 129 dumpSelectionModel(); | 129 dumpSelectionModel(); |
| 130 dumpBottom(); | 130 dumpTop(); |
| 131 next(); | 131 next(); |
| 132 }, | 132 }, |
| 133 | 133 |
| 134 function testShiftClickReversedSelectionBelow(next) | 134 function testShiftClickReversedSelectionBelow(next) |
| 135 { | 135 { |
| 136 emulateShiftClickOnMessage(messagesCount - minimumViewportMessagesCo
unt); | 136 emulateShiftClickOnMessage(messagesCount - minimumViewportMessagesCo
unt); |
| 137 dumpSelectionModel(); | 137 dumpSelectionModel(); |
| 138 dumpBottom(); | 138 dumpTop(); |
| 139 next(); | 139 next(); |
| 140 }, | 140 }, |
| 141 ]; | 141 ]; |
| 142 | 142 |
| 143 var awaitingMessagesCount = messagesCount; | 143 var awaitingMessagesCount = messagesCount; |
| 144 function messageAdded() | 144 function messageAdded() |
| 145 { | 145 { |
| 146 if (!--awaitingMessagesCount) | 146 if (!--awaitingMessagesCount) |
| 147 InspectorTest.runTestSuite(testSuite); | 147 InspectorTest.runTestSuite(testSuite); |
| 148 } | 148 } |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 } | 229 } |
| 230 } | 230 } |
| 231 </script> | 231 </script> |
| 232 </head> | 232 </head> |
| 233 <body onload="runTest()"> | 233 <body onload="runTest()"> |
| 234 <p> | 234 <p> |
| 235 Tests that console viewport handles selection properly. | 235 Tests that console viewport handles selection properly. |
| 236 </p> | 236 </p> |
| 237 </body> | 237 </body> |
| 238 </html> | 238 </html> |
| OLD | NEW |