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

Unified Diff: chrome/test/chromedriver/chrome/frame_tracker.cc

Issue 13651002: [chromedriver] Fix 3 bugs with frame handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/test/chromedriver/chrome/frame_tracker.cc
diff --git a/chrome/test/chromedriver/chrome/frame_tracker.cc b/chrome/test/chromedriver/chrome/frame_tracker.cc
index 25f81f3a09b34373f8b58bef5ec7df88c1dfa97d..42dcbb9c27983e0b11d9f85d057affcb4b8cc386 100644
--- a/chrome/test/chromedriver/chrome/frame_tracker.cc
+++ b/chrome/test/chromedriver/chrome/frame_tracker.cc
@@ -22,7 +22,7 @@ FrameTracker::~FrameTracker() {}
Status FrameTracker::GetContextIdForFrame(
const std::string& frame_id, int* context_id) {
if (frame_to_context_map_.count(frame_id) == 0)
- return Status(kUnknownError, "frame does not have execution context");
+ return Status(kNoSuchFrame, "frame does not have execution context");
*context_id = frame_to_context_map_[frame_id];
return Status(kOk);
}
@@ -55,7 +55,7 @@ void FrameTracker::OnEvent(const std::string& method,
<< json;
return;
}
- frame_to_context_map_.insert(std::make_pair(frame_id, context_id));
+ frame_to_context_map_[frame_id] = context_id;
} else if (method == "Page.frameNavigated") {
const base::Value* unused_value;
if (!params.Get("frame.parentId", &unused_value))
« no previous file with comments | « chrome/test/chromedriver/chrome/dom_tracker_unittest.cc ('k') | chrome/test/chromedriver/chrome/frame_tracker_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698