Pointer Lock: Initial Tests for navigator.webkitPonter
Created attachment 115683 [details] Patch
Created attachment 115685 [details] Patch
Created attachment 115888 [details] added MouseEvent.webkitMovementX/Y test
Comment on attachment 115888 [details] added MouseEvent.webkitMovementX/Y test View in context: https://bugs.webkit.org/attachment.cgi?id=115888&action=review > Tools/ChangeLog:9 > + (TestShell::TestShell): It would be nice to fill in this ChangeLog. Sometimes like: Enabling PointLock in TestShell would be enough. > LayoutTests/pointer-lock/pointer-lock-test.js:10 > + layoutTestController.dumpAsText(runPixelTests); Be careful with that. dumpAsText(true) is likely not doing what you think -> http://trac.webkit.org/wiki/Writing%20Layout%20Tests%20for%20DumpRenderTree#Howtodisablerendertreedumpsbutkeepthepixels > LayoutTests/pointer-lock/pointer-lock-test.js:16 > + // FIXME: WKTR does not yet support the keyDown() message. Do a mouseDown here WKTR? > LayoutTests/pointer-lock/pointer-lock-test.js:31 > + console = document.createElement('div'); This is a nice pattern. Most tests would just query an element in the main html page and register themselves on the load event (so that the element has been parsed). > LayoutTests/pointer-lock/pointer-lock-test.js:127 > + logResult(eval(testFuncString), "EVENT(" + eventName + ") TEST(" + testFuncString + ")"); Any reasons you don't reuse the testing framework used in the LayoutTests (js-test-pre.js + js-test-post.js). Look at one of the TEMPLATE.html files on how to use it.
Comment on attachment 115888 [details] added MouseEvent.webkitMovementX/Y test View in context: https://bugs.webkit.org/attachment.cgi?id=115888&action=review >> Tools/ChangeLog:9 >> + (TestShell::TestShell): > > It would be nice to fill in this ChangeLog. Sometimes like: > > Enabling PointLock in TestShell > > would be enough. Done >> LayoutTests/pointer-lock/pointer-lock-test.js:127 >> + logResult(eval(testFuncString), "EVENT(" + eventName + ") TEST(" + testFuncString + ")"); > > Any reasons you don't reuse the testing framework used in the LayoutTests (js-test-pre.js + js-test-post.js). Look at one of the TEMPLATE.html files on how to use it. Good idea. I have switched to using js-test-pre/post.js.
Created attachment 116248 [details] switched to js-test-pre/post.js
Created attachment 116254 [details] rebase to TOT
Committed r101025: <http://trac.webkit.org/changeset/101025>