| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Test expectation list for WebDriver Java acceptance tests. | 5 """Test expectation list for WebDriver Java acceptance tests. |
| 6 | 6 |
| 7 It is evaluated through Python. | 7 It is evaluated through Python. |
| 8 """ | 8 """ |
| 9 | 9 |
| 10 import fnmatch |
| 11 |
| 12 |
| 10 _REVISION_NEGATIVE_FILTER = {} | 13 _REVISION_NEGATIVE_FILTER = {} |
| 11 _REVISION_NEGATIVE_FILTER['HEAD'] = [ | 14 _REVISION_NEGATIVE_FILTER['HEAD'] = [ |
| 12 'AlertsTest.*', | 15 'AlertsTest.*', |
| 13 'PerformanceLoggingTest.*', | 16 'PerformanceLoggingTest.*', |
| 14 'ChromeOptionsFunctionalTest.canStartChromeWithCustomOptions', | 17 'ChromeOptionsFunctionalTest.canStartChromeWithCustomOptions', |
| 15 'AuthenticatedPageLoadingTest.*', | 18 'AuthenticatedPageLoadingTest.*', |
| 16 'AvailableLogsTest.browserLogShouldBeEnabledByDefault', | 19 'AvailableLogsTest.browserLogShouldBeEnabledByDefault', |
| 17 'AvailableLogsTest.clientLogShouldBeEnabledByDefault', | 20 'AvailableLogsTest.clientLogShouldBeEnabledByDefault', |
| 18 'AvailableLogsTest.driverLogShouldBeEnabledByDefault', | 21 'AvailableLogsTest.driverLogShouldBeEnabledByDefault', |
| 19 'AvailableLogsTest.profilerLogShouldBeDisabledByDefault', | 22 'AvailableLogsTest.profilerLogShouldBeDisabledByDefault', |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 'CorrectEventFiringTest.testSendingKeysToAFocusedElementShouldNotBlurThatEle
ment', | 127 'CorrectEventFiringTest.testSendingKeysToAFocusedElementShouldNotBlurThatEle
ment', |
| 125 'CorrectEventFiringTest.testSendingKeysToAnElementShouldCauseTheFocusEventTo
Fire', | 128 'CorrectEventFiringTest.testSendingKeysToAnElementShouldCauseTheFocusEventTo
Fire', |
| 126 'CorrectEventFiringTest.testSendingKeysToAnotherElementShouldCauseTheBlurEve
ntToFire', | 129 'CorrectEventFiringTest.testSendingKeysToAnotherElementShouldCauseTheBlurEve
ntToFire', |
| 127 'CorrectEventFiringTest.testShouldEmitClickEventWhenClickingOnATextInputElem
ent', | 130 'CorrectEventFiringTest.testShouldEmitClickEventWhenClickingOnATextInputElem
ent', |
| 128 'ElementAttributeTest.testCanRetrieveTheCurrentValueOfATextFormField_emailIn
put', | 131 'ElementAttributeTest.testCanRetrieveTheCurrentValueOfATextFormField_emailIn
put', |
| 129 'ElementAttributeTest.testCanRetrieveTheCurrentValueOfATextFormField_textAre
a', | 132 'ElementAttributeTest.testCanRetrieveTheCurrentValueOfATextFormField_textAre
a', |
| 130 'ElementAttributeTest.testCanRetrieveTheCurrentValueOfATextFormField_textInp
ut', | 133 'ElementAttributeTest.testCanRetrieveTheCurrentValueOfATextFormField_textInp
ut', |
| 131 'ElementSelectingTest.testShouldBeAbleToToggleEnabledMultiSelectOption', | 134 'ElementSelectingTest.testShouldBeAbleToToggleEnabledMultiSelectOption', |
| 132 'ExecutingAsyncJavascriptTest.shouldBeAbleToExecuteAsynchronousScripts', | 135 'ExecutingAsyncJavascriptTest.shouldBeAbleToExecuteAsynchronousScripts', |
| 133 'ExecutingAsyncJavascriptTest.shouldNotTimeoutIfScriptCallsbackInsideAZeroTi
meout', | 136 'ExecutingAsyncJavascriptTest.shouldNotTimeoutIfScriptCallsbackInsideAZeroTi
meout', |
| 137 'FormHandlingTest.testSendingKeyboardEventsShouldAppendTextInInputs', |
| 138 'FormHandlingTest.testSendingKeyboardEventsShouldAppendTextInInputsWithExist
ingValue', |
| 139 'FormHandlingTest.testSendingKeyboardEventsShouldAppendTextinTextAreas', |
| 140 'FormHandlingTest.testSendKeysKeepsCapitalization', |
| 141 'FormHandlingTest.testShouldBeAbleToClearTextFromInputElements', |
| 142 'FormHandlingTest.testShouldBeAbleToClearTextFromTextAreas', |
| 143 'FormHandlingTest.testShouldBeAbleToEnterTextIntoATextAreaBySettingItsValue'
, |
| 144 'FormHandlingTest.testShouldEnterDataIntoFormFields', |
| 134 'FrameSwitchingTest.testClosingTheFinalBrowserWindowShouldNotCauseAnExceptio
nToBeThrown', | 145 'FrameSwitchingTest.testClosingTheFinalBrowserWindowShouldNotCauseAnExceptio
nToBeThrown', |
| 135 'FrameSwitchingTest.testGetCurrentUrl', | 146 'FrameSwitchingTest.testGetCurrentUrl', |
| 147 'FrameSwitchingTest.testShouldNotSwitchMagicallyToTheTopWindow', |
| 136 'I18nTest.testEnteringHebrewTextFromLeftToRight', | 148 'I18nTest.testEnteringHebrewTextFromLeftToRight', |
| 137 'I18nTest.testEnteringHebrewTextFromRightToLeft', | 149 'I18nTest.testEnteringHebrewTextFromRightToLeft', |
| 150 'I18nTest.testShouldBeAbleToInputJapanese', |
| 151 'ImplicitWaitTest.testShouldImplicitlyWaitForAnElementToBeVisibleBeforeInter
acting', |
| 152 'JavascriptEnabledDriverTest.testChangeEventIsFiredAppropriatelyWhenFocusIsL
ost', |
| 138 'JavascriptEnabledDriverTest.testIssue80ClickShouldGenerateClickEvent', | 153 'JavascriptEnabledDriverTest.testIssue80ClickShouldGenerateClickEvent', |
| 139 'JavascriptEnabledDriverTest.testShouldBeAbleToClickALinkThatClosesAWindow', | 154 'JavascriptEnabledDriverTest.testShouldBeAbleToClickALinkThatClosesAWindow', |
| 140 'JavascriptEnabledDriverTest.testShouldFireOnChangeEventWhenSettingAnElement
sValue', | 155 'JavascriptEnabledDriverTest.testShouldFireOnChangeEventWhenSettingAnElement
sValue', |
| 141 'SelectElementHandlingTest.testShouldBePossibleToDeselectASingleOptionFromAS
electWhichAllowsMultipleChoices', | 156 'SelectElementHandlingTest.testShouldBePossibleToDeselectASingleOptionFromAS
electWhichAllowsMultipleChoices', |
| 142 'SelectElementTest.shouldAllowOptionsToBeDeselectedByIndex', | 157 'SelectElementTest.shouldAllowOptionsToBeDeselectedByIndex', |
| 143 'SelectElementTest.shouldAllowOptionsToBeDeselectedByReturnedValue', | 158 'SelectElementTest.shouldAllowOptionsToBeDeselectedByReturnedValue', |
| 144 'SelectElementTest.shouldAllowUserToDeselectAllWhenSelectSupportsMultipleSel
ections', | 159 'SelectElementTest.shouldAllowUserToDeselectAllWhenSelectSupportsMultipleSel
ections', |
| 145 'SelectElementTest.shouldAllowUserToDeselectOptionsByVisibleText', | 160 'SelectElementTest.shouldAllowUserToDeselectOptionsByVisibleText', |
| 146 'TakesScreenshotTest.testCaptureToBase64', | 161 'TakesScreenshotTest.testCaptureToBase64', |
| 147 'TakesScreenshotTest.testSaveScreenshotAsFile', | 162 'TakesScreenshotTest.testSaveScreenshotAsFile', |
| 148 'TextHandlingTest.testShouldBeAbleToEnterDatesAfterFillingInOtherValuesFirst
', | 163 'TextHandlingTest.testShouldBeAbleToEnterDatesAfterFillingInOtherValuesFirst
', |
| 164 'TextHandlingTest.testShouldBeAbleToSetMoreThanOneLineOfTextInATextArea', |
| 165 'TextHandlingTest.testTextOfATextAreaShouldBeEqualToItsDefaultTextEvenAfterT
yping', |
| 149 'TouchFlickTest.*', | 166 'TouchFlickTest.*', |
| 150 'TouchScrollTest.*', | 167 'TouchScrollTest.*', |
| 151 'TouchSingleTapTest.*', | 168 'TouchSingleTapTest.*', |
| 152 'TypingTest.*', | 169 'TypingTest.*', |
| 153 'UploadTest.*', | 170 'UploadTest.*', |
| 154 'WindowSwitchingTest.*', | 171 'WindowSwitchingTest.*', |
| 155 'XPathElementFindingTest.*', | 172 'XPathElementFindingTest.*', |
| 156 ] | 173 ] |
| 157 | 174 |
| 158 def GetPassedJavaTestFilter(operating_system, chrome_version): | 175 def GetPassedJavaTestFilter(operating_system, chrome_version): |
| (...skipping 19 matching lines...) Expand all Loading... |
| 178 chrome_version: Chrome version to test against, e.g., 'HEAD' or '26'. | 195 chrome_version: Chrome version to test against, e.g., 'HEAD' or '26'. |
| 179 test: list of test names to filter. | 196 test: list of test names to filter. |
| 180 | 197 |
| 181 Returns: | 198 Returns: |
| 182 Set of passed test names. | 199 Set of passed test names. |
| 183 """ | 200 """ |
| 184 filters = (_OS_NEGATIVE_FILTER[operating_system] + | 201 filters = (_OS_NEGATIVE_FILTER[operating_system] + |
| 185 _REVISION_NEGATIVE_FILTER[chrome_version]) | 202 _REVISION_NEGATIVE_FILTER[chrome_version]) |
| 186 passed = set(tests) | 203 passed = set(tests) |
| 187 for f in filters: | 204 for f in filters: |
| 188 passed.difference_update(set(t for t in tests if _TestMatchesFilter(t, f))) | 205 passed.difference_update(set(t for t in tests if fnmatch.fnmatch(t, f))) |
| 189 return passed | 206 return passed |
| 190 | |
| 191 def _TestMatchesFilter(test, filter): | |
| 192 if '*' in filter: | |
| 193 return test[:len(filter) - 1] == test[:-1] | |
| 194 return test == filter | |
| OLD | NEW |