[Webkit-unassigned] [Bug 42547] WebKitTestRunner needs layoutTestController.setDashboardCompatibilityMode

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 20 19:50:22 PDT 2016


Darin Adler <darin at apple.com> changed:

           What    |Removed                     |Added
 Attachment #285589|review?                     |review+
              Flags|                            |

--- Comment #6 from Darin Adler <darin at apple.com> ---
Comment on attachment 285589
  --> https://bugs.webkit.org/attachment.cgi?id=285589

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

> Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp:323
> +    const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
> +    for (HashSet<Page*>::iterator iter = pages.begin(); iter != pages.end(); ++iter)
> +        (*iter)->settings().setUsesDashboardBackwardCompatibilityMode(enabled);

Here’s how we should write this in new code (other code in tis file is old):

    for (auto& page : PageGroup::pageGroup(pageGroup->identifier())->pages())

We don’t use abbreviations in WebKit code, so code should be using "iter" (even though there are many other functions in this file doing it). And with a C++11 for loop we don’t need to bother with a local variable.

> Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:420
> +    fputs("Dashboard unsupported\n", stderr);

This isn’t a good idea. The test runner should not be writing things out directly to stderr.

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/20160821/513af6c4/attachment.html>

More information about the webkit-unassigned mailing list