2010-09-22 Dirk Pranke <dpranke@chromium.org>
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Sep 2010 19:06:51 +0000 (19:06 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Sep 2010 19:06:51 +0000 (19:06 +0000)
        Reviewed by Tony Chang.

        Adds platform/chromium-gpu-* directories for holding the
        GPU-accelerated baselines and expectations for Chromium.

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

        * platform/chromium-gpu/test_expectations.txt: Added.
        * platform/chromium-gpu-mac/README.txt: Added.
        * platform/chromium-gpu-win/README.txt: Added.
        * platform/chromium-gpu-linux/README.txt: Added.
2010-09-22  Dirk Pranke  <dpranke@chromium.org>

        Reviewed by Tony Chang.

        Add a 'chromium-gpu' set of ports that will test the accelerated
        GPU paths. This patch adds:

        - support for the '--accelerated-compositing' and
          'accelerated-2d-canvas' flags to new-run-webkit-tests (and the
          'no-' flags)
        - adds a new set of Ports that will look under
          platform/chromium-gpu-$OS/ for baselines before looking in the
          regular chromium search path
        - adds a new test_expectations.txt file in platform/chromium-gpu
          that skips all but the tests we actually want to run with
          acceleration.

        This patch will allow us to run both with and without acceleration
        and to change the defaults for both the regular and -gpu options
        as the code evolves.

        We plan to add both --chromium-$OS and --chromium-gpu-$OS runs to
        each test bot.

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

        * Scripts/webkitpy/layout_tests/port/chromium.py:
        * Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
        * Scripts/webkitpy/layout_tests/port/factory.py:
        * Scripts/webkitpy/layout_tests/port/webkit.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

14 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium-gpu-linux/README.txt [new file with mode: 0644]
LayoutTests/platform/chromium-gpu-mac/README.txt [new file with mode: 0644]
LayoutTests/platform/chromium-gpu-win/README.txt [new file with mode: 0644]
LayoutTests/platform/chromium-gpu/test_expectations.txt [new file with mode: 0644]
WebKitTools/ChangeLog
WebKitTools/Scripts/webkitpy/layout_tests/port/chromium.py
WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py [new file with mode: 0644]
WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py [new file with mode: 0644]
WebKitTools/Scripts/webkitpy/layout_tests/port/factory.py
WebKitTools/Scripts/webkitpy/layout_tests/port/factory_unittest.py
WebKitTools/Scripts/webkitpy/layout_tests/port/webkit.py
WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests.py
WebKitTools/Scripts/webkitpy/layout_tests/run_webkit_tests_unittest.py

index bcebd17b5668f23c0e8e28ce09184fbfcb88f18a..d949a157e76752292d687a56c1ec9c28881802c9 100644 (file)
@@ -1,3 +1,17 @@
+2010-09-22  Dirk Pranke  <dpranke@chromium.org>
+
+        Reviewed by Tony Chang.
+
+        Adds platform/chromium-gpu-* directories for holding the
+        GPU-accelerated baselines and expectations for Chromium.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46225
+
+        * platform/chromium-gpu/test_expectations.txt: Added.
+        * platform/chromium-gpu-mac/README.txt: Added.
+        * platform/chromium-gpu-win/README.txt: Added.
+        * platform/chromium-gpu-linux/README.txt: Added.
+
 2010-09-22  Abhishek Arya  <inferno@chromium.org>
 
         Reviewed by Dave Hyatt.
diff --git a/LayoutTests/platform/chromium-gpu-linux/README.txt b/LayoutTests/platform/chromium-gpu-linux/README.txt
new file mode 100644 (file)
index 0000000..77a3c61
--- /dev/null
@@ -0,0 +1,2 @@
+This directory is a placeholder so that Git will create it; it should hold
+the baselines for the GPU accelerated tests for Chromium.
diff --git a/LayoutTests/platform/chromium-gpu-mac/README.txt b/LayoutTests/platform/chromium-gpu-mac/README.txt
new file mode 100644 (file)
index 0000000..77a3c61
--- /dev/null
@@ -0,0 +1,2 @@
+This directory is a placeholder so that Git will create it; it should hold
+the baselines for the GPU accelerated tests for Chromium.
diff --git a/LayoutTests/platform/chromium-gpu-win/README.txt b/LayoutTests/platform/chromium-gpu-win/README.txt
new file mode 100644 (file)
index 0000000..77a3c61
--- /dev/null
@@ -0,0 +1,2 @@
+This directory is a placeholder so that Git will create it; it should hold
+the baselines for the GPU accelerated tests for Chromium.
diff --git a/LayoutTests/platform/chromium-gpu/test_expectations.txt b/LayoutTests/platform/chromium-gpu/test_expectations.txt
new file mode 100644 (file)
index 0000000..fdd95b0
--- /dev/null
@@ -0,0 +1,53 @@
+// This file indicates the expectations for running Chromium under
+// the GPU-accelerated codepaths as defined in
+// WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
+//
+// We skip most of the tests in the repository because they don't trigger
+// the accelerated code paths. We actually only run the canvas and
+// compositing tests.
+WONTFIX SKIP : accessibility = PASS FAIL
+WONTFIX SKIP : animations = PASS FAIL
+WONTFIX SKIP : canvas = PASS FAIL
+WONTFIX SKIP : css1 = PASS FAIL
+WONTFIX SKIP : css2.1 = PASS FAIL
+WONTFIX SKIP : css3 = PASS FAIL
+WONTFIX SKIP : dom = PASS FAIL
+WONTFIX SKIP : editing = PASS FAIL
+WONTFIX SKIP : fast = PASS FAIL
+
+WONTFIX SKIP : fonts = PASS FAIL
+WONTFIX SKIP : fullscreen = PASS FAIL
+WONTFIX SKIP : html5lib = PASS FAIL
+WONTFIX SKIP : http = PASS FAIL
+WONTFIX SKIP : ietestcenter = PASS FAIL
+WONTFIX SKIP : inspector = PASS FAIL
+WONTFIX SKIP : java = PASS FAIL
+WONTFIX SKIP : loader = PASS FAIL
+WONTFIX SKIP : mathml = PASS FAIL
+WONTFIX SKIP : media = PASS FAIL
+WONTFIX SKIP : perf = PASS FAIL
+WONTFIX SKIP : platform = PASS FAIL
+WONTFIX SKIP : plugins = PASS FAIL
+WONTFIX SKIP : printing = PASS FAIL
+WONTFIX SKIP : resources = PASS FAIL
+WONTFIX SKIP : scrollbars = PASS FAIL
+WONTFIX SKIP : security = PASS FAIL
+WONTFIX SKIP : storage = PASS FAIL
+WONTFIX SKIP : svg = PASS FAIL
+WONTFIX SKIP : tables = PASS FAIL
+WONTFIX SKIP : transforms = PASS FAIL
+WONTFIX SKIP : transitions = PASS FAIL
+WONTFIX SKIP : traversal = PASS FAIL
+WONTFIX SKIP : userscripts = PASS FAIL
+WONTFIX SKIP : webarchive = PASS FAIL
+WONTFIX SKIP : websocket = PASS FAIL
+WONTFIX SKIP : wml = PASS FAIL
+
+// (These are the tests we actually run and expect to pass)
+BUGNONE : compositing = PASS FAIL
+BUGNONE : fast/canvas = PASS FAIL
+BUGNONE : canvas/philip = PASS FAIL
+
+//
+// Actual failure suppressions should go below this line
+//
index 086ed7d024b637e70adbef966c4b64a4987b4e7e..9286fc8203410e09c18c63a7e8f2ae90c3a9a461 100644 (file)
@@ -1,3 +1,34 @@
+2010-09-22  Dirk Pranke  <dpranke@chromium.org>
+
+        Reviewed by Tony Chang.
+
+        Add a 'chromium-gpu' set of ports that will test the accelerated
+        GPU paths. This patch adds:
+
+        - support for the '--accelerated-compositing' and
+          'accelerated-2d-canvas' flags to new-run-webkit-tests (and the
+          'no-' flags)
+        - adds a new set of Ports that will look under
+          platform/chromium-gpu-$OS/ for baselines before looking in the
+          regular chromium search path
+        - adds a new test_expectations.txt file in platform/chromium-gpu
+          that skips all but the tests we actually want to run with
+          acceleration.
+
+        This patch will allow us to run both with and without acceleration
+        and to change the defaults for both the regular and -gpu options
+        as the code evolves.
+
+        We plan to add both --chromium-$OS and --chromium-gpu-$OS runs to
+        each test bot.
+
+        https://bugs.webkit.org/show_bug.cgi?id=46225
+
+        * Scripts/webkitpy/layout_tests/port/chromium.py:
+        * Scripts/webkitpy/layout_tests/port/chromium_gpu.py:
+        * Scripts/webkitpy/layout_tests/port/factory.py:
+        * Scripts/webkitpy/layout_tests/port/webkit.py:
+
 2010-09-22  Jamey Hicks  <jamey.hicks@nokia.com>
 
         Reviewed by Kenneth Rohde Christiansen.
index 7a7731abda5c7ef5758f2f93790ff26d2c0ebb76..4f3d7345e5399a12e2f1871b241fcce77947cde3 100644 (file)
@@ -239,7 +239,7 @@ class ChromiumPort(base.Port):
         # FIXME: This drt_overrides handling should be removed when we switch
         # from tes_shell to DRT.
         drt_overrides = ''
-        if self._options.use_drt:
+        if self._options and self._options.use_drt:
             drt_overrides_path = self.path_from_webkit_base('LayoutTests',
                 'platform', 'chromium', 'drt_expectations.txt')
             if os.path.exists(drt_overrides_path):
@@ -356,6 +356,12 @@ class ChromiumDriver(base.Driver):
 
         if self._options.gp_fault_error_box:
             driver_args.append('--gp-fault-error-box')
+
+        if self._options.accelerated_compositing:
+            driver_args.append('--enable-accelerated-compositing')
+
+        if self._options.accelerated_2d_canvas:
+            driver_args.append('--enable-accelerated-2d-canvas')
         return driver_args
 
     def start(self):
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_gpu.py
new file mode 100644 (file)
index 0000000..c003457
--- /dev/null
@@ -0,0 +1,135 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import codecs
+import os
+import sys
+
+import chromium_linux
+import chromium_mac
+import chromium_win
+
+
+def get(**kwargs):
+    """Some tests have slightly different results when run while using
+    hardware acceleration.  In those cases, we prepend an additional directory
+    to the baseline paths."""
+    port_name = kwargs.get('port_name', None)
+    if port_name == 'chromium-gpu':
+        if sys.platform in ('cygwin', 'win32'):
+            port_name = 'chromium-gpu-win'
+        elif sys.platform == 'linux2':
+            port_name = 'chromium-gpu-linux'
+        elif sys.platform == 'darwin':
+            port_name = 'chromium-gpu-mac'
+        else:
+            raise NotImplementedError('unsupported platform: %s' %
+                                      sys.platform)
+
+    if port_name == 'chromium-gpu-linux':
+        return ChromiumGpuLinuxPort(**kwargs)
+
+    if port_name.startswith('chromium-gpu-mac'):
+        return ChromiumGpuMacPort(**kwargs)
+
+    if port_name.startswith('chromium-gpu-win'):
+        return ChromiumGpuWinPort(**kwargs)
+
+    raise NotImplementedError('unsupported port: %s' % port_name)
+
+
+def _set_gpu_options(options):
+    if options:
+        if options.accelerated_compositing is None:
+            options.accelerated_composting = True
+        if options.accelerated_2d_canvas is None:
+            options.accelerated_2d_canvas = True
+
+
+def _gpu_overrides(port):
+    try:
+        overrides_path = port.path_from_chromium_base('webkit', 'tools',
+            'layout_tests', 'test_expectations_gpu.txt')
+    except AssertionError:
+        return None
+    if not os.path.exists(overrides_path):
+        return None
+    with codecs.open(overrides_path, "r", "utf-8") as file:
+        return file.read()
+
+
+class ChromiumGpuLinuxPort(chromium_linux.ChromiumLinuxPort):
+    def __init__(self, **kwargs):
+        kwargs.setdefault('port_name', 'chromium-gpu-linux')
+        _set_gpu_options(kwargs.get('options'))
+        chromium_linux.ChromiumLinuxPort.__init__(self, **kwargs)
+
+    def baseline_search_path(self):
+        return ([self._webkit_baseline_path('chromium-gpu-linux')] +
+                chromium_linux.ChromiumLinuxPort.baseline_search_path(self))
+
+    def path_to_test_expectations_file(self):
+        return self.path_from_webkit_base('LayoutTests', 'platform',
+            'chromium-gpu', 'test_expectations.txt')
+
+    def test_expectations_overrides(self):
+        return _gpu_overrides(self)
+
+
+class ChromiumGpuMacPort(chromium_mac.ChromiumMacPort):
+    def __init__(self, **kwargs):
+        kwargs.setdefault('port_name', 'chromium-gpu-mac')
+        _set_gpu_options(kwargs.get('options'))
+        chromium_mac.ChromiumMacPort.__init__(self, **kwargs)
+
+    def baseline_search_path(self):
+        return ([self._webkit_baseline_path('chromium-gpu-mac')] +
+                chromium_mac.ChromiumMacPort.baseline_search_path(self))
+
+    def path_to_test_expectations_file(self):
+        return self.path_from_webkit_base('LayoutTests', 'platform',
+            'chromium-gpu', 'test_expectations.txt')
+
+    def test_expectations_overrides(self):
+        return _gpu_overrides(self)
+
+
+class ChromiumGpuWinPort(chromium_win.ChromiumWinPort):
+    def __init__(self, **kwargs):
+        kwargs.setdefault('port_name', 'chromium-gpu-win' + self.version())
+        _set_gpu_options(kwargs.get('options'))
+        chromium_win.ChromiumWinPort.__init__(self, **kwargs)
+
+    def baseline_search_path(self):
+        return ([self._webkit_baseline_path('chromium-gpu-win')] +
+                chromium_win.ChromiumWinPort.baseline_search_path(self))
+
+    def path_to_test_expectations_file(self):
+        return self.path_from_webkit_base('LayoutTests', 'platform',
+            'chromium-gpu', 'test_expectations.txt')
+
+    def test_expectations_overrides(self):
+        return _gpu_overrides(self)
diff --git a/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py b/WebKitTools/Scripts/webkitpy/layout_tests/port/chromium_gpu_unittest.py
new file mode 100644 (file)
index 0000000..5c79a3f
--- /dev/null
@@ -0,0 +1,58 @@
+#!/usr/bin/env python
+# Copyright (C) 2010 Google Inc. All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+#
+#     * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#     * Redistributions in binary form must reproduce the above
+# copyright notice, this list of conditions and the following disclaimer
+# in the documentation and/or other materials provided with the
+# distribution.
+
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import os
+import unittest
+import chromium_gpu
+
+
+class ChromiumGpuTest(unittest.TestCase):
+    def test_get_chromium_gpu_linux(self):
+        self.assertOverridesWorked('chromium-gpu-linux')
+
+    def test_get_chromium_gpu_mac(self):
+        self.assertOverridesWorked('chromium-gpu-mac')
+
+    def test_get_chromium_gpu_win(self):
+        self.assertOverridesWorked('chromium-gpu-win')
+
+    def assertOverridesWorked(self, port_name):
+        # test that we got the right port
+        port = chromium_gpu.get(port_name=port_name, options=None)
+
+        # we use startswith() instead of Equal to gloss over platform versions.
+        self.assertTrue(port.name().startswith(port_name))
+
+        # test that it has the right directory in front of the search path.
+        path = port.baseline_search_path()[0]
+        self.assertEqual(port._webkit_baseline_path(port_name), path)
+
+        # test that we have the right expectations file.
+        self.assertTrue('chromium-gpu' in
+                        port.path_to_test_expectations_file())
+
+if __name__ == '__main__':
+    unittest.main()
index afe17dff503940d8ce8cfe017294912ede3aedf3..69357442aebe31e0a145d3c9a3e159077b104560 100644 (file)
@@ -72,37 +72,40 @@ def _get_kwargs(**kwargs):
 
     if port_to_use == 'test':
         import test
-        cls = test.TestPort
+        maker = test.TestPort
     elif port_to_use.startswith('dryrun'):
         import dryrun
-        cls = dryrun.DryRunPort
+        maker = dryrun.DryRunPort
     elif port_to_use.startswith('mac'):
         import mac
-        cls = mac.MacPort
+        maker = mac.MacPort
     elif port_to_use.startswith('win'):
         import win
-        cls = win.WinPort
+        maker = win.WinPort
     elif port_to_use.startswith('gtk'):
         import gtk
-        cls = gtk.GtkPort
+        maker = gtk.GtkPort
     elif port_to_use.startswith('qt'):
         import qt
-        cls = qt.QtPort
+        maker = qt.QtPort
+    elif port_to_use.startswith('chromium-gpu'):
+        import chromium_gpu
+        maker = chromium_gpu.get
     elif port_to_use.startswith('chromium-mac'):
         import chromium_mac
-        cls = chromium_mac.ChromiumMacPort
+        maker = chromium_mac.ChromiumMacPort
     elif port_to_use.startswith('chromium-linux'):
         import chromium_linux
-        cls = chromium_linux.ChromiumLinuxPort
+        maker = chromium_linux.ChromiumLinuxPort
     elif port_to_use.startswith('chromium-win'):
         import chromium_win
-        cls = chromium_win.ChromiumWinPort
+        maker = chromium_win.ChromiumWinPort
     elif port_to_use.startswith('google-chrome'):
         import google_chrome
-        cls = google_chrome.GetGoogleChromePort
+        maker = google_chrome.GetGoogleChromePort
     else:
         raise NotImplementedError('unsupported port: %s' % port_to_use)
-    return cls(**kwargs)
+    return maker(**kwargs)
 
 def get_all(options=None):
     """Returns all the objects implementing the Port interface."""
index c0a4c5e5d402f85df09350b8210a54ce93080104..81c37327a20992ee0c4c3cd9e84d311d6ea4598b 100644 (file)
@@ -29,6 +29,7 @@
 import sys
 import unittest
 
+import chromium_gpu
 import chromium_linux
 import chromium_mac
 import chromium_win
@@ -133,6 +134,15 @@ class FactoryTest(unittest.TestCase):
     def test_qt(self):
         self.assert_port("qt", qt.QtPort)
 
+    def test_chromium_gpu_linux(self):
+        self.assert_port("chromium-gpu-linux", chromium_gpu.ChromiumGpuLinuxPort)
+
+    def test_chromium_gpu_mac(self):
+        self.assert_port("chromium-gpu-mac", chromium_gpu.ChromiumGpuMacPort)
+
+    def test_chromium_gpu_win(self):
+        self.assert_port("chromium-gpu-win", chromium_gpu.ChromiumGpuWinPort)
+
     def test_chromium_mac(self):
         self.assert_port("chromium-mac", chromium_mac.ChromiumMacPort)
         self.assert_platform_port("darwin", self.chromium_options,
index 27b6c05ae812e6f6005c00f6cb00edebe0f03950..7ec815a8ecf0d60dbdd714d9dfaaff5ce8b9455f 100644 (file)
@@ -410,6 +410,13 @@ class WebKitDriver(base.Driver):
         if self._image_path:
             driver_args.append('--pixel-tests')
 
+        if self._options.use_drt:
+            if self._options.accelerated_compositing:
+                driver_args.append('--enable-accelerated-compositing')
+
+            if self._options.accelerated_2d_canvas:
+                driver_args.append('--enable-accelerated-2d-canvas')
+
         return driver_args
 
     def start(self):
index 5193dbdcf3e3cc37b630bbdbd0f477044a9eeab2..9a0d24c866ae1cb8a236c480b5b53e55999dd165 100755 (executable)
@@ -1508,6 +1508,20 @@ def parse_args(args=None):
         optparse.make_option("--use-drt", action="store_true",
             default=False,
             help="Use DumpRenderTree instead of test_shell"),
+        optparse.make_option("--accelerated-compositing",
+            action="store_true",
+            help="Use hardware-accelated compositing for rendering"),
+        optparse.make_option("--no-accelerated-compositing",
+            action="store_false",
+            dest="accelerated_compositing",
+            help="Don't use hardware-accelerated compositing for rendering"),
+        optparse.make_option("--accelerated-2d-canvas",
+            action="store_true",
+            help="Use hardware-accelerated 2D Canvas calls"),
+        optparse.make_option("--no-accelerated-2d-canvas",
+            action="store_false",
+            dest="accelerated_2d_canvas",
+            help="Don't use hardware-accelerated 2D Canvas calls"),
     ]
 
     # Missing Mac-specific old-run-webkit-tests options:
index 9d48604de844cd7d4922878707e57e3265630a6a..6fe99d627013589ffcd0aa56bad6c8277a1a1fc8 100644 (file)
@@ -102,6 +102,16 @@ def logging_run(args=[], tests_included=False):
 
 
 class MainTest(unittest.TestCase):
+    def test_accelerated_compositing(self):
+        # This just tests that we recognize the command line args
+        self.assertTrue(passing_run(['--accelerated-compositing']))
+        self.assertTrue(passing_run(['--no-accelerated-compositing']))
+
+    def test_accelerated_2d_canvas(self):
+        # This just tests that we recognize the command line args
+        self.assertTrue(passing_run(['--accelerated-2d-canvas']))
+        self.assertTrue(passing_run(['--no-accelerated-2d-canvas']))
+
     def test_basic(self):
         self.assertTrue(passing_run())