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

Unified Diff: chrome/test/webdriver/frame_path.cc

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/webdriver/frame_path.h ('k') | chrome/test/webdriver/frame_path_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/webdriver/frame_path.cc
diff --git a/chrome/test/webdriver/frame_path.cc b/chrome/test/webdriver/frame_path.cc
deleted file mode 100644
index fd45a8d21c6415c5d443e57fa8f83336e0122ed5..0000000000000000000000000000000000000000
--- a/chrome/test/webdriver/frame_path.cc
+++ /dev/null
@@ -1,75 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/test/webdriver/frame_path.h"
-
-#include "base/strings/string_split.h"
-
-namespace webdriver {
-
-FramePath::FramePath() {}
-
-FramePath::FramePath(const FramePath& other) : path_(other.path_) {}
-
-FramePath::FramePath(const std::string& path) : path_(path) {}
-
-FramePath::~FramePath() {}
-
-FramePath& FramePath::operator=(const FramePath& other) {
- path_ = other.path_;
- return *this;
-}
-
-bool FramePath::operator==(const FramePath& other) const {
- return path_ == other.path_;
-}
-
-FramePath FramePath::Append(const FramePath& path) const {
- return Append(path.path_);
-}
-
-FramePath FramePath::Append(const std::string& path) const {
- // An empty path refers to the root frame, so just return it.
- if (path.empty())
- return *this;
-
- // Don't append a separator if the current path is empty.
- std::string new_path = path_;
- if (path_.length())
- new_path += "\n";
- return FramePath(new_path + path);
-}
-
-FramePath FramePath::Parent() const {
- size_t i = path_.find_last_of("\n");
- if (i != std::string::npos)
- return FramePath(path_.substr(0, i));
- return FramePath();
-}
-
-FramePath FramePath::BaseName() const {
- size_t i = path_.find_last_of("\n");
- if (i != std::string::npos)
- return FramePath(path_.substr(i + 1));
- return *this;
-}
-
-void FramePath::GetComponents(std::vector<std::string>* components) const {
- if (IsSubframe())
- base::SplitString(path_, '\n', components);
-}
-
-bool FramePath::IsRootFrame() const {
- return path_.empty();
-}
-
-bool FramePath::IsSubframe() const {
- return path_.length();
-}
-
-const std::string& FramePath::value() const {
- return path_;
-}
-
-} // namespace webdriver
« no previous file with comments | « chrome/test/webdriver/frame_path.h ('k') | chrome/test/webdriver/frame_path_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698