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

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

Issue 12258047: [content shell] Use the TestRunner library again and remove the mock testRunner (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/shell_resources.grd ('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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
OLDNEW
« no previous file with comments | « content/shell/shell_resources.grd ('k') | content/shell/webkit_test_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698