[Webkit-unassigned] [Bug 145858] Move cursor to corner and fix safari window size before running benchmark

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 10 20:36:00 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=145858

--- Comment #5 from Chris Dumez <cdumez at apple.com> ---
Comment on attachment 254681
  --> https://bugs.webkit.org/attachment.cgi?id=254681
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=254681&action=review

> Tools/ChangeLog:6
> +        Reviewed by Ryosuke Niwa

Was this really reviewed already? r? flag is set. Also, you are missing the period at the end of the sentence.

> Tools/ChangeLog:7
> +

Maybe a changelog to explain why this is needed and what you mean by fixing the Safari Window size?

> Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_browser_driver.py:53
> +    def moveCursorToCorner(cls):

Which corner? I could use something like "moveCursorToTopLeftCorner". Or a more generic "moveCursor(x, y)" that takes coordinates in parameters.

> Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:25
> +        try:

We may want to move this code to a function with a clear that so that it is clearer what it does.

> Tools/Scripts/webkitpy/benchmark_runner/browser_driver/osx_safari_driver.py:26
> +            resolution = re.split('\s+', subprocess.check_output(['/usr/bin/defaults', 'read', 'com.apple.Safari', 'NSWindow Frame BrowserWindowFrame']).strip())[4:]

Do we really need to call subprocesses for this. I believe there are pythonic ways of doing this (NSUserDefaults.standardUserDefaults()). Maybe this is useful:
http://www.macdevcenter.com/pub/a/mac/2003/01/31/pyobjc_one.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150611/5b1e1dba/attachment-0001.html>


More information about the webkit-unassigned mailing list