diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 01:14:58 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-30 01:14:58 +0000 |
commit | 0b3b9bccd669b11b9e05e83ba5bbe05d1c8e8900 (patch) | |
tree | 43cb53b52a400c3c0952e67c097988992c5468f0 /webkit | |
parent | 0acdfc4d546f11a767004d9b2262ce0d44a2a096 (diff) | |
download | chromium_src-0b3b9bccd669b11b9e05e83ba5bbe05d1c8e8900.zip chromium_src-0b3b9bccd669b11b9e05e83ba5bbe05d1c8e8900.tar.gz chromium_src-0b3b9bccd669b11b9e05e83ba5bbe05d1c8e8900.tar.bz2 |
Cause text baselines to go to chromium-mac and chromium-win.
In theory these baselines can be shared between all platforms, but
we don't have a common dir. To reduce the amount of duplicate
work, have run_webkit_tests put the file in the right places.
Review URL: http://codereview.chromium.org/19688
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8941 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/dom/xmlhttprequest-get-expected.txt | 64 | ||||
-rw-r--r-- | webkit/tools/layout_tests/test_types/test_type_base.py | 31 |
2 files changed, 24 insertions, 71 deletions
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/dom/xmlhttprequest-get-expected.txt b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/dom/xmlhttprequest-get-expected.txt deleted file mode 100644 index 3a8a9de..0000000 --- a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/dom/xmlhttprequest-get-expected.txt +++ /dev/null @@ -1,64 +0,0 @@ -GET test - -responseText -<?xml version="1.0"?> -<!DOCTYPE doc [ -<!ATTLIST d id ID #IMPLIED> -]> -<doc> - <foo xmlns="foobar">One</foo> <x:bar xmlns:x="barfoo">Two</x:bar> - <d id="id3">Three</d> -</doc> -responseXML serialized -<!DOCTYPE doc><doc> - <foo xmlns="foobar">One</foo> <x:bar xmlns:x="barfoo">Two</x:bar> - <d id="id3">Three</d> -</doc> -getAllResponseHeaders() -status -0 -statusText -readyState -4 -Event information -Event object: [object XMLHttpRequestProgressEvent] -Event properties: -AT_TARGET : '2' -BLUR : '8192' -BUBBLING_PHASE : '3' -CAPTURING_PHASE : '1' -CHANGE : '32768' -CLICK : '64' -DBLCLICK : '128' -DRAGDROP : '2048' -FOCUS : '4096' -KEYDOWN : '256' -KEYPRESS : '1024' -KEYUP : '512' -MOUSEDOWN : '1' -MOUSEDRAG : '32' -MOUSEMOVE : '16' -MOUSEOUT : '8' -MOUSEOVER : '4' -MOUSEUP : '2' -SELECT : '16384' -bubbles : 'false' -cancelBubble : 'false' -cancelable : 'true' -clipboardData : 'undefined' -currentTarget : '[object XMLHttpRequest]' -eventPhase : '0' -initEvent : 'function initEvent() { [native code] }' -initProgressEvent : 'function initProgressEvent() { [native code] }' -lengthComputable : 'false' -loaded : '0' -position : '0' -preventDefault : 'function preventDefault() { [native code] }' -returnValue : 'true' -srcElement : '[object XMLHttpRequest]' -stopPropagation : 'function stopPropagation() { [native code] }' -target : '[object XMLHttpRequest]' -total : '0' -totalSize : '0' -type : 'load' - diff --git a/webkit/tools/layout_tests/test_types/test_type_base.py b/webkit/tools/layout_tests/test_types/test_type_base.py index 0c92cbf..90d5fa7 100644 --- a/webkit/tools/layout_tests/test_types/test_type_base.py +++ b/webkit/tools/layout_tests/test_types/test_type_base.py @@ -19,6 +19,11 @@ import google.path_utils from layout_package import path_utils from layout_package import platform_utils +def isRenderTreeDump(data): + """Returns true if data appears to be a render tree dump as opposed to a + plain text dump.""" + return data.find("RenderView at (0,0)") != -1 + class TestArguments(object): """Struct-like wrapper for additional arguments needed by specific tests.""" # Whether to save new baseline results. @@ -76,15 +81,27 @@ class TestTypeBase(object): data: result to be saved as the new baseline modifier: type of the result file, e.g. ".txt" or ".png" """ - relative_dir = os.path.dirname(path_utils.RelativeTestFilename(filename)) - output_dir = os.path.join(path_utils.PlatformResultsDir(self._platform), - self._platform, - relative_dir) output_file = os.path.basename(os.path.splitext(filename)[0] + self.FILENAME_SUFFIX_EXPECTED + modifier) - - google.path_utils.MaybeMakeDirectory(output_dir) - open(os.path.join(output_dir, output_file), "wb").write(data) + if isRenderTreeDump(data): + relative_dir = os.path.dirname(path_utils.RelativeTestFilename(filename)) + output_dir = os.path.join(path_utils.PlatformResultsDir(self._platform), + self._platform, + relative_dir) + + google.path_utils.MaybeMakeDirectory(output_dir) + open(os.path.join(output_dir, output_file), "wb").write(data) + else: + # If it's not a render tree, then the results can be shared between all + # platforms. Copy the file into the chromium-win and chromium-mac dirs. + relative_dir = os.path.dirname(path_utils.RelativeTestFilename(filename)) + for platform in ('chromium-win', 'chromium-mac'): + output_dir = os.path.join(path_utils.PlatformResultsDir(self._platform), + platform, + relative_dir) + + google.path_utils.MaybeMakeDirectory(output_dir) + open(os.path.join(output_dir, output_file), "wb").write(data) def OutputFilename(self, filename, modifier): """Returns a filename inside the output dir that contains modifier. |