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

Side by Side Diff: content/browser/web_contents/web_contents_impl_browsertest.cc

Issue 2639893002: Clean up unneeded JavaScript dialog parameter. (Closed)
Patch Set: rebase Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/run_loop.h" 6 #include "base/run_loop.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "content/browser/frame_host/navigation_entry_impl.h" 10 #include "content/browser/frame_host/navigation_entry_impl.h"
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 bool is_reload, 975 bool is_reload,
976 const DialogClosedCallback& callback) override {} 976 const DialogClosedCallback& callback) override {}
977 977
978 bool HandleJavaScriptDialog(WebContents* web_contents, 978 bool HandleJavaScriptDialog(WebContents* web_contents,
979 bool accept, 979 bool accept,
980 const base::string16* prompt_override) override { 980 const base::string16* prompt_override) override {
981 return true; 981 return true;
982 } 982 }
983 983
984 void CancelDialogs(WebContents* web_contents, 984 void CancelDialogs(WebContents* web_contents,
985 bool suppress_callbacks,
986 bool reset_state) override {} 985 bool reset_state) override {}
987 986
988 private: 987 private:
989 std::string last_message_; 988 std::string last_message_;
990 989
991 // The MessageLoopRunner used to spin the message loop. 990 // The MessageLoopRunner used to spin the message loop.
992 scoped_refptr<MessageLoopRunner> message_loop_runner_; 991 scoped_refptr<MessageLoopRunner> message_loop_runner_;
993 992
994 DISALLOW_COPY_AND_ASSIGN(TestJavaScriptDialogManager); 993 DISALLOW_COPY_AND_ASSIGN(TestJavaScriptDialogManager);
995 }; 994 };
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1322 // Make sure the WebContents cleaned up the previous pending request. A new 1321 // Make sure the WebContents cleaned up the previous pending request. A new
1323 // request should be forwarded to the WebContentsDelegate. 1322 // request should be forwarded to the WebContentsDelegate.
1324 delegate.get()->request_to_lock_mouse_called_ = false; 1323 delegate.get()->request_to_lock_mouse_called_ = false;
1325 ASSERT_TRUE(ExecuteScript(shell(), 1324 ASSERT_TRUE(ExecuteScript(shell(),
1326 "window.domAutomationController.send(document.body." 1325 "window.domAutomationController.send(document.body."
1327 "requestPointerLock());")); 1326 "requestPointerLock());"));
1328 EXPECT_TRUE(delegate.get()->request_to_lock_mouse_called_); 1327 EXPECT_TRUE(delegate.get()->request_to_lock_mouse_called_);
1329 } 1328 }
1330 1329
1331 } // namespace content 1330 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/web_contents/web_contents_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698