summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/test_shell.cc
diff options
context:
space:
mode:
authorjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-06 20:36:33 +0000
committerjrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-06 20:36:33 +0000
commitbe645db8f6309a1e9a2670e3a23c7b2d7b403519 (patch)
tree2f8b2408bdba3c970074ec5bb2f027e7b78776e3 /webkit/tools/test_shell/test_shell.cc
parentda90ffdff909ac442444c6d7b8ec9a2a15d8f01a (diff)
downloadchromium_src-be645db8f6309a1e9a2670e3a23c7b2d7b403519.zip
chromium_src-be645db8f6309a1e9a2670e3a23c7b2d7b403519.tar.gz
chromium_src-be645db8f6309a1e9a2670e3a23c7b2d7b403519.tar.bz2
Reference and create a RenderView when needed.
This initiates the landslide of linker hell in Chromium.app, bringing in webkit, v8, and the kitchen sink. Review URL: http://codereview.chromium.org/21123 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell.cc')
-rwxr-xr-xwebkit/tools/test_shell/test_shell.cc27
1 files changed, 16 insertions, 11 deletions
diff --git a/webkit/tools/test_shell/test_shell.cc b/webkit/tools/test_shell/test_shell.cc
index ceeb6e6..e6455a8 100755
--- a/webkit/tools/test_shell/test_shell.cc
+++ b/webkit/tools/test_shell/test_shell.cc
@@ -63,7 +63,7 @@ class URLRequestTestShellFileJob : public URLRequestFileJob {
public:
virtual ~URLRequestTestShellFileJob() { }
- static URLRequestJob* InspectorFactory(URLRequest* request,
+ static URLRequestJob* InspectorFactory(URLRequest* request,
const std::string& scheme) {
std::wstring path;
PathService::Get(base::DIR_EXE, &path);
@@ -90,7 +90,7 @@ WebPreferences* TestShell::web_prefs_ = NULL;
bool TestShell::layout_test_mode_ = false;
int TestShell::file_test_timeout_ms_ = kDefaultFileTestTimeoutMillisecs;
-TestShell::TestShell()
+TestShell::TestShell()
: m_mainWnd(NULL),
m_editWnd(NULL),
m_webViewHost(NULL),
@@ -111,7 +111,7 @@ TestShell::TestShell()
navigation_controller_.reset(new TestNavigationController(this));
URLRequestFilter* filter = URLRequestFilter::GetInstance();
- filter->AddHostnameHandler("test-shell-resource", "inspector",
+ filter->AddHostnameHandler("test-shell-resource", "inspector",
&URLRequestTestShellFileJob::InspectorFactory);
url_util::AddStandardScheme("test-shell-resource");
}
@@ -220,7 +220,7 @@ void TestShell::Dump(TestShell* shell) {
printf("%s", WideToUTF8(bfDump).c_str());
}
}
-
+
if (params->dump_pixels && !should_dump_as_text) {
// 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
@@ -288,7 +288,7 @@ void TestShell::InitLogging(bool suppress_error_dialogs,
SEM_NOOPENFILEERRORBOX;
if (!enable_gp_fault_error_box)
new_flags |= SEM_NOGPFAULTERRORBOX;
-
+
// Preserve existing error mode, as discussed at
// http://blogs.msdn.com/oldnewthing/archive/2004/07/27/198410.aspx
UINT existing_flags = SetErrorMode(new_flags);
@@ -298,7 +298,7 @@ void TestShell::InitLogging(bool suppress_error_dialogs,
// Only log to a file if we're running layout tests. This prevents debugging
// output from disrupting whether or not we pass.
- logging::LoggingDestination destination =
+ logging::LoggingDestination destination =
logging::LOG_TO_BOTH_FILE_AND_SYSTEM_DEBUG_LOG;
if (layout_test_mode)
destination = logging::LOG_ONLY_TO_FILE;
@@ -353,10 +353,10 @@ void TestShell::ResetWebPreferences() {
// These two fonts are picked from the intersection of
// Win XP font list and Vista font list :
- // http://www.microsoft.com/typography/fonts/winxp.htm
+ // http://www.microsoft.com/typography/fonts/winxp.htm
// http://blogs.msdn.com/michkap/archive/2006/04/04/567881.aspx
// Some of them are installed only with CJK and complex script
- // support enabled on Windows XP and are out of consideration here.
+ // support enabled on Windows XP and are out of consideration here.
// (although we enabled both on our buildbots.)
// They (especially Impact for fantasy) are not typical cursive
// and fantasy fonts, but it should not matter for layout tests
@@ -405,7 +405,7 @@ void TestShell::Show(WebView* webview, WindowOpenDisposition disposition) {
void TestShell::BindJSObjectsToWindow(WebFrame* frame) {
// Only bind the test classes if we're running tests.
if (layout_test_mode_) {
- layout_test_controller_->BindToJavascript(frame,
+ layout_test_controller_->BindToJavascript(frame,
L"layoutTestController");
event_sending_controller_->BindToJavascript(frame,
L"eventSender");
@@ -462,7 +462,7 @@ bool TestShell::Navigate(const TestNavigationEntry& entry, bool reload) {
// Otherwise, we give it the state to navigate to.
if (!reload)
request->SetHistoryState(entry.GetContentState());
-
+
request->SetExtraData(
new TestShellExtraRequestData(entry.GetPageID()));
@@ -567,7 +567,12 @@ bool GetPreferredExtensionForMimeType(const std::string& mime_type,
return net::GetPreferredExtensionForMimeType(mime_type, ext);
}
-GlueBitmap GetBitmapResource(int resource_id) {
+#if defined(OS_MACOSX)
+SkBitmap*
+#else
+GlueBitmap*
+#endif
+GetBitmapResource(int resource_id) {
return NULL;
}