Commit aeb30719 authored by gmanikpure's avatar gmanikpure Committed by Commit bot

[Chromedriver] Fix testAlertHandlingOnPageUnload.

Include a user interaction in order to trigger beforeunload dialog.

BUG=chromedriver:1803

Review-Url: https://codereview.chromium.org/2878703003
Cr-Commit-Position: refs/heads/master@{#471101}
parent f4097d86
......@@ -73,8 +73,6 @@ _NEGATIVE_FILTER = [
_VERSION_SPECIFIC_FILTER = {}
_VERSION_SPECIFIC_FILTER['HEAD'] = [
# https://bugs.chromium.org/p/chromedriver/issues/detail?id=1803
'ChromeDriverTest.testAlertHandlingOnPageUnload',
]
_VERSION_SPECIFIC_FILTER['58'] = [
# https://bugs.chromium.org/p/chromedriver/issues/detail?id=1673
......@@ -173,8 +171,6 @@ _ANDROID_NEGATIVE_FILTER['chromium'] = (
'ChromeDriverTest.testHoverOverElement',
# https://bugs.chromium.org/p/chromedriver/issues/detail?id=1478
'ChromeDriverTest.testShouldHandleNewWindowLoadingProperly',
# https://bugs.chromium.org/p/chromedriver/issues/detail?id=1803
'ChromeDriverTest.testAlertHandlingOnPageUnload',
]
)
_ANDROID_NEGATIVE_FILTER['chromedriver_webview_shell'] = (
......@@ -681,6 +677,7 @@ class ChromeDriverTest(ChromeDriverBaseTestWithWebServer):
def testAlertHandlingOnPageUnload(self):
self._driver.Load(self.GetHttpUrlForFile('/chromedriver/empty.html'))
self._driver.ExecuteScript('window.onbeforeunload=function(){return true}')
self._driver.FindElement('tag name', 'body').Click()
self._driver.GoBack()
self.assertTrue(self._driver.IsAlertOpen())
self._driver.HandleAlert(True)
......
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