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

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

Issue 12282041: [content shell] implement pathToLocalResource (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 years, 10 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/webkit_test_controller.h ('k') | content/shell/webkit_test_runner.h » ('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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 if (main_window_) { 234 if (main_window_) {
235 WebContentsObserver::Observe(NULL); 235 WebContentsObserver::Observe(NULL);
236 main_window_ = NULL; 236 main_window_ = NULL;
237 } 237 }
238 Shell::CloseAllWindows(); 238 Shell::CloseAllWindows();
239 Send(new ShellViewMsg_ResetAll); 239 Send(new ShellViewMsg_ResetAll);
240 current_pid_ = base::kNullProcessId; 240 current_pid_ = base::kNullProcessId;
241 return true; 241 return true;
242 } 242 }
243 243
244 void WebKitTestController::SetTempPath(const base::FilePath& temp_path) {
245 temp_path_ = temp_path;
246 }
247
244 void WebKitTestController::RendererUnresponsive() { 248 void WebKitTestController::RendererUnresponsive() {
245 DCHECK(CalledOnValidThread()); 249 DCHECK(CalledOnValidThread());
246 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTimeout)) 250 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTimeout))
247 printer_->AddErrorMessage("#PROCESS UNRESPONSIVE - renderer"); 251 printer_->AddErrorMessage("#PROCESS UNRESPONSIVE - renderer");
248 } 252 }
249 253
250 void WebKitTestController::OverrideWebkitPrefs( 254 void WebKitTestController::OverrideWebkitPrefs(
251 webkit_glue::WebPreferences* prefs) { 255 webkit_glue::WebPreferences* prefs) {
252 if (should_override_prefs_) { 256 if (should_override_prefs_) {
253 *prefs = prefs_; 257 *prefs = prefs_;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 } 299 }
296 300
297 void WebKitTestController::RenderViewCreated(RenderViewHost* render_view_host) { 301 void WebKitTestController::RenderViewCreated(RenderViewHost* render_view_host) {
298 DCHECK(CalledOnValidThread()); 302 DCHECK(CalledOnValidThread());
299 // Might be kNullProcessHandle, in which case we will receive a notification 303 // Might be kNullProcessHandle, in which case we will receive a notification
300 // later when the RenderProcessHost was created. 304 // later when the RenderProcessHost was created.
301 if (render_view_host->GetProcess()->GetHandle() != base::kNullProcessHandle) 305 if (render_view_host->GetProcess()->GetHandle() != base::kNullProcessHandle)
302 current_pid_ = base::GetProcId(render_view_host->GetProcess()->GetHandle()); 306 current_pid_ = base::GetProcId(render_view_host->GetProcess()->GetHandle());
303 ShellViewMsg_SetTestConfiguration_Params params; 307 ShellViewMsg_SetTestConfiguration_Params params;
304 params.current_working_directory = current_working_directory_; 308 params.current_working_directory = current_working_directory_;
309 params.temp_path = temp_path_;
305 params.test_url = test_url_; 310 params.test_url = test_url_;
306 params.enable_pixel_dumping = enable_pixel_dumping_; 311 params.enable_pixel_dumping = enable_pixel_dumping_;
307 params.layout_test_timeout = kTestTimeoutMilliseconds; 312 params.layout_test_timeout = kTestTimeoutMilliseconds;
308 params.allow_external_pages = CommandLine::ForCurrentProcess()->HasSwitch( 313 params.allow_external_pages = CommandLine::ForCurrentProcess()->HasSwitch(
309 switches::kAllowExternalPages); 314 switches::kAllowExternalPages);
310 params.expected_pixel_hash = expected_pixel_hash_; 315 params.expected_pixel_hash = expected_pixel_hash_;
311 render_view_host->Send(new ShellViewMsg_SetTestConfiguration( 316 render_view_host->Send(new ShellViewMsg_SetTestConfiguration(
312 render_view_host->GetRoutingID(), params)); 317 render_view_host->GetRoutingID(), params));
313 } 318 }
314 319
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 460
456 void WebKitTestController::OnNotImplemented( 461 void WebKitTestController::OnNotImplemented(
457 const std::string& object_name, 462 const std::string& object_name,
458 const std::string& property_name) { 463 const std::string& property_name) {
459 printer_->AddErrorMessage( 464 printer_->AddErrorMessage(
460 std::string("FAIL: NOT IMPLEMENTED: ") + 465 std::string("FAIL: NOT IMPLEMENTED: ") +
461 object_name + "." + property_name); 466 object_name + "." + property_name);
462 } 467 }
463 468
464 } // namespace content 469 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/webkit_test_controller.h ('k') | content/shell/webkit_test_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698