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

Unified Diff: content/shell/browser/blink_test_controller.h

Issue 1589643003: OOPIF support for testRunner.dumpAsText and similar layout dumps. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/shell/DEPS ('k') | content/shell/browser/blink_test_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/browser/blink_test_controller.h
diff --git a/content/shell/browser/blink_test_controller.h b/content/shell/browser/blink_test_controller.h
index 492f918476a26473866240055027345205b410c8..92f86a11913a7caeb39f601e4c4951737c9a2e8f 100644
--- a/content/shell/browser/blink_test_controller.h
+++ b/content/shell/browser/blink_test_controller.h
@@ -5,6 +5,7 @@
#ifndef CONTENT_SHELL_BROWSER_BLINK_TEST_CONTROLLER_H_
#define CONTENT_SHELL_BROWSER_BLINK_TEST_CONTROLLER_H_
+#include <map>
#include <ostream>
#include <string>
@@ -15,6 +16,7 @@
#include "base/synchronization/lock.h"
#include "base/threading/non_thread_safe.h"
#include "build/build_config.h"
+#include "components/test_runner/layout_dump_flags.h"
#include "content/public/browser/bluetooth_chooser.h"
#include "content/public/browser/gpu_data_manager_observer.h"
#include "content/public/browser/notification_observer.h"
@@ -38,6 +40,7 @@ namespace content {
class LayoutTestBluetoothChooserFactory;
class LayoutTestDevToolsFrontend;
+class RenderFrameHost;
class Shell;
#if defined(OS_ANDROID)
@@ -144,6 +147,8 @@ class BlinkTestController : public base::NonThreadSafe,
// WebContentsObserver implementation.
bool OnMessageReceived(const IPC::Message& message) override;
+ bool OnMessageReceived(const IPC::Message& message,
+ RenderFrameHost* render_frame_host) override;
void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) override;
void RenderViewCreated(RenderViewHost* render_view_host) override;
@@ -174,6 +179,8 @@ class BlinkTestController : public base::NonThreadSafe,
void OnAudioDump(const std::vector<unsigned char>& audio_dump);
void OnImageDump(const std::string& actual_pixel_hash, const SkBitmap& image);
void OnTextDump(const std::string& dump);
+ void OnInitiateLayoutDump(test_runner::LayoutDumpFlags layout_dump_flags);
+ void OnLayoutDumpResponse(RenderFrameHost* sender, const std::string& dump);
void OnPrintMessage(const std::string& message);
void OnOverridePreferences(const WebPreferences& prefs);
void OnTestFinished();
@@ -233,6 +240,11 @@ class BlinkTestController : public base::NonThreadSafe,
scoped_ptr<LayoutTestBluetoothChooserFactory> bluetooth_chooser_factory_;
+ // Map from frame_tree_node_id into frame-specific dumps.
+ std::map<int, std::string> frame_to_layout_dump_map_;
+ // Number of ShellViewHostMsg_LayoutDumpResponse messages we are waiting for.
+ int pending_layout_dumps_;
+
#if defined(OS_ANDROID)
// Because of the nested message pump implementation, Android needs to allow
// waiting on the UI thread while layout tests are being ran.
« no previous file with comments | « content/shell/DEPS ('k') | content/shell/browser/blink_test_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698