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

Issue 11415205: [chromedriver] Implement connecting to devtools and loading a page. (Closed)

Created:
8 years ago by kkania
Modified:
7 years, 9 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, vsevik, darin-cc_chromium.org, yurys, pfeldman, frankf
Visibility:
Public.

Description

[chromedriver] Implement connecting to devtools and loading a page. BUG=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=171035

Patch Set 1 : . #

Patch Set 2 : add unittest for net_util #

Patch Set 3 : . #

Total comments: 18

Patch Set 4 : rebase #

Patch Set 5 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+616 lines, -27 lines) Patch
M chrome/chrome_tests.gypi View 1 2 3 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/chrome.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/chrome_impl.h View 1 chunk +24 lines, -1 line 0 comments Download
M chrome/test/chromedriver/chrome_impl.cc View 2 chunks +80 lines, -2 lines 0 comments Download
A chrome/test/chromedriver/chrome_impl_unittest.cc View 1 2 3 4 1 chunk +63 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/chrome_launcher_impl.h View 2 chunks +5 lines, -1 line 0 comments Download
M chrome/test/chromedriver/chrome_launcher_impl.cc View 1 2 3 4 3 chunks +13 lines, -3 lines 0 comments Download
M chrome/test/chromedriver/chromedriver.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/chromedriver/chromedriver.cc View 1 2 3 4 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/chromedriver.py View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/chromedriver_unittest.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/command_executor.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/command_executor_impl.h View 1 2 3 4 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/test/chromedriver/command_executor_impl.cc View 2 chunks +20 lines, -4 lines 0 comments Download
M chrome/test/chromedriver/commands.h View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/commands.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/commands_unittest.cc View 2 chunks +4 lines, -1 line 0 comments Download
A chrome/test/chromedriver/devtools_client.h View 1 chunk +40 lines, -0 lines 0 comments Download
A chrome/test/chromedriver/devtools_client.cc View 1 chunk +44 lines, -0 lines 0 comments Download
A chrome/test/chromedriver/net/net_util.h View 1 chunk +19 lines, -0 lines 0 comments Download
A chrome/test/chromedriver/net/net_util.cc View 1 2 3 4 1 chunk +50 lines, -0 lines 0 comments Download
A chrome/test/chromedriver/net/net_util_unittest.cc View 1 2 3 4 1 chunk +141 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/status.h View 2 chunks +6 lines, -1 line 0 comments Download
M chrome/test/chromedriver/status.cc View 1 2 3 4 2 chunks +17 lines, -0 lines 0 comments Download
M chrome/test/chromedriver/status_unittest.cc View 1 chunk +26 lines, -10 lines 0 comments Download
M chrome/test/chromedriver/test.py View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
kkania
This isn't the full implementation of navigate of course, since it doesn't obey timeouts or ...
8 years ago (2012-11-29 21:22:04 UTC) #1
kkania
On 2012/11/29 21:22:04, kkania wrote: > This isn't the full implementation of navigate of course, ...
8 years ago (2012-11-30 17:26:43 UTC) #2
klundberg
LGTM but I would really like someone more familiar with C++ to take a look. ...
8 years ago (2012-11-30 20:58:06 UTC) #3
craigdh
On 2012/11/30 20:58:06, klundberg wrote: > LGTM but I would really like someone more familiar ...
8 years ago (2012-11-30 22:02:33 UTC) #4
chrisgao (Use stgao instead)
lgtm https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/chrome_impl.cc File chrome/test/chromedriver/chrome_impl.cc (right): https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/chrome_impl.cc#newcode9 chrome/test/chromedriver/chrome_impl.cc:9: #include "base/logging.h" Remove logging? https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/chrome_impl_unittest.cc File chrome/test/chromedriver/chrome_impl_unittest.cc (right): ...
8 years ago (2012-12-01 08:37:19 UTC) #5
craigdh
lgtm with some questions https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/chrome_impl.cc File chrome/test/chromedriver/chrome_impl.cc (right): https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/chrome_impl.cc#newcode53 chrome/test/chromedriver/chrome_impl.cc:53: base::Time deadline = base::Time::Now() + ...
8 years ago (2012-12-04 01:41:27 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kkania@chromium.org/11415205/14056
8 years ago (2012-12-04 17:09:43 UTC) #7
commit-bot: I haz the power
Change committed as 171035
8 years ago (2012-12-04 20:14:31 UTC) #8
kkania
7 years, 9 months ago (2013-02-28 21:51:58 UTC) #9
Message was sent while issue was closed.
https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
File chrome/test/chromedriver/chrome_impl.cc (right):

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
chrome/test/chromedriver/chrome_impl.cc:9: #include "base/logging.h"
On 2012/12/01 08:37:19, Shuotao Gao wrote:
> Remove logging?

I need this for the CHECK macro.

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
chrome/test/chromedriver/chrome_impl.cc:53: base::Time deadline =
base::Time::Now() + base::TimeDelta::FromSeconds(20);
On 2012/12/04 01:41:27, craigdh wrote:
> It might be nice if the timeout was configurable.

Yes, although I'd like to leave that till later.

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
File chrome/test/chromedriver/chrome_impl_unittest.cc (right):

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
chrome/test/chromedriver/chrome_impl_unittest.cc:31:
ASSERT_EQ("http://debugurl2", *(++urls.begin()));
On 2012/12/01 08:37:19, Shuotao Gao wrote:
> How about using urls.back() instead?

Done.

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
File chrome/test/chromedriver/chrome_launcher_impl.cc (right):

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
chrome/test/chromedriver/chrome_launcher_impl.cc:38:
command.AppendSwitch("disable-extensions");
On 2012/12/04 01:41:27, craigdh wrote:
> In Chrome OS we will certainly need to have extensions enabled as we intend to
> use ChromeDriver to test bundled extensions. Of course, ChromeOS will also
need
> to launch Chrome indirectly though the session manager, but I suspect this
could
> also be a use case for desktop Chrome (the extensions often work on both).

I removed this flag. I accidentally put it in there because I was tired of
external extensions messing things up while I was experimenting locally.

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
File chrome/test/chromedriver/chromedriver.cc (right):

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
chrome/test/chromedriver/chromedriver.cc:12: #include "base/message_loop.h"
On 2012/12/01 08:37:19, Shuotao Gao wrote:
> MessageLoop seems unused. The same for "base/threading/thread.h" below.

Done.

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
File chrome/test/chromedriver/command_executor_impl.h (right):

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
chrome/test/chromedriver/command_executor_impl.h:35: virtual void Init()
OVERRIDE;
On 2012/12/01 08:37:19, Shuotao Gao wrote:
> Also overridden.
> Move to after comment "// Overridden from CommandExecutor:".

Done.

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
File chrome/test/chromedriver/net/net_util.cc (right):

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
chrome/test/chromedriver/net/net_util.cc:35: success_ &=
source->GetResponseAsString(response_);
On 2012/12/04 01:41:27, craigdh wrote:
> Why a bit operator here? This is a logical operation.

Whoops, I don't know what I was thinking.

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
File chrome/test/chromedriver/net/net_util_unittest.cc (right):

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
chrome/test/chromedriver/net/net_util_unittest.cc:62: server_url_ =
GURL(base::StringPrintf("http://127.0.0.1:%d", address.port()));
On 2012/11/30 20:58:06, klundberg wrote:
> Seems longer than 80 characters.

Done.

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
File chrome/test/chromedriver/status.cc (right):

https://codereview.chromium.org/11415205/diff/13037/chrome/test/chromedriver/...
chrome/test/chromedriver/status.cc:9: #include "base/string_split.h"
On 2012/12/01 08:37:19, Shuotao Gao wrote:
> It seems unused.

Done.

Powered by Google App Engine
This is Rietveld 408576698