OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 """Test expectation list for WebDriver Java acceptance tests. |
| 6 |
| 7 It is evaluated through Python. |
| 8 """ |
| 9 |
| 10 import fnmatch |
| 11 |
| 12 |
| 13 _REVISION_NEGATIVE_FILTER = {} |
| 14 _REVISION_NEGATIVE_FILTER['HEAD'] = [ |
| 15 'AlertsTest.testIncludesAlertTextInUnhandledAlertException', |
| 16 'AlertsTest.testSettingTheValueOfAnAlertThrows', |
| 17 'AlertsTest.testShouldGetTextOfAlertOpenedInSetTimeout', |
| 18 'AlertsTest.testShouldHandleAlertOnPageUnload', |
| 19 'AlertsTest.testShouldHandleAlertOnWindowClose', |
| 20 'AlertsTest.testShouldNotHandleAlertInAnotherWindow', |
| 21 'AlertsTest.testSwitchingToMissingAlertInAClosedWindowThrows', |
| 22 'AuthenticatedPageLoadingTest.*', |
| 23 'AvailableLogsTest.driverLogShouldBeEnabledByDefault', |
| 24 'BasicMouseInterfaceTest.testMousePositionIsNotPreservedInActionsChain', |
| 25 'BasicMouseInterfaceTest.testMovingIntoAnImageEnclosedInALink', |
| 26 'BasicMouseInterfaceTest.testMovingMouseBackAndForthPastViewPort', |
| 27 'BasicMouseInterfaceTest.testMovingMousePastViewPort', |
| 28 'ChromeOptionsFunctionalTest.canStartChromeWithCustomOptions', |
| 29 'ClickScrollingTest.testShouldBeAbleToClickOnAnElementHiddenByDoubleOverflow
', |
| 30 'ClickScrollingTest.testShouldNotBeAbleToClickElementThatIsOutOfViewInANonSc
rollableFrame', |
| 31 'ClickScrollingTest.testShouldNotScrollIfAlreadyScrolledAndElementIsInView', |
| 32 'ClickTest.testCanClickAnImageMapArea', |
| 33 'ClickTest.testShouldBeAbleToClickOnAnElementInFrameGreaterThanTwoViewports'
, |
| 34 'CombinedInputActionsTest.testClickingOnFormElements', |
| 35 'CoordinatesTest.testShouldScrollPageAndGetCoordinatesOfAnElementThatIsOutOf
ViewPort', |
| 36 'CorrectEventFiringTest.testShouldFireEventsInTheRightOrder', |
| 37 'CorrectEventFiringTest.testShouldFireFocusEventWhenClicking', |
| 38 'DragAndDropTest.testDragTooFar', |
| 39 # Flaky: https://code.google.com/p/chromedriver/issues/detail?id=374 |
| 40 'ElementFindingTest.testShouldNotBeAbleToFindAnElementOnABlankPage', |
| 41 'ExecutingAsyncJavascriptTest.includesAlertTextInUnhandledAlertException', |
| 42 'ExecutingAsyncJavascriptTest.shouldCatchErrorsWithMessageAndStacktraceWhenE
xecutingInitialScript', |
| 43 'ExecutingAsyncJavascriptTest.throwsIfAlertHappensDuringScript', |
| 44 'ExecutingAsyncJavascriptTest.throwsIfAlertHappensDuringScriptWhichTimesOut'
, |
| 45 'ExecutingAsyncJavascriptTest.throwsIfScriptTriggersAlert', |
| 46 'ExecutingAsyncJavascriptTest.throwsIfScriptTriggersAlertWhichTimesOut', |
| 47 'ExecutingJavascriptTest.testShouldThrowExceptionIfExecutingOnNoPage', |
| 48 'ExecutingJavascriptTest.testShouldThrowAnExceptionWithMessageAndStacktraceW
henTheJavascriptIsBad', |
| 49 'FormHandlingTest.testShouldNotBeAbleToSubmitAFormThatDoesNotExist', |
| 50 'FrameSwitchingTest.testShouldNotBeAbleToDoAnythingTheFrameIsDeletedFromUnde
rUs', |
| 51 # Disabled until https://code.google.com/p/chromedriver/issues/detail?id=345
is fixed. |
| 52 'I18nTest.*', |
| 53 'I18nTest.testShouldBeAbleToActivateIMEEngine', |
| 54 # Broken because AddWebStorage.java is broken. |
| 55 'LocalStorageTest.*', |
| 56 'LocationContextTest.*', |
| 57 'MiscTest.testShouldBeAbleToGetTheSourceOfAnXmlDocument', |
| 58 'PageLoadingTest.shouldBeAbleToDisableAcceptOfInsecureSslCertsWithRequiredCa
pability', |
| 59 'PageLoadingTest.testShouldNotWaitIndefinitelyIfAnExternalResourceFailsToLoa
d', |
| 60 # PerformanceLoggingTest is for firefox only; "performance" log deprecated. |
| 61 'PerformanceLoggingTest.*', |
| 62 'ProxySettingTest.canConfigureProxyWithRequiredCapability', |
| 63 'ProxySettingTest.requiredProxyCapabilityShouldHavePriority', |
| 64 'RenderedWebElementTest.testShouldHandleNonIntegerPositionAndSize', |
| 65 # Broken because AddWebStorage.java is broken. |
| 66 'SessionStorageTest.*', |
| 67 'SqlDatabaseTest.*', |
| 68 'SvgDocumentTest.testClickOnSvgElement', |
| 69 'TakesScreenshotTest.testShouldCaptureScreenshot', |
| 70 'TakesScreenshotTest.testShouldCaptureScreenshotAtIFramePage', |
| 71 'TakesScreenshotTest.testShouldCaptureScreenshotWithLongX', |
| 72 'TakesScreenshotTest.testShouldCaptureScreenshotWithLongY', |
| 73 'TakesScreenshotTest.testShouldCaptureScreenshotWithTooLong', |
| 74 'TakesScreenshotTest.testShouldCaptureScreenshotWithTooLongX', |
| 75 'TakesScreenshotTest.testShouldCaptureScreenshotWithTooLongY', |
| 76 'TextHandlingTest.testShouldNotReturnLtrMarks', |
| 77 'TextPagesTest.testShouldBeAbleToLoadASimplePageOfText', |
| 78 'TextPagesTest.testShouldThrowExceptionWhenAddingCookieToAPageThatIsNotHtml'
, |
| 79 'TypingTest.testGenerateKeyPressEventEvenWhenElementPreventsDefault', |
| 80 'TypingTest.testNonPrintableCharactersShouldWorkWithContentEditableOrDesignM
odeSet', |
| 81 'TypingTest.testShouldBeAbleToTypeIntoContentEditableElementWithExistingValu
e', |
| 82 'TypingTest.testShouldNotTypeIntoElementsThatPreventKeyDownEvents', |
| 83 'TypingTest.testTypingIntoAnIFrameWithContentEditableOrDesignModeSet', |
| 84 'UnexpectedAlertBehaviorTest.*', |
| 85 'VisibilityTest.testElementHiddenByOverflowXIsNotVisible', |
| 86 'VisibilityTest.testElementHiddenByOverflowYIsNotVisible', |
| 87 'VisibilityTest.tooSmallAWindowWithOverflowHiddenIsNotAProblem', |
| 88 'WindowTest.*', |
| 89 # https://code.google.com/p/chromedriver/issues/detail?id=412 |
| 90 'ClickTest.testCanClickOnAnElementWithTopSetToANegativeNumber', |
| 91 'ClickTest.testShouldBeAbleToClickOnAnElementInTheViewport', |
| 92 'ExecutingAsyncJavascriptTest.shouldBeAbleToExecuteAsynchronousScripts', |
| 93 'FormHandlingTest.testShouldClickOnSubmitInputElements', |
| 94 'FrameSwitchingTest.testShouldBeAbleToClickInAFrame', |
| 95 'FrameSwitchingTest.testShouldBeAbleToSwitchToTheTopIfTheFrameIsDeletedFromU
nderUs', |
| 96 'FrameSwitchingTest.testShouldAllowTheUserToSwitchToAnIFrameAndRemainFocused
OnIt', |
| 97 'FrameSwitchingTest.testShouldBeAbleToClickInASubFrame', |
| 98 'FrameSwitchingTest.testShouldNotSwitchMagicallyToTheTopWindow', |
| 99 'ImplicitWaitTest.testShouldImplicitlyWaitUntilAtLeastOneElementIsFoundWhenS
earchingForMany', |
| 100 'ImplicitWaitTest.testShouldImplicitlyWaitForAnElementToBeVisibleBeforeInter
acting', |
| 101 'ImplicitWaitTest.testShouldReturnAfterFirstAttemptToFindManyAfterDisablingI
mplicitWaits', |
| 102 'ImplicitWaitTest.testShouldImplicitlyWaitForASingleElement', |
| 103 'XPathElementFindingTest.testShouldBeAbleToSearchForMultipleAttributes', |
| 104 ] |
| 105 |
| 106 |
| 107 _OS_NEGATIVE_FILTER = {} |
| 108 _OS_NEGATIVE_FILTER['win'] = [ |
| 109 # Flaky: https://code.google.com/p/chromedriver/issues/detail?id=282 |
| 110 'PageLoadingTest.testShouldNotHangIfDocumentOpenCallIsNeverFollowedByDocumen
tCloseCall', |
| 111 # Flaky: https://code.google.com/p/chromedriver/issues/detail?id=373 |
| 112 'RenderedWebElementTest.testHoverPersists', |
| 113 'RenderedWebElementTest.canClickOnASuckerFishStyleMenu', |
| 114 # Flaky: https://code.google.com/p/chromedriver/issues/detail?id=416 |
| 115 'TakesScreenshotTest.testShouldCaptureScreenshotAtIFramePageAfterSwitching', |
| 116 'TakesScreenshotTest.testShouldCaptureScreenshotAtFramePage', |
| 117 ] |
| 118 _OS_NEGATIVE_FILTER['linux'] = [] |
| 119 _OS_NEGATIVE_FILTER['mac'] = [ |
| 120 # https://code.google.com/p/chromedriver/issues/detail?id=26 |
| 121 'AlertsTest.testAlertShouldNotAllowAdditionalCommandsIfDismissed', |
| 122 'AlertsTest.testShouldAllowUsersToDismissAnAlertManually', |
| 123 'FormHandlingTest.handleFormWithJavascriptAction', |
| 124 # Flaky: https://code.google.com/p/chromedriver/issues/detail?id=354 |
| 125 'AlertsTest.testShouldAllowUsersToAcceptAnAlertInAFrame', |
| 126 # Flaky: https://code.google.com/p/chromedriver/issues/detail?id=375 |
| 127 'PageLoadingTest.testShouldBeAbleToNavigateBackInTheBrowserHistoryInPresence
OfIframes', |
| 128 ] |
| 129 _OS_NEGATIVE_FILTER['android'] = [ |
| 130 'ChromeOptionsFunctionalTest.canStartChromeWithCustomOptions', |
| 131 'ClickScrollingTest.testShouldBeAbleToClickElementThatIsOutOfViewInANestedFr
ame', |
| 132 'ClickScrollingTest.testShouldBeAbleToClickElementThatIsOutOfViewInANestedFr
ameThatIsOutOfView', |
| 133 'ClickTest.testShouldOnlyFollowHrefOnce', |
| 134 'CombinedInputActionsTest.testCombiningShiftAndClickResultsInANewWindow', |
| 135 'ElementSelectingTest.testShouldBeAbleToToggleEnabledMultiSelectOption', |
| 136 'FrameSwitchingTest.testShouldBeAbleToClickInAFrameThatRewritesTopWindowLoca
tion', |
| 137 'JavascriptEnabledDriverTest.testShouldBeAbleToClickALinkThatClosesAWindow', |
| 138 'PageLoadingTest.testShouldBeAbleToAccessPagesWithAnInsecureSslCertificate', |
| 139 'PageLoadingTest.testShouldBeAbleToAccessPagesWithAnInsecureSslCertificate', |
| 140 'PageLoadingTest.testShouldBeAbleToNavigateBackInTheBrowserHistoryInPresence
OfIframes', |
| 141 'PageLoadingTest.testShouldFollowMetaRedirects', |
| 142 'PageLoadingTest.testShouldWaitForDocumentToBeLoaded', |
| 143 'PerformanceLogTypeTest.pageLoadShouldProducePerformanceLogEntries', |
| 144 'PerformanceLogTypeTest.shouldBeAbleToEnablePerformanceLog', |
| 145 'SelectElementHandlingTest.testShouldBePossibleToDeselectASingleOptionFromAS
electWhichAllowsMultipleChoices', |
| 146 'SelectElementTest.shouldAllowOptionsToBeDeselectedByIndex', |
| 147 'SelectElementTest.shouldAllowOptionsToBeDeselectedByReturnedValue', |
| 148 'SelectElementTest.shouldAllowUserToDeselectAllWhenSelectSupportsMultipleSel
ections', |
| 149 'SelectElementTest.shouldAllowUserToDeselectOptionsByVisibleText', |
| 150 'SessionHandlingTest.callingAnyOperationAfterClosingTheLastWindowShouldThrow
AnException', |
| 151 'SessionHandlingTest.callingQuitAfterClosingTheLastWindowIsANoOp', |
| 152 'TakesScreenshotTest.testCaptureToBase64', |
| 153 'TakesScreenshotTest.testSaveScreenshotAsFile', |
| 154 'TakesScreenshotTest.testShouldCaptureScreenshotAtFramePage', |
| 155 'TakesScreenshotTest.testShouldCaptureScreenshotAtFramePageAfterSwitching', |
| 156 'TakesScreenshotTest.testShouldCaptureScreenshotAtIFramePageAfterSwitching', |
| 157 |
| 158 # Alerts are not yet supported on Android. |
| 159 'AlertsTest.*', |
| 160 |
| 161 # http://crbug.com/156390 |
| 162 'DragAndDropTest.*', |
| 163 |
| 164 # Touch events are not yet supported. |
| 165 'TouchFlickTest.*', |
| 166 'TouchScrollTest.*', |
| 167 'TouchSingleTapTest.*', |
| 168 |
| 169 # These tests start multiple sessions, which is not supported on a single |
| 170 # Android device. |
| 171 "AvailableLogsTest.shouldBeAbleToEnableProfilerLog", |
| 172 "GetLogsTest.turningOffLogShouldMeanNoLogMessages", |
| 173 "SessionHandlingTest.callingAnyOperationAfterQuitShouldThrowAnException", |
| 174 "SessionHandlingTest.callingQuitMoreThanOnceOnASessionIsANoOp", |
| 175 # Test is written using local files; doesn't work on Android. |
| 176 'UploadTest.testFileUploading', |
| 177 # Not applicable on Chromium Test Shell (doesn't support tabs). |
| 178 'WindowSwitchingTest.*', |
| 179 |
| 180 # Flaky: https://code.google.com/p/chromedriver/issues/detail?id=441 |
| 181 'PageLoadingTest.testShouldBeAbleToNavigateBackInTheBrowserHistory', |
| 182 ] |
| 183 |
| 184 |
| 185 def _GetRevisionNegativeFilter(chrome_version): |
| 186 if chrome_version in _REVISION_NEGATIVE_FILTER: |
| 187 return _REVISION_NEGATIVE_FILTER[chrome_version] |
| 188 return _REVISION_NEGATIVE_FILTER['HEAD'] |
| 189 |
| 190 |
| 191 def GetDisabledTestMatchers(operating_system, chrome_version): |
| 192 """Returns the list of disabled test matchers for the specific configuration. |
| 193 |
| 194 Args: |
| 195 operating_system: The operating system, one of 'linux', 'mac', 'win', or |
| 196 'android'. |
| 197 chrome_version: Chrome version to test against, e.g., 'HEAD' or '26'. |
| 198 |
| 199 Returns: |
| 200 List of disabled test matchers, which may contain '*' wildcards. |
| 201 """ |
| 202 return (_OS_NEGATIVE_FILTER[operating_system] + |
| 203 _GetRevisionNegativeFilter(chrome_version))[:] |
| 204 |
| 205 |
| 206 def ApplyJavaTestFilter(operating_system, chrome_version, tests): |
| 207 """Applies the test filter to the given list of tests. |
| 208 |
| 209 Args: |
| 210 operating_system: The operating system, one of 'linux', 'mac', 'win', or |
| 211 'android'. |
| 212 chrome_version: Chrome version to test against, e.g., 'HEAD' or '26'. |
| 213 test: list of test names to filter. |
| 214 |
| 215 Returns: |
| 216 Set of passed test names. |
| 217 """ |
| 218 filters = (_OS_NEGATIVE_FILTER[operating_system] + |
| 219 _GetRevisionNegativeFilter(chrome_version)) |
| 220 passed = set(tests) |
| 221 for f in filters: |
| 222 passed.difference_update(set(t for t in tests if fnmatch.fnmatch(t, f))) |
| 223 return passed |
OLD | NEW |