[chromedriver] Use document.readyState to determine loading state for M44+.
commitcbd56158933271417af119ee8d2c34ffedef634a
authorsamuong <samuong@chromium.org>
Mon, 27 Jul 2015 19:28:10 +0000 (27 12:28 -0700)
committerCommit bot <commit-bot@chromium.org>
Mon, 27 Jul 2015 19:29:01 +0000 (27 19:29 +0000)
tree66811fa13011a06ac1a7e9e609400f177aa0ef67
parentc337ac9749c9cc84872351a909222e151860e66e
[chromedriver] Use document.readyState to determine loading state for M44+.

As of crrev.com/323900 (Chrome 44+) we no longer receive
Page.frameStartedLoading and Page.frameStoppedLoading events immediately after
clicking on an element. This can cause tests to fail if the click command
results in a page navigation, such as in the case of
PageLoadingTest.testShouldTimeoutIfAPageTakesTooLongToLoadAfterClick from the
Selenium test suite.

Unfortunately, this breaks
PageLoadingTest.testShouldNotHangIfDocumentOpenCallIsNeverFollowedByDocumentCloseCall,
which I've also disabled in this CL. A long-term fix will require a new DevTools
command to query the page loading state.

BUG=chromedriver:1158,chromedriver:1167

Review URL: https://codereview.chromium.org/1250333002

Cr-Commit-Position: refs/heads/master@{#340529}
chrome/test/chromedriver/chrome/browser_info.cc
chrome/test/chromedriver/chrome/browser_info.h
chrome/test/chromedriver/chrome/browser_info_unittest.cc
chrome/test/chromedriver/chrome/chrome_android_impl.cc
chrome/test/chromedriver/chrome/navigation_tracker.cc
chrome/test/chromedriver/test/run_py_tests.py
chrome/test/chromedriver/test/test_expectations
chrome/test/data/chromedriver/nested.html
chrome/test/data/chromedriver/outer.html