Commit 37ed8db5 authored by Tatiana Buldina's avatar Tatiana Buldina Committed by Commit Bot

[ChromeDriver] Cleanup code related to not supported version

Change-Id: I397df2d47550081fb58bde7bd361d929c1006694
Reviewed-on: https://chromium-review.googlesource.com/1173486Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Commit-Queue: Tatiana Buldina <buldina@chromium.org>
Cr-Commit-Position: refs/heads/master@{#582760}
parent d75b541a
......@@ -16,7 +16,7 @@
FrameTracker::FrameTracker(DevToolsClient* client,
WebView* web_view,
const BrowserInfo* browser_info)
: web_view_(web_view), browser_info_(browser_info) {
: web_view_(web_view) {
client->AddListener(this);
}
......@@ -60,24 +60,15 @@ Status FrameTracker::OnConnected(DevToolsClient* client) {
frame_to_context_map_.clear();
frame_to_target_map_.clear();
// Enable target events to allow tracking iframe targets creation.
if (browser_info_->major_version == 65) {
base::DictionaryValue params;
params.SetBoolean("value", true);
Status status = client->SendCommand("Target.setAttachToFrames", params);
if (status.IsError())
return status;
}
if (browser_info_->major_version >= 65) {
base::DictionaryValue params;
params.SetBoolean("autoAttach", true);
params.SetBoolean("waitForDebuggerOnStart", false);
Status status = client->SendCommand("Target.setAutoAttach", params);
if (status.IsError())
return status;
}
// Enable runtime events to allow tracking execution context creation.
base::DictionaryValue params;
Status status = client->SendCommand("Runtime.enable", params);
params.SetBoolean("autoAttach", true);
params.SetBoolean("waitForDebuggerOnStart", false);
Status status = client->SendCommand("Target.setAutoAttach", params);
if (status.IsError())
return status;
// Enable runtime events to allow tracking execution context creation.
params.Clear();
status = client->SendCommand("Runtime.enable", params);
if (status.IsError())
return status;
return client->SendCommand("Page.enable", params);
......
......@@ -43,7 +43,6 @@ class FrameTracker : public DevToolsEventListener {
std::map<std::string, int> frame_to_context_map_;
std::map<std::string, std::unique_ptr<WebView>> frame_to_target_map_;
WebView* web_view_;
const BrowserInfo* browser_info_;
DISALLOW_COPY_AND_ASSIGN(FrameTracker);
};
......
......@@ -2014,7 +2014,6 @@ class ChromeDownloadDirTest(ChromeDriverBaseTest):
ChromeDriverTest._http_server.SetCallbackForPath(
'/abc.csv', self.RespondWithCsvFile)
download_dir = self.CreateTempDir()
download_name = os.path.join(download_dir, 'abc.csv')
driver = self.CreateDriver(download_dir=download_dir)
original_url = driver.GetCurrentUrl()
driver.Load(ChromeDriverTest.GetHttpUrlForFile('/abc.csv'))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment