Commit c8579842 authored by jochen@chromium.org's avatar jochen@chromium.org

[content shell] rip out code that moves windows off screen during layout tests

It just makes debugging difficult

BUG=111316
TEST=none


Review URL: https://chromiumcodereview.appspot.com/10857057

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@152181 0039d316-1c4b-4281-b951-d872f2087c98
parent e46617f1
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
#include <gdk/gdkkeysyms.h> #include <gdk/gdkkeysyms.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include "base/command_line.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/string_piece.h" #include "base/string_piece.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
...@@ -18,7 +17,6 @@ ...@@ -18,7 +17,6 @@
#include "content/public/common/renderer_preferences.h" #include "content/public/common/renderer_preferences.h"
#include "content/shell/shell_browser_context.h" #include "content/shell/shell_browser_context.h"
#include "content/shell/shell_content_browser_client.h" #include "content/shell/shell_content_browser_client.h"
#include "content/shell/shell_switches.h"
#include "third_party/skia/include/core/SkColor.h" #include "third_party/skia/include/core/SkColor.h"
namespace content { namespace content {
...@@ -186,9 +184,6 @@ void Shell::PlatformCreateWindow(int width, int height) { ...@@ -186,9 +184,6 @@ void Shell::PlatformCreateWindow(int width, int height) {
gtk_container_add(GTK_CONTAINER(window_), vbox_); gtk_container_add(GTK_CONTAINER(window_), vbox_);
gtk_widget_show_all(GTK_WIDGET(window_)); gtk_widget_show_all(GTK_WIDGET(window_));
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree))
gtk_widget_set_uposition(GTK_WIDGET(window_), 10000, 10000);
SizeTo(width, height); SizeTo(width, height);
} }
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
#include <algorithm> #include <algorithm>
#include "base/command_line.h"
#include "base/logging.h" #include "base/logging.h"
#import "base/memory/scoped_nsobject.h" #import "base/memory/scoped_nsobject.h"
#include "base/string_piece.h" #include "base/string_piece.h"
...@@ -15,7 +14,6 @@ ...@@ -15,7 +14,6 @@
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h" #include "content/public/browser/web_contents_view.h"
#include "content/shell/resource.h" #include "content/shell/resource.h"
#include "content/shell/shell_switches.h"
#include "googleurl/src/gurl.h" #include "googleurl/src/gurl.h"
#import "ui/base/cocoa/underlay_opengl_hosting_window.h" #import "ui/base/cocoa/underlay_opengl_hosting_window.h"
...@@ -180,10 +178,6 @@ void Shell::PlatformCreateWindow(int width, int height) { ...@@ -180,10 +178,6 @@ void Shell::PlatformCreateWindow(int width, int height) {
NSClosableWindowMask | NSClosableWindowMask |
NSMiniaturizableWindowMask | NSMiniaturizableWindowMask |
NSResizableWindowMask; NSResizableWindowMask;
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
content_rect = NSOffsetRect(initial_window_bounds, -10000, -10000);
style_mask = NSBorderlessWindowMask;
}
CrShellWindow* window = CrShellWindow* window =
[[CrShellWindow alloc] initWithContentRect:content_rect [[CrShellWindow alloc] initWithContentRect:content_rect
styleMask:style_mask styleMask:style_mask
......
...@@ -9,13 +9,11 @@ ...@@ -9,13 +9,11 @@
#include <io.h> #include <io.h>
#include <windows.h> #include <windows.h>
#include "base/command_line.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "base/win/wrapped_window_proc.h" #include "base/win/wrapped_window_proc.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h" #include "content/public/browser/web_contents_view.h"
#include "content/shell/resource.h" #include "content/shell/resource.h"
#include "content/shell/shell_switches.h"
#include "ui/base/win/hwnd_util.h" #include "ui/base/win/hwnd_util.h"
namespace { namespace {
...@@ -155,13 +153,8 @@ void Shell::SizeTo(int width, int height) { ...@@ -155,13 +153,8 @@ void Shell::SizeTo(int width, int height) {
// Add space for the url bar. // Add space for the url bar.
window_height += kURLBarHeight; window_height += kURLBarHeight;
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDumpRenderTree)) {
SetWindowPos(window_, NULL, -window_width, -window_height,
window_width, window_height, SWP_NOZORDER);
} else {
SetWindowPos(window_, NULL, 0, 0, window_width, window_height, SetWindowPos(window_, NULL, 0, 0, window_width, window_height,
SWP_NOMOVE | SWP_NOZORDER); SWP_NOMOVE | SWP_NOZORDER);
}
} }
void Shell::PlatformResizeSubViews() { void Shell::PlatformResizeSubViews() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment