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

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

Issue 65813002: mac: Prepare most test code for -Wunused-functions too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/base/ui_test_utils.cc ('k') | chrome/test/perf/generate_profile.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/element_util.h" 5 #include "chrome/test/chromedriver/element_util.h"
6 6
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "base/threading/platform_thread.h" 10 #include "base/threading/platform_thread.h"
(...skipping 29 matching lines...) Expand all
40 return false; 40 return false;
41 double width, height; 41 double width, height;
42 if (!dict_value->GetDouble("width", &width) || 42 if (!dict_value->GetDouble("width", &width) ||
43 !dict_value->GetDouble("height", &height)) 43 !dict_value->GetDouble("height", &height))
44 return false; 44 return false;
45 size->width = static_cast<int>(width); 45 size->width = static_cast<int>(width);
46 size->height = static_cast<int>(height); 46 size->height = static_cast<int>(height);
47 return true; 47 return true;
48 } 48 }
49 49
50 base::Value* CreateValueFrom(const WebSize& size) {
51 base::DictionaryValue* dict = new base::DictionaryValue();
52 dict->SetInteger("width", size.width);
53 dict->SetInteger("height", size.height);
54 return dict;
55 }
56
57 bool ParseFromValue(base::Value* value, WebRect* rect) { 50 bool ParseFromValue(base::Value* value, WebRect* rect) {
58 base::DictionaryValue* dict_value; 51 base::DictionaryValue* dict_value;
59 if (!value->GetAsDictionary(&dict_value)) 52 if (!value->GetAsDictionary(&dict_value))
60 return false; 53 return false;
61 double x, y, width, height; 54 double x, y, width, height;
62 if (!dict_value->GetDouble("left", &x) || 55 if (!dict_value->GetDouble("left", &x) ||
63 !dict_value->GetDouble("top", &y) || 56 !dict_value->GetDouble("top", &y) ||
64 !dict_value->GetDouble("width", &width) || 57 !dict_value->GetDouble("width", &width) ||
65 !dict_value->GetDouble("height", &height)) 58 !dict_value->GetDouble("height", &height))
66 return false; 59 return false;
(...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 status = ScrollElementRegionIntoViewHelper( 632 status = ScrollElementRegionIntoViewHelper(
640 rit->parent_frame_id, web_view, frame_element_id, 633 rit->parent_frame_id, web_view, frame_element_id,
641 WebRect(region_offset, region_size), 634 WebRect(region_offset, region_size),
642 center, frame_element_id, &region_offset); 635 center, frame_element_id, &region_offset);
643 if (status.IsError()) 636 if (status.IsError())
644 return status; 637 return status;
645 } 638 }
646 *location = region_offset; 639 *location = region_offset;
647 return Status(kOk); 640 return Status(kOk);
648 } 641 }
OLDNEW
« no previous file with comments | « chrome/test/base/ui_test_utils.cc ('k') | chrome/test/perf/generate_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698