Bug 72659 - Pointer Lock: Initial Tests for navigator.webkitPonter
: Pointer Lock: Initial Tests for navigator.webkitPonter
Status: RESOLVED FIXED
: WebKit
New Bugs
: 528+ (Nightly build)
: Unspecified Unspecified
: P2 Normal
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2011-11-17 14:28 PST by
Modified: 2011-11-22 13:41 PST (History)


Attachments
Patch (12.16 KB, patch)
2011-11-17 14:29 PST, Vincent Scheib
no flags Review Patch | Details | Formatted Diff | Diff
Patch (13.07 KB, patch)
2011-11-17 14:37 PST, Vincent Scheib
no flags Review Patch | Details | Formatted Diff | Diff
added MouseEvent.webkitMovementX/Y test (14.10 KB, patch)
2011-11-18 15:19 PST, Vincent Scheib
no flags Review Patch | Details | Formatted Diff | Diff
switched to js-test-pre/post.js (9.54 KB, patch)
2011-11-22 10:55 PST, Vincent Scheib
no flags Review Patch | Details | Formatted Diff | Diff
rebase to TOT (9.52 KB, patch)
2011-11-22 11:14 PST, Vincent Scheib
fishd: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-11-17 14:28:32 PST
Pointer Lock: Initial Tests for navigator.webkitPonter
------- Comment #1 From 2011-11-17 14:29:37 PST -------
Created an attachment (id=115683) [details]
Patch
------- Comment #2 From 2011-11-17 14:37:36 PST -------
Created an attachment (id=115685) [details]
Patch
------- Comment #3 From 2011-11-18 15:19:51 PST -------
Created an attachment (id=115888) [details]
added MouseEvent.webkitMovementX/Y test
------- Comment #4 From 2011-11-18 15:36:59 PST -------
(From update of attachment 115888 [details])
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 #5 From 2011-11-22 10:54:43 PST -------
(From update of attachment 115888 [details])
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.
------- Comment #6 From 2011-11-22 10:55:36 PST -------
Created an attachment (id=116248) [details]
switched to js-test-pre/post.js
------- Comment #7 From 2011-11-22 11:14:50 PST -------
Created an attachment (id=116254) [details]
rebase to TOT
------- Comment #8 From 2011-11-22 13:41:22 PST -------
Committed r101025: <http://trac.webkit.org/changeset/101025>