Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: content/shell/webkit_test_controller.cc

Issue 11828028: [content shell] W3C SVG tests need to run in a smaller window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/shell/shell_win.cc ('k') | content/test/content_browser_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/webkit_test_controller.h" 5 #include "content/shell/webkit_test_controller.h"
6 6
7 #include <iostream> 7 #include <iostream>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 const std::string& expected_pixel_hash) { 156 const std::string& expected_pixel_hash) {
157 DCHECK(CalledOnValidThread()); 157 DCHECK(CalledOnValidThread());
158 current_working_directory_ = current_working_directory; 158 current_working_directory_ = current_working_directory;
159 enable_pixel_dumping_ = enable_pixel_dumping; 159 enable_pixel_dumping_ = enable_pixel_dumping;
160 expected_pixel_hash_ = expected_pixel_hash; 160 expected_pixel_hash_ = expected_pixel_hash;
161 printer_->reset(); 161 printer_->reset();
162 printer_->PrintTextHeader(); 162 printer_->PrintTextHeader();
163 content::ShellBrowserContext* browser_context = 163 content::ShellBrowserContext* browser_context =
164 static_cast<content::ShellContentBrowserClient*>( 164 static_cast<content::ShellContentBrowserClient*>(
165 content::GetContentClient()->browser())->browser_context(); 165 content::GetContentClient()->browser())->browser_context();
166 gfx::Size initial_size;
167 // The W3C SVG layout tests use a different size than the other layout tests.
168 if (test_url.spec().find("W3C-SVG-1.1") != std::string::npos)
169 initial_size = gfx::Size(480, 360);
166 main_window_ = content::Shell::CreateNewWindow( 170 main_window_ = content::Shell::CreateNewWindow(
167 browser_context, 171 browser_context,
168 GURL(), 172 GURL(),
169 NULL, 173 NULL,
170 MSG_ROUTING_NONE, 174 MSG_ROUTING_NONE,
171 NULL); 175 initial_size);
172 WebContentsObserver::Observe(main_window_->web_contents()); 176 WebContentsObserver::Observe(main_window_->web_contents());
173 main_window_->LoadURL(test_url); 177 main_window_->LoadURL(test_url);
174 if (test_url.spec().find("/dumpAsText/") != std::string::npos || 178 if (test_url.spec().find("/dumpAsText/") != std::string::npos ||
175 test_url.spec().find("\\dumpAsText\\") != std::string::npos) { 179 test_url.spec().find("\\dumpAsText\\") != std::string::npos) {
176 dump_as_text_ = true; 180 dump_as_text_ = true;
177 enable_pixel_dumping_ = false; 181 enable_pixel_dumping_ = false;
178 } 182 }
179 if (test_url.spec().find("/inspector/") != std::string::npos || 183 if (test_url.spec().find("/inspector/") != std::string::npos ||
180 test_url.spec().find("\\inspector\\") != std::string::npos) { 184 test_url.spec().find("\\inspector\\") != std::string::npos) {
181 main_window_->ShowDevTools(); 185 main_window_->ShowDevTools();
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 500
497 void WebKitTestController::OnNotImplemented( 501 void WebKitTestController::OnNotImplemented(
498 const std::string& object_name, 502 const std::string& object_name,
499 const std::string& property_name) { 503 const std::string& property_name) {
500 printer_->AddErrorMessage( 504 printer_->AddErrorMessage(
501 std::string("FAIL: NOT IMPLEMENTED: ") + 505 std::string("FAIL: NOT IMPLEMENTED: ") +
502 object_name + "." + property_name); 506 object_name + "." + property_name);
503 } 507 }
504 508
505 } // namespace content 509 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/shell_win.cc ('k') | content/test/content_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698