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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-viewport-stick-to-bottom.html

Issue 2154893002: DevTools: remove isTrusted check and isUserGesture from ViewportControl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DevTools: fix stick to bottom in console viewport Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 - 1; ++i) 8 for (var i = 0; i < count - 1; ++i)
9 console.log("Multiline\nMessage #" + i); 9 console.log("Multiline\nMessage #" + i);
10 console.log("hello %cworld", "color: blue"); 10 console.log("hello %cworld", "color: blue");
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 viewport.refresh(); 61 viewport.refresh();
62 InspectorTest.addResult("Last visible message: " + viewport.last VisibleIndex()); 62 InspectorTest.addResult("Last visible message: " + viewport.last VisibleIndex());
63 next(); 63 next();
64 } 64 }
65 }, 65 },
66 66
67 function testManualScrollDoesNotStickToBottom(next) 67 function testManualScrollDoesNotStickToBottom(next)
68 { 68 {
69 const manualScrollValue = 3; 69 const manualScrollValue = 3;
70 var initialScrollTop = viewport.element.scrollTop; 70 var initialScrollTop = viewport.element.scrollTop;
71 consoleView._updateStickToBottomOnMouseDown();
71 viewport.element.scrollTop = initialScrollTop - manualScrollValue; 72 viewport.element.scrollTop = initialScrollTop - manualScrollValue;
72 viewport.refresh(); 73 consoleView._updateStickToBottomOnMouseUp();
73 var newScrollTop = viewport.element.scrollTop; 74 var newScrollTop = viewport.element.scrollTop;
74 var isScrollPreserved = initialScrollTop - newScrollTop === manualSc rollValue; 75 var isScrollPreserved = initialScrollTop - newScrollTop === manualSc rollValue;
75 InspectorTest.addResult("Scroll preserved: " + isScrollPreserved); 76 InspectorTest.addResult("Scroll preserved: " + isScrollPreserved);
76 next(); 77 next();
77 }, 78 },
78 ]; 79 ];
79 80
80 function logMessagesToConsole(count, callback) 81 function logMessagesToConsole(count, callback)
81 { 82 {
82 var awaitingMessagesCount = count; 83 var awaitingMessagesCount = count;
(...skipping 10 matching lines...) Expand all
93 } 94 }
94 } 95 }
95 </script> 96 </script>
96 </head> 97 </head>
97 <body onload="runTest()"> 98 <body onload="runTest()">
98 <p> 99 <p>
99 Verifies viewport stick-to-bottom behavior. 100 Verifies viewport stick-to-bottom behavior.
100 </p> 101 </p>
101 </body> 102 </body>
102 </html> 103 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/console/ConsoleView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698