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

Side by Side Diff: chrome/test/chromedriver/alert_commands.cc

Issue 2666093002: Remove base::FundamentalValue (Closed)
Patch Set: Rebase Created 3 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/test/chromedriver/alert_commands.h" 5 #include "chrome/test/chromedriver/alert_commands.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "chrome/test/chromedriver/chrome/chrome.h" 9 #include "chrome/test/chromedriver/chrome/chrome.h"
10 #include "chrome/test/chromedriver/chrome/devtools_client.h" 10 #include "chrome/test/chromedriver/chrome/devtools_client.h"
(...skipping 25 matching lines...) Expand all
36 if (status.IsError() && status.code() != kUnexpectedAlertOpen) 36 if (status.IsError() && status.code() != kUnexpectedAlertOpen)
37 return status; 37 return status;
38 38
39 return alert_command.Run(session, web_view, params, value); 39 return alert_command.Run(session, web_view, params, value);
40 } 40 }
41 41
42 Status ExecuteGetAlert(Session* session, 42 Status ExecuteGetAlert(Session* session,
43 WebView* web_view, 43 WebView* web_view,
44 const base::DictionaryValue& params, 44 const base::DictionaryValue& params,
45 std::unique_ptr<base::Value>* value) { 45 std::unique_ptr<base::Value>* value) {
46 value->reset(new base::FundamentalValue( 46 value->reset(
47 web_view->GetJavaScriptDialogManager()->IsDialogOpen())); 47 new base::Value(web_view->GetJavaScriptDialogManager()->IsDialogOpen()));
48 return Status(kOk); 48 return Status(kOk);
49 } 49 }
50 50
51 Status ExecuteGetAlertText(Session* session, 51 Status ExecuteGetAlertText(Session* session,
52 WebView* web_view, 52 WebView* web_view,
53 const base::DictionaryValue& params, 53 const base::DictionaryValue& params,
54 std::unique_ptr<base::Value>* value) { 54 std::unique_ptr<base::Value>* value) {
55 std::string message; 55 std::string message;
56 Status status = 56 Status status =
57 web_view->GetJavaScriptDialogManager()->GetDialogMessage(&message); 57 web_view->GetJavaScriptDialogManager()->GetDialogMessage(&message);
(...skipping 30 matching lines...) Expand all
88 88
89 Status ExecuteDismissAlert(Session* session, 89 Status ExecuteDismissAlert(Session* session,
90 WebView* web_view, 90 WebView* web_view,
91 const base::DictionaryValue& params, 91 const base::DictionaryValue& params,
92 std::unique_ptr<base::Value>* value) { 92 std::unique_ptr<base::Value>* value) {
93 Status status = web_view->GetJavaScriptDialogManager() 93 Status status = web_view->GetJavaScriptDialogManager()
94 ->HandleDialog(false, session->prompt_text.get()); 94 ->HandleDialog(false, session->prompt_text.get());
95 session->prompt_text.reset(); 95 session->prompt_text.reset();
96 return status; 96 return status;
97 } 97 }
OLDNEW
« no previous file with comments | « chrome/test/base/javascript_browser_test.cc ('k') | chrome/test/chromedriver/chrome/web_view_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698