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

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

Issue 2684093002: Rename JavaScript "messages" to "dialogs". (Closed)
Patch Set: win fox Created 3 years, 10 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 940 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 951
952 JavaScriptDialogManager* GetJavaScriptDialogManager( 952 JavaScriptDialogManager* GetJavaScriptDialogManager(
953 WebContents* source) override { 953 WebContents* source) override {
954 return this; 954 return this;
955 } 955 }
956 956
957 // JavaScriptDialogManager 957 // JavaScriptDialogManager
958 958
959 void RunJavaScriptDialog(WebContents* web_contents, 959 void RunJavaScriptDialog(WebContents* web_contents,
960 const GURL& origin_url, 960 const GURL& origin_url,
961 JavaScriptMessageType javascript_message_type, 961 JavaScriptDialogType dialog_type,
962 const base::string16& message_text, 962 const base::string16& message_text,
963 const base::string16& default_prompt_text, 963 const base::string16& default_prompt_text,
964 const DialogClosedCallback& callback, 964 const DialogClosedCallback& callback,
965 bool* did_suppress_message) override { 965 bool* did_suppress_message) override {
966 last_message_ = base::UTF16ToUTF8(message_text); 966 last_message_ = base::UTF16ToUTF8(message_text);
967 *did_suppress_message = true; 967 *did_suppress_message = true;
968 968
969 message_loop_runner_->Quit(); 969 message_loop_runner_->Quit();
970 }; 970 };
971 971
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 // Make sure the WebContents cleaned up the previous pending request. A new 1319 // Make sure the WebContents cleaned up the previous pending request. A new
1320 // request should be forwarded to the WebContentsDelegate. 1320 // request should be forwarded to the WebContentsDelegate.
1321 delegate.get()->request_to_lock_mouse_called_ = false; 1321 delegate.get()->request_to_lock_mouse_called_ = false;
1322 ASSERT_TRUE(ExecuteScript(shell(), 1322 ASSERT_TRUE(ExecuteScript(shell(),
1323 "window.domAutomationController.send(document.body." 1323 "window.domAutomationController.send(document.body."
1324 "requestPointerLock());")); 1324 "requestPointerLock());"));
1325 EXPECT_TRUE(delegate.get()->request_to_lock_mouse_called_); 1325 EXPECT_TRUE(delegate.get()->request_to_lock_mouse_called_);
1326 } 1326 }
1327 1327
1328 } // namespace content 1328 } // 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