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

Unified Diff: content/shell/browser/layout_test/blink_test_controller.cc

Issue 2513423003: DevTools: Convert inspector-unit tests to use reusable test harness (Closed)
Patch Set: Moved type definition out of externs Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/browser/layout_test/blink_test_controller.cc
diff --git a/content/shell/browser/layout_test/blink_test_controller.cc b/content/shell/browser/layout_test/blink_test_controller.cc
index 5b9d1827b01c0545368c4da9f9c521e23baae861..33d5932063dcc8e45487e1b1f68a1b592b000932 100644
--- a/content/shell/browser/layout_test/blink_test_controller.cc
+++ b/content/shell/browser/layout_test/blink_test_controller.cc
@@ -268,7 +268,10 @@ bool BlinkTestController::PrepareForLayoutTest(
current_working_directory_ = current_working_directory;
enable_pixel_dumping_ = enable_pixel_dumping;
expected_pixel_hash_ = expected_pixel_hash;
- test_url_ = test_url;
+ if (test_url.spec().find("/inspector-unit/") == std::string::npos)
+ test_url_ = test_url;
+ else
+ test_url_ = LayoutTestDevToolsFrontend::MapJSTestURL(test_url);
did_send_initial_test_configuration_ = false;
printer_->reset();
frame_to_layout_dump_map_.clear();
@@ -279,10 +282,10 @@ bool BlinkTestController::PrepareForLayoutTest(
ShellBrowserContext* browser_context =
ShellContentBrowserClient::Get()->browser_context();
is_compositing_test_ =
- test_url.spec().find("compositing/") != std::string::npos;
+ test_url_.spec().find("compositing/") != std::string::npos;
initial_size_ = Shell::GetShellDefaultSize();
// The W3C SVG layout tests use a different size than the other layout tests.
- if (test_url.spec().find("W3C-SVG-1.1") != std::string::npos)
+ if (test_url_.spec().find("W3C-SVG-1.1") != std::string::npos)
initial_size_ = gfx::Size(kTestSVGWindowWidthDip, kTestSVGWindowHeightDip);
if (!main_window_) {
main_window_ = content::Shell::CreateNewWindow(
@@ -294,7 +297,7 @@ bool BlinkTestController::PrepareForLayoutTest(
current_pid_ = base::kNullProcessId;
default_prefs_ =
main_window_->web_contents()->GetRenderViewHost()->GetWebkitPreferences();
- main_window_->LoadURL(test_url);
+ main_window_->LoadURL(test_url_);
} else {
#if defined(OS_MACOSX)
// Shell::SizeTo is not implemented on all platforms.
@@ -320,7 +323,7 @@ bool BlinkTestController::PrepareForLayoutTest(
render_view_host->UpdateWebkitPreferences(default_prefs_);
HandleNewRenderFrameHost(render_view_host->GetMainFrame());
- NavigationController::LoadURLParams params(test_url);
+ NavigationController::LoadURLParams params(test_url_);
params.transition_type = ui::PageTransitionFromInt(
ui::PAGE_TRANSITION_TYPED | ui::PAGE_TRANSITION_FROM_ADDRESS_BAR);
params.should_clear_history_list = true;

Powered by Google App Engine
This is Rietveld 408576698