OLD | NEW |
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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 if (test_url.spec().find("W3C-SVG-1.1") != std::string::npos) | 169 if (test_url.spec().find("W3C-SVG-1.1") != std::string::npos) |
170 initial_size = gfx::Size(480, 360); | 170 initial_size = gfx::Size(480, 360); |
171 main_window_ = content::Shell::CreateNewWindow( | 171 main_window_ = content::Shell::CreateNewWindow( |
172 browser_context, | 172 browser_context, |
173 GURL(), | 173 GURL(), |
174 NULL, | 174 NULL, |
175 MSG_ROUTING_NONE, | 175 MSG_ROUTING_NONE, |
176 initial_size); | 176 initial_size); |
177 WebContentsObserver::Observe(main_window_->web_contents()); | 177 WebContentsObserver::Observe(main_window_->web_contents()); |
178 main_window_->LoadURL(test_url); | 178 main_window_->LoadURL(test_url); |
179 if (test_url.spec().find("/dumpAsText/") != std::string::npos) | |
180 enable_pixel_dumping_ = false; | |
181 if (test_url.spec().find("/inspector/") != std::string::npos) | |
182 main_window_->ShowDevTools(); | |
183 main_window_->web_contents()->GetRenderViewHost()->Focus(); | 179 main_window_->web_contents()->GetRenderViewHost()->Focus(); |
184 main_window_->web_contents()->GetRenderViewHost()->SetActive(true); | 180 main_window_->web_contents()->GetRenderViewHost()->SetActive(true); |
185 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTimeout)) { | 181 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTimeout)) { |
186 watchdog_.Reset(base::Bind(&WebKitTestController::TimeoutHandler, | 182 watchdog_.Reset(base::Bind(&WebKitTestController::TimeoutHandler, |
187 base::Unretained(this))); | 183 base::Unretained(this))); |
188 MessageLoop::current()->PostDelayedTask( | 184 MessageLoop::current()->PostDelayedTask( |
189 FROM_HERE, | 185 FROM_HERE, |
190 watchdog_.callback(), | 186 watchdog_.callback(), |
191 base::TimeDelta::FromMilliseconds(kTestTimeoutMilliseconds + 1000)); | 187 base::TimeDelta::FromMilliseconds(kTestTimeoutMilliseconds + 1000)); |
192 } | 188 } |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
391 | 387 |
392 void WebKitTestController::OnNotImplemented( | 388 void WebKitTestController::OnNotImplemented( |
393 const std::string& object_name, | 389 const std::string& object_name, |
394 const std::string& property_name) { | 390 const std::string& property_name) { |
395 printer_->AddErrorMessage( | 391 printer_->AddErrorMessage( |
396 std::string("FAIL: NOT IMPLEMENTED: ") + | 392 std::string("FAIL: NOT IMPLEMENTED: ") + |
397 object_name + "." + property_name); | 393 object_name + "." + property_name); |
398 } | 394 } |
399 | 395 |
400 } // namespace content | 396 } // namespace content |
OLD | NEW |