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

Side by Side Diff: chrome/test/webdriver/frame_path.h

Issue 23526047: Delete old chromedriver code, and remove mongoose webserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « chrome/test/webdriver/commands/window_commands.cc ('k') | chrome/test/webdriver/frame_path.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_WEBDRIVER_FRAME_PATH_H_
6 #define CHROME_TEST_WEBDRIVER_FRAME_PATH_H_
7
8 #include <string>
9 #include <vector>
10
11 namespace webdriver {
12
13 // A path identifying a frame within an HTML window. Recognized by Chrome
14 // for identifying a frame of the window to execute JavaScript in.
15 class FramePath {
16 public:
17 // Creates a frame path that refers to the root frame.
18 FramePath();
19 FramePath(const FramePath& other);
20 explicit FramePath(const std::string& path);
21 ~FramePath();
22 FramePath& operator=(const FramePath& other);
23
24 bool operator==(const FramePath& other) const;
25
26 // Returns a FramePath appended with the given FramePath.
27 FramePath Append(const FramePath& path) const;
28
29 // Returns a FramePath appended with the given path.
30 FramePath Append(const std::string& path) const;
31
32 // Gets the parent path.
33 FramePath Parent() const;
34
35 // Gets the last path component.
36 FramePath BaseName() const;
37
38 // Gets a vector of all the components of the frame path.
39 void GetComponents(std::vector<std::string>* components) const;
40
41 // Returns whether the path refers to the root frame.
42 bool IsRootFrame() const;
43
44 // Returns whether the path refers to a subframe.
45 bool IsSubframe() const;
46
47 // Returns the identifier's string representation.
48 const std::string& value() const;
49
50 private:
51 // This identifier contains newline-delimited xpath expressions to identify
52 // a subframe multiple level deep.
53 // Example: '//iframe[2]\n/frameset/frame[1]' identifies the first frame in
54 // the root document's second iframe.
55 std::string path_;
56 };
57
58 } // namespace webdriver
59
60 #endif // CHROME_TEST_WEBDRIVER_FRAME_PATH_H_
OLDNEW
« no previous file with comments | « chrome/test/webdriver/commands/window_commands.cc ('k') | chrome/test/webdriver/frame_path.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698