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

Side by Side Diff: components/test_runner/web_frame_test_proxy.h

Issue 1714573002: Remove the ability of webpages to specify strings for the onbeforeunload dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 9 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 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 #ifndef COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_
6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "components/test_runner/mock_screen_orientation_client.h" 9 #include "components/test_runner/mock_screen_orientation_client.h"
10 #include "components/test_runner/web_test_delegate.h" 10 #include "components/test_runner/web_test_delegate.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 bool runModalPromptDialog(const blink::WebString& message, 161 bool runModalPromptDialog(const blink::WebString& message,
162 const blink::WebString& default_value, 162 const blink::WebString& default_value,
163 blink::WebString*) override { 163 blink::WebString*) override {
164 base_proxy_->GetDelegate()->PrintMessage( 164 base_proxy_->GetDelegate()->PrintMessage(
165 std::string("PROMPT: ") + message.utf8().data() + ", default text: " + 165 std::string("PROMPT: ") + message.utf8().data() + ", default text: " +
166 default_value.utf8().data() + "\n"); 166 default_value.utf8().data() + "\n");
167 return true; 167 return true;
168 } 168 }
169 169
170 bool runModalBeforeUnloadDialog(bool is_reload, 170 bool runModalBeforeUnloadDialog(bool is_reload) override {
171 const blink::WebString& message) override {
172 base_proxy_->GetDelegate()->PrintMessage( 171 base_proxy_->GetDelegate()->PrintMessage(
173 std::string("CONFIRM NAVIGATION: ") + message.utf8().data() + "\n"); 172 std::string("CONFIRM NAVIGATION\n"));
174 return !base_proxy_->GetInterfaces() 173 return !base_proxy_->GetInterfaces()
175 ->TestRunner() 174 ->TestRunner()
176 ->ShouldStayOnPageAfterHandlingBeforeUnload(); 175 ->ShouldStayOnPageAfterHandlingBeforeUnload();
177 } 176 }
178 177
179 void showContextMenu( 178 void showContextMenu(
180 const blink::WebContextMenuData& context_menu_data) override { 179 const blink::WebContextMenuData& context_menu_data) override {
181 base_proxy_->ShowContextMenu(context_menu_data); 180 base_proxy_->ShowContextMenu(context_menu_data);
182 Base::showContextMenu(context_menu_data); 181 Base::showContextMenu(context_menu_data);
183 } 182 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 280
282 private: 281 private:
283 WebTestProxyBase* base_proxy_; 282 WebTestProxyBase* base_proxy_;
284 283
285 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy); 284 DISALLOW_COPY_AND_ASSIGN(WebFrameTestProxy);
286 }; 285 };
287 286
288 } // namespace test_runner 287 } // namespace test_runner
289 288
290 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_ 289 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_PROXY_H_
OLDNEW
« no previous file with comments | « components/app_modal_strings.grdp ('k') | content/browser/frame_host/render_frame_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698