summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-06 00:50:33 +0000
committertkent@chromium.org <tkent@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-06 00:50:33 +0000
commit2e3fb5e821d2735caedb72287ec7eed7683977d0 (patch)
tree8bfba54400305c7f13f5f053001199c65ad17ebb
parent5efb4a5d61617525f55feb01964159c1ce740a0c (diff)
downloadchromium_src-2e3fb5e821d2735caedb72287ec7eed7683977d0.zip
chromium_src-2e3fb5e821d2735caedb72287ec7eed7683977d0.tar.gz
chromium_src-2e3fb5e821d2735caedb72287ec7eed7683977d0.tar.bz2
Fix a bug for text/plain outout tests such as slow-utf8-text.pl,
introduced by r58615. TEST=This is a test fix BUG=none TBR=tony Review URL: http://codereview.chromium.org/3353013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58617 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/tools/test_shell/test_shell.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index c02a535..c33856ca 100644
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -246,6 +246,8 @@ void TestShell::Dump(TestShell* shell) {
if (frame) {
bool should_dump_as_text =
shell->layout_test_controller_->ShouldDumpAsText();
+ bool should_generate_pixel_results =
+ shell->layout_test_controller()->ShouldGeneratePixelResults();
bool dumped_anything = false;
if (params->dump_tree) {
dumped_anything = true;
@@ -255,7 +257,10 @@ void TestShell::Dump(TestShell* shell) {
// Plain text pages should be dumped as text
const string16& mime_type =
frame->dataSource()->response().mimeType();
- should_dump_as_text = EqualsASCII(mime_type, "text/plain");
+ if (EqualsASCII(mime_type, "text/plain")) {
+ should_dump_as_text = true;
+ should_generate_pixel_results = false;
+ }
}
if (should_dump_as_text) {
bool recursive = shell->layout_test_controller_->
@@ -283,8 +288,7 @@ void TestShell::Dump(TestShell* shell) {
}
}
- if (params->dump_pixels
- && shell->layout_test_controller()->ShouldGeneratePixelResults()) {
+ if (params->dump_pixels && should_generate_pixel_results) {
// Image output: we write the image data to the file given on the
// command line (for the dump pixels argument), and the MD5 sum to
// stdout.