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

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

Issue 2539363004: Make base::Value::TYPE a scoped enum. (Closed)
Patch Set: Rebase Created 4 years 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
« no previous file with comments | « chrome/test/chromedriver/element_util.cc ('k') | chromeos/dbus/fake_shill_service_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/window_commands.h" 5 #include "chrome/test/chromedriver/window_commands.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <list> 9 #include <list>
10 #include <string> 10 #include <string>
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 342
343 Status ExecuteSwitchToFrame(Session* session, 343 Status ExecuteSwitchToFrame(Session* session,
344 WebView* web_view, 344 WebView* web_view,
345 const base::DictionaryValue& params, 345 const base::DictionaryValue& params,
346 std::unique_ptr<base::Value>* value, 346 std::unique_ptr<base::Value>* value,
347 Timeout* timeout) { 347 Timeout* timeout) {
348 const base::Value* id; 348 const base::Value* id;
349 if (!params.Get("id", &id)) 349 if (!params.Get("id", &id))
350 return Status(kUnknownError, "missing 'id'"); 350 return Status(kUnknownError, "missing 'id'");
351 351
352 if (id->IsType(base::Value::TYPE_NULL)) { 352 if (id->IsType(base::Value::Type::NONE)) {
353 session->SwitchToTopFrame(); 353 session->SwitchToTopFrame();
354 return Status(kOk); 354 return Status(kOk);
355 } 355 }
356 356
357 std::string script; 357 std::string script;
358 base::ListValue args; 358 base::ListValue args;
359 const base::DictionaryValue* id_dict; 359 const base::DictionaryValue* id_dict;
360 if (id->GetAsDictionary(&id_dict)) { 360 if (id->GetAsDictionary(&id_dict)) {
361 script = "function(elem) { return elem; }"; 361 script = "function(elem) { return elem; }";
362 args.Append(id_dict->CreateDeepCopy()); 362 args.Append(id_dict->CreateDeepCopy());
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
1077 return status; 1077 return status;
1078 } 1078 }
1079 1079
1080 Status ExecuteTakeHeapSnapshot(Session* session, 1080 Status ExecuteTakeHeapSnapshot(Session* session,
1081 WebView* web_view, 1081 WebView* web_view,
1082 const base::DictionaryValue& params, 1082 const base::DictionaryValue& params,
1083 std::unique_ptr<base::Value>* value, 1083 std::unique_ptr<base::Value>* value,
1084 Timeout* timeout) { 1084 Timeout* timeout) {
1085 return web_view->TakeHeapSnapshot(value); 1085 return web_view->TakeHeapSnapshot(value);
1086 } 1086 }
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/element_util.cc ('k') | chromeos/dbus/fake_shill_service_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698