summaryrefslogtreecommitdiffstats
path: root/chrome/browser/renderer_host/test
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-11-18 18:32:45 +0000
committerBen Murdoch <benm@google.com>2010-11-18 18:38:07 +0000
commit513209b27ff55e2841eac0e4120199c23acce758 (patch)
treeaeba30bb08c5f47c57003544e378a377c297eee6 /chrome/browser/renderer_host/test
parent164f7496de0fbee436b385a79ead9e3cb81a50c1 (diff)
downloadexternal_chromium-513209b27ff55e2841eac0e4120199c23acce758.zip
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.gz
external_chromium-513209b27ff55e2841eac0e4120199c23acce758.tar.bz2
Merge Chromium at r65505: Initial merge by git.
Change-Id: I31d8f1d8cd33caaf7f47ffa7350aef42d5fbdb45
Diffstat (limited to 'chrome/browser/renderer_host/test')
-rw-r--r--chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc47
-rw-r--r--chrome/browser/renderer_host/test/test_backing_store.cc3
-rw-r--r--chrome/browser/renderer_host/test/test_backing_store.h3
-rw-r--r--chrome/browser/renderer_host/test/test_render_view_host.cc10
-rw-r--r--chrome/browser/renderer_host/test/test_render_view_host.h7
5 files changed, 43 insertions, 27 deletions
diff --git a/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc b/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc
index 8fa9b11..2e7c56b 100644
--- a/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc
+++ b/chrome/browser/renderer_host/test/render_view_host_manager_browsertest.cc
@@ -5,6 +5,7 @@
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/ref_counted.h"
+#include "base/stringprintf.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/extensions/extension_error_reporter.h"
@@ -28,13 +29,28 @@ class RenderViewHostManagerTest : public InProcessBrowserTest {
RenderViewHostManagerTest() {
EnableDOMAutomation();
}
+
+ std::string GetFileWithHostAndPortReplacement(
+ const std::string& original_path,
+ const net::HostPortPair& host_port_pair) const {
+ return StringPrintf("%s?replace_orig=%s&replace_new=%s",
+ original_path.c_str(),
+ kReplaceText_,
+ host_port_pair.ToString().c_str());
+ }
+
+ private:
+ static const char* const kReplaceText_;
};
+// static
+const char* const RenderViewHostManagerTest::kReplaceText_ =
+ "REPLACE_WITH_HOST_AND_PORT";
+
// Test for crbug.com/24447. Following a cross-site link with rel=noreferrer
// and target=_blank should create a new SiteInstance.
-// Disabled, http://crbug.com/60079.
IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
- DISABLED_SwapProcessWithRelNoreferrerAndTargetBlank) {
+ SwapProcessWithRelNoreferrerAndTargetBlank) {
// Start two servers with different sites.
ASSERT_TRUE(test_server()->Start());
net::TestServer https_server_(
@@ -43,8 +59,11 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
ASSERT_TRUE(https_server_.Start());
// Load a page with links that open in a new window.
- ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(
- "files/click-noreferrer-links.html"));
+ std::string replacement_path = GetFileWithHostAndPortReplacement(
+ "files/click-noreferrer-links.html",
+ https_server_.host_port_pair());
+ ui_test_utils::NavigateToURL(browser(),
+ test_server()->GetURL(replacement_path));
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
@@ -76,9 +95,8 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
// Test for crbug.com/24447. Following a cross-site link with just
// target=_blank should not create a new SiteInstance.
-// Disabled, http://crbug.com/60078.
IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
- DISABLED_DontSwapProcessWithOnlyTargetBlank) {
+ DontSwapProcessWithOnlyTargetBlank) {
// Start two servers with different sites.
ASSERT_TRUE(test_server()->Start());
net::TestServer https_server_(
@@ -87,8 +105,11 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
ASSERT_TRUE(https_server_.Start());
// Load a page with links that open in a new window.
- ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(
- "files/click-noreferrer-links.html"));
+ std::string replacement_path = GetFileWithHostAndPortReplacement(
+ "files/click-noreferrer-links.html",
+ https_server_.host_port_pair());
+ ui_test_utils::NavigateToURL(browser(),
+ test_server()->GetURL(replacement_path));
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
@@ -120,9 +141,8 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
// Test for crbug.com/24447. Following a cross-site link with rel=noreferrer
// and no target=_blank should not create a new SiteInstance.
-// Disabled, http://crbug.com/60077.
IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
- DISABLED_DontSwapProcessWithOnlyRelNoreferrer) {
+ DontSwapProcessWithOnlyRelNoreferrer) {
// Start two servers with different sites.
ASSERT_TRUE(test_server()->Start());
net::TestServer https_server_(
@@ -131,8 +151,11 @@ IN_PROC_BROWSER_TEST_F(RenderViewHostManagerTest,
ASSERT_TRUE(https_server_.Start());
// Load a page with links that open in a new window.
- ui_test_utils::NavigateToURL(browser(), test_server()->GetURL(
- "files/click-noreferrer-links.html"));
+ std::string replacement_path = GetFileWithHostAndPortReplacement(
+ "files/click-noreferrer-links.html",
+ https_server_.host_port_pair());
+ ui_test_utils::NavigateToURL(browser(),
+ test_server()->GetURL(replacement_path));
// Get the original SiteInstance for later comparison.
scoped_refptr<SiteInstance> orig_site_instance(
diff --git a/chrome/browser/renderer_host/test/test_backing_store.cc b/chrome/browser/renderer_host/test/test_backing_store.cc
index d90c7fd..cf7e7fa 100644
--- a/chrome/browser/renderer_host/test/test_backing_store.cc
+++ b/chrome/browser/renderer_host/test/test_backing_store.cc
@@ -16,8 +16,7 @@ void TestBackingStore::PaintToBackingStore(
RenderProcessHost* process,
TransportDIB::Id bitmap,
const gfx::Rect& bitmap_rect,
- const std::vector<gfx::Rect>& copy_rects,
- bool* painted_synchronously) {
+ const std::vector<gfx::Rect>& copy_rects) {
}
bool TestBackingStore::CopyFromBackingStore(const gfx::Rect& rect,
diff --git a/chrome/browser/renderer_host/test/test_backing_store.h b/chrome/browser/renderer_host/test/test_backing_store.h
index f9db76e..d8f257b 100644
--- a/chrome/browser/renderer_host/test/test_backing_store.h
+++ b/chrome/browser/renderer_host/test/test_backing_store.h
@@ -18,8 +18,7 @@ class TestBackingStore : public BackingStore {
virtual void PaintToBackingStore(RenderProcessHost* process,
TransportDIB::Id bitmap,
const gfx::Rect& bitmap_rect,
- const std::vector<gfx::Rect>& copy_rects,
- bool* painted_synchronously);
+ const std::vector<gfx::Rect>& copy_rects);
virtual bool CopyFromBackingStore(const gfx::Rect& rect,
skia::PlatformCanvas* output);
virtual void ScrollBackingStore(int dx, int dy,
diff --git a/chrome/browser/renderer_host/test/test_render_view_host.cc b/chrome/browser/renderer_host/test/test_render_view_host.cc
index ecc2426..f3988e1 100644
--- a/chrome/browser/renderer_host/test/test_render_view_host.cc
+++ b/chrome/browser/renderer_host/test/test_render_view_host.cc
@@ -114,12 +114,6 @@ BackingStore* TestRenderWidgetHostView::AllocBackingStore(
return new TestBackingStore(rwh_, size);
}
-VideoLayer* TestRenderWidgetHostView::AllocVideoLayer(
- const gfx::Size& size) {
- NOTIMPLEMENTED();
- return NULL;
-}
-
#if defined(OS_MACOSX)
void TestRenderWidgetHostView::ShowPopupWithItems(
@@ -167,7 +161,7 @@ void TestRenderWidgetHostView::AcceleratedSurfaceSetIOSurface(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
- uint64 io_surface_identifier) {
+ uint64 surface_id) {
}
void TestRenderWidgetHostView::AcceleratedSurfaceSetTransportDIB(
@@ -178,7 +172,7 @@ void TestRenderWidgetHostView::AcceleratedSurfaceSetTransportDIB(
}
void TestRenderWidgetHostView::AcceleratedSurfaceBuffersSwapped(
- gfx::PluginWindowHandle window) {
+ gfx::PluginWindowHandle window, uint64 surface_id) {
}
void TestRenderWidgetHostView::GpuRenderingStateDidChange() {
diff --git a/chrome/browser/renderer_host/test/test_render_view_host.h b/chrome/browser/renderer_host/test/test_render_view_host.h
index e3c9f39..fe58b68 100644
--- a/chrome/browser/renderer_host/test/test_render_view_host.h
+++ b/chrome/browser/renderer_host/test/test_render_view_host.h
@@ -25,6 +25,7 @@ class NavigationController;
class SiteInstance;
class TestingProfile;
class TestTabContents;
+struct WebMenuItem;
struct ViewHostMsg_FrameNavigate_Params;
// Utility function to initialize ViewHostMsg_NavigateParams_Params
@@ -87,7 +88,6 @@ class TestRenderWidgetHostView : public RenderWidgetHostView {
virtual void PrepareToDestroy() {}
virtual void SetTooltipText(const std::wstring& tooltip_text) {}
virtual BackingStore* AllocBackingStore(const gfx::Size& size);
- virtual VideoLayer* AllocVideoLayer(const gfx::Size& size);
#if defined(OS_MACOSX)
virtual void SetTakesFocusOnlyOnMouseDown(bool flag) {}
virtual void ShowPopupWithItems(gfx::Rect bounds,
@@ -111,13 +111,14 @@ class TestRenderWidgetHostView : public RenderWidgetHostView {
virtual void AcceleratedSurfaceSetIOSurface(gfx::PluginWindowHandle window,
int32 width,
int32 height,
- uint64 io_surface_identifier);
+ uint64 surface_id);
virtual void AcceleratedSurfaceSetTransportDIB(
gfx::PluginWindowHandle window,
int32 width,
int32 height,
TransportDIB::Handle transport_dib);
- virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window);
+ virtual void AcceleratedSurfaceBuffersSwapped(gfx::PluginWindowHandle window,
+ uint64 surface_id);
virtual void GpuRenderingStateDidChange();
#endif
virtual void SetVisuallyDeemphasized(bool deemphasized) { }