diff options
author | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 13:56:10 +0000 |
---|---|---|
committer | jochen@chromium.org <jochen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-17 13:56:10 +0000 |
commit | 024b2f209c4fe8d7352b311605d076f74f9f6bb5 (patch) | |
tree | 23cdb3812ca109475a2345f27af43feed7f4cdcc /content/shell | |
parent | 237b4a5506a94a6c8981c26cb5fb91ecf01d5576 (diff) | |
download | chromium_src-024b2f209c4fe8d7352b311605d076f74f9f6bb5.zip chromium_src-024b2f209c4fe8d7352b311605d076f74f9f6bb5.tar.gz chromium_src-024b2f209c4fe8d7352b311605d076f74f9f6bb5.tar.bz2 |
[content shell] use test shell's broken image resources for layout tests
BUG=111316
TEST=e.g. compositing/color-matching/pdf-image-match.html passes
R=marja@chromium.org
Review URL: https://codereview.chromium.org/11946045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177403 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell')
-rw-r--r-- | content/shell/resources/README.txt | 26 | ||||
-rw-r--r-- | content/shell/resources/missingImage.gif | bin | 0 -> 362 bytes | |||
-rw-r--r-- | content/shell/resources/missingImage.png | bin | 0 -> 411 bytes | |||
-rw-r--r-- | content/shell/resources/shell_devtools_discovery_page.html (renamed from content/shell/shell_devtools_discovery_page.html) | 0 | ||||
-rw-r--r-- | content/shell/resources/textAreaResizeCorner.png | bin | 0 -> 195 bytes | |||
-rw-r--r-- | content/shell/resources/webkit_test_runner.js (renamed from content/shell/webkit_test_runner.js) | 0 | ||||
-rw-r--r-- | content/shell/shell_content_client.cc | 18 | ||||
-rw-r--r-- | content/shell/shell_resources.grd | 7 |
8 files changed, 49 insertions, 2 deletions
diff --git a/content/shell/resources/README.txt b/content/shell/resources/README.txt new file mode 100644 index 0000000..4a4e10b --- /dev/null +++ b/content/shell/resources/README.txt @@ -0,0 +1,26 @@ +missingImage.gif was created from Webkit data: WebCore/Resources/missingImage.tiff + +Licence text for missingImage.tiff from which missingImage.gif was generated: + +Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, 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: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. 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 APPLE COMPUTER, INC. ``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 APPLE COMPUTER, INC. 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. + +missingImage.png is the same as WebCore/Resources/missingImage.png and carries exactly the same license. diff --git a/content/shell/resources/missingImage.gif b/content/shell/resources/missingImage.gif Binary files differnew file mode 100644 index 0000000..0f7215d --- /dev/null +++ b/content/shell/resources/missingImage.gif diff --git a/content/shell/resources/missingImage.png b/content/shell/resources/missingImage.png Binary files differnew file mode 100644 index 0000000..5c24d20 --- /dev/null +++ b/content/shell/resources/missingImage.png diff --git a/content/shell/shell_devtools_discovery_page.html b/content/shell/resources/shell_devtools_discovery_page.html index 9aa4c30..9aa4c30 100644 --- a/content/shell/shell_devtools_discovery_page.html +++ b/content/shell/resources/shell_devtools_discovery_page.html diff --git a/content/shell/resources/textAreaResizeCorner.png b/content/shell/resources/textAreaResizeCorner.png Binary files differnew file mode 100644 index 0000000..023615e --- /dev/null +++ b/content/shell/resources/textAreaResizeCorner.png diff --git a/content/shell/webkit_test_runner.js b/content/shell/resources/webkit_test_runner.js index 5cbb59f..5cbb59f 100644 --- a/content/shell/webkit_test_runner.js +++ b/content/shell/resources/webkit_test_runner.js diff --git a/content/shell/shell_content_client.cc b/content/shell/shell_content_client.cc index 648e615..6748b92 100644 --- a/content/shell/shell_content_client.cc +++ b/content/shell/shell_content_client.cc @@ -7,6 +7,9 @@ #include "base/command_line.h" #include "base/string_piece.h" #include "content/public/common/content_switches.h" +#include "content/shell/shell_switches.h" +#include "grit/shell_resources.h" +#include "grit/webkit_resources.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/resource/resource_bundle.h" #include "webkit/user_agent/user_agent_util.h" @@ -31,6 +34,21 @@ string16 ShellContentClient::GetLocalizedString(int message_id) const { base::StringPiece ShellContentClient::GetDataResource( int resource_id, ui::ScaleFactor scale_factor) const { + if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) { + switch (resource_id) { + case IDR_BROKENIMAGE: +#if defined(OS_MACOSX) + resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_PNG; +#else + resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_GIF; +#endif + break; + + case IDR_TEXTAREA_RESIZER: + resource_id = IDR_CONTENT_SHELL_TEXT_AREA_RESIZE_CORNER_PNG; + break; + } + } return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( resource_id, scale_factor); } diff --git a/content/shell/shell_resources.grd b/content/shell/shell_resources.grd index 4767812..dc0b893 100644 --- a/content/shell/shell_resources.grd +++ b/content/shell/shell_resources.grd @@ -10,8 +10,11 @@ <translations /> <release seq="1"> <includes> - <include name="IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE" file="shell_devtools_discovery_page.html" type="BINDATA" /> - <include name="IDR_CONTENT_SHELL_WEBKIT_TEST_RUNNER_JS" file="webkit_test_runner.js" type="BINDATA" /> + <include name="IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE" file="resources/shell_devtools_discovery_page.html" type="BINDATA" /> + <include name="IDR_CONTENT_SHELL_WEBKIT_TEST_RUNNER_JS" file="resources/webkit_test_runner.js" type="BINDATA" /> + <include name="IDR_CONTENT_SHELL_MISSING_IMAGE_GIF" file="resources/missingImage.gif" type="BINDATA" /> + <include name="IDR_CONTENT_SHELL_MISSING_IMAGE_PNG" file="resources/missingImage.png" type="BINDATA" /> + <include name="IDR_CONTENT_SHELL_TEXT_AREA_RESIZE_CORNER_PNG" file="resources/textAreaResizeCorner.png" type="BINDATA" /> </includes> </release> </grit> |