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

Side by Side Diff: content/shell/renderer/layout_test/layout_test_render_thread_observer.cc

Issue 1878863002: Replicate LayoutTestRuntimeFlags across secondary window renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@replicate-web-content-settings
Patch Set: Rebasing... Created 4 years, 8 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/renderer/layout_test/layout_test_render_thread_observer. h" 5 #include "content/shell/renderer/layout_test/layout_test_render_thread_observer. h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "components/test_runner/test_interfaces.h" 8 #include "components/test_runner/test_interfaces.h"
9 #include "components/test_runner/web_test_interfaces.h" 9 #include "components/test_runner/web_test_interfaces.h"
10 #include "components/test_runner/web_test_runner.h"
10 #include "content/common/input/input_event_utils.h" 11 #include "content/common/input/input_event_utils.h"
11 #include "content/public/common/content_client.h" 12 #include "content/public/common/content_client.h"
12 #include "content/public/renderer/render_thread.h" 13 #include "content/public/renderer/render_thread.h"
13 #include "content/public/test/layouttest_support.h" 14 #include "content/public/test/layouttest_support.h"
15 #include "content/shell/common/layout_test/layout_test_messages.h"
14 #include "content/shell/common/layout_test/layout_test_switches.h" 16 #include "content/shell/common/layout_test/layout_test_switches.h"
15 #include "content/shell/common/shell_messages.h" 17 #include "content/shell/common/shell_messages.h"
16 #include "content/shell/renderer/layout_test/blink_test_runner.h" 18 #include "content/shell/renderer/layout_test/blink_test_runner.h"
17 #include "third_party/WebKit/public/web/WebKit.h" 19 #include "third_party/WebKit/public/web/WebKit.h"
18 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h" 20 #include "third_party/WebKit/public/web/WebRuntimeFeatures.h"
19 #include "v8/include/v8.h" 21 #include "v8/include/v8.h"
20 22
21 using blink::WebFrame; 23 using blink::WebFrame;
22 using blink::WebRuntimeFeatures; 24 using blink::WebRuntimeFeatures;
23 25
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 77
76 void LayoutTestRenderThreadObserver::OnRenderProcessShutdown() { 78 void LayoutTestRenderThreadObserver::OnRenderProcessShutdown() {
77 test_interfaces_.reset(); 79 test_interfaces_.reset();
78 } 80 }
79 81
80 bool LayoutTestRenderThreadObserver::OnControlMessageReceived( 82 bool LayoutTestRenderThreadObserver::OnControlMessageReceived(
81 const IPC::Message& message) { 83 const IPC::Message& message) {
82 bool handled = true; 84 bool handled = true;
83 IPC_BEGIN_MESSAGE_MAP(LayoutTestRenderThreadObserver, message) 85 IPC_BEGIN_MESSAGE_MAP(LayoutTestRenderThreadObserver, message)
84 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir) 86 IPC_MESSAGE_HANDLER(ShellViewMsg_SetWebKitSourceDir, OnSetWebKitSourceDir)
87 IPC_MESSAGE_HANDLER(LayoutTestMsg_ReplicateLayoutTestRuntimeFlagsChanges,
88 OnReplicateLayoutTestRuntimeFlagsChanges)
85 IPC_MESSAGE_UNHANDLED(handled = false) 89 IPC_MESSAGE_UNHANDLED(handled = false)
86 IPC_END_MESSAGE_MAP() 90 IPC_END_MESSAGE_MAP()
87 91
88 return handled; 92 return handled;
89 } 93 }
90 94
91 void LayoutTestRenderThreadObserver::OnSetWebKitSourceDir( 95 void LayoutTestRenderThreadObserver::OnSetWebKitSourceDir(
92 const base::FilePath& webkit_source_dir) { 96 const base::FilePath& webkit_source_dir) {
93 webkit_source_dir_ = webkit_source_dir; 97 webkit_source_dir_ = webkit_source_dir;
94 } 98 }
95 99
100 void LayoutTestRenderThreadObserver::OnReplicateLayoutTestRuntimeFlagsChanges(
101 const base::DictionaryValue& changed_layout_test_runtime_flags) {
102 test_interfaces()->TestRunner()->ReplicateLayoutTestRuntimeFlagsChanges(
103 changed_layout_test_runtime_flags);
104 }
105
96 } // namespace content 106 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698