diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-18 20:22:12 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-18 20:22:12 +0000 |
commit | c22e0ff76ca18e46d6b5f862807267e16f420834 (patch) | |
tree | d1ee5ae110274d642e628003e7fcd0cbdd452459 /webkit/tools/test_shell/test_shell_gtk.cc | |
parent | df55605c1f1cbe7011cd98569087400f65e19533 (diff) | |
download | chromium_src-c22e0ff76ca18e46d6b5f862807267e16f420834.zip chromium_src-c22e0ff76ca18e46d6b5f862807267e16f420834.tar.gz chromium_src-c22e0ff76ca18e46d6b5f862807267e16f420834.tar.bz2 |
Make the gtk window resize itself to the proper size at layout tests startup.
Review URL: http://codereview.chromium.org/11602
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5627 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/test_shell_gtk.cc')
-rw-r--r-- | webkit/tools/test_shell/test_shell_gtk.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/webkit/tools/test_shell/test_shell_gtk.cc b/webkit/tools/test_shell/test_shell_gtk.cc index 5287a6a..5972367 100644 --- a/webkit/tools/test_shell/test_shell_gtk.cc +++ b/webkit/tools/test_shell/test_shell_gtk.cc @@ -189,6 +189,12 @@ bool TestShell::Initialize(const std::wstring& startingURL) { toolbar_height_ = toolbar->allocation.height + gtk_box_get_spacing(GTK_BOX(vbox)); + bool bIsSVGTest = startingURL.find(L"W3C-SVG-1.1") != std::wstring::npos; + if (bIsSVGTest) + SizeToSVG(); + else + SizeToDefault(); + return true; } @@ -395,6 +401,13 @@ void TestShell::LoadURLForFrame(const wchar_t* url, if (!url) return; + bool bIsSVGTest = wcsstr(url, L"W3C-SVG-1.1") > 0; + + if (bIsSVGTest) + SizeToSVG(); + else + SizeToDefault(); + std::wstring frame_string; if (frame_name) frame_string = frame_name; |