Fix tests from http://trac.webkit.org/changeset/105332.
authorojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 00:07:00 +0000 (00:07 +0000)
committerojan@chromium.org <ojan@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 19 Jan 2012 00:07:00 +0000 (00:07 +0000)
The code assumed that if you passed an options object with a configuration
attribute that it would have a valid value. A bunch of the testing mocks
do things like having a configuration value of None.

* Scripts/webkitpy/layout_tests/port/base.py:
(Port.__init__):

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

Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/port/base.py

index 213fd46..e352c61 100644 (file)
@@ -1,5 +1,16 @@
 2012-01-18  Ojan Vafai  <ojan@chromium.org>
 
+        Fix tests from http://trac.webkit.org/changeset/105332.
+
+        The code assumed that if you passed an options object with a configuration
+        attribute that it would have a valid value. A bunch of the testing mocks
+        do things like having a configuration value of None.
+
+        * Scripts/webkitpy/layout_tests/port/base.py:
+        (Port.__init__):
+
+2012-01-18  Ojan Vafai  <ojan@chromium.org>
+
         Shave 0.5 seconds off check-webkit-style runtime for test_expectations.txt
         https://bugs.webkit.org/show_bug.cgi?id=76576
 
index 161f00c..df048b1 100755 (executable)
@@ -146,7 +146,7 @@ class Port(object):
         self._pretty_patch_path = self.path_from_webkit_base("Websites", "bugs.webkit.org", "PrettyPatch", "prettify.rb")
         self._pretty_patch_available = None
 
-        if not options or not options.configuration:
+        if not hasattr(options, 'configuration') or not options.configuration:
             self.set_option_default('configuration', self.default_configuration())
         self._test_configuration = None
         self._reftest_list = {}