-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core(driver): use execution context isolation when necessary (#3500)
* fix(driver): use execution context isolation when necessary * feedback * add unit test * feedback * add jsdoc comment
- Loading branch information
1 parent
62e4b74
commit 04b685f
Showing
9 changed files
with
385 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* @license Copyright 2017 Google Inc. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | ||
*/ | ||
'use strict'; | ||
|
||
/** | ||
* Config file for running PWA smokehouse audits for axe. | ||
*/ | ||
module.exports = { | ||
extends: 'lighthouse:default', | ||
settings: { | ||
onlyCategories: [ | ||
'accessibility', | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,242 @@ | ||
/** | ||
* @license Copyright 2017 Google Inc. All Rights Reserved. | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. | ||
*/ | ||
'use strict'; | ||
|
||
/** | ||
* Expected Lighthouse audit values for byte efficiency tests | ||
*/ | ||
module.exports = [ | ||
{ | ||
initialUrl: 'http://localhost:10200/a11y/a11y_tester.html', | ||
url: 'http://localhost:10200/a11y/a11y_tester.html', | ||
audits: { | ||
'accesskeys': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'aria-allowed-attr': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'aria-required-children': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'aria-required-parent': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'aria-roles': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'aria-valid-attr-value': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'aria-valid-attr': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'button-name': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'bypass': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'color-contrast': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'definition-list': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'dlitem': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'document-title': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'duplicate-id': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'frame-title': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'html-has-lang': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'image-alt': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'input-image-alt': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'label': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'layout-table': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'link-name': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'list': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'listitem': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'meta-viewport': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'object-alt': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'tabindex': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'td-headers-attr': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
'valid-lang': { | ||
score: false, | ||
details: { | ||
items: { | ||
length: 1, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
node lighthouse-cli/test/fixtures/static-server.js & | ||
|
||
sleep 0.5s | ||
|
||
config="lighthouse-cli/test/smokehouse/a11y/a11y-config.js" | ||
expectations="lighthouse-cli/test/smokehouse/a11y/expectations.js" | ||
|
||
yarn smokehouse -- --config-path=$config --expectations-path=$expectations | ||
exit_code=$? | ||
|
||
# kill test servers | ||
kill $(jobs -p) | ||
|
||
exit "$exit_code" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
for d in "$DIR"/*/ ; do | ||
bash "${d}run-tests.sh" | ||
if [ $? -ne 0 ] | ||
then | ||
echo "Error: $d smoke test failed" | ||
exit 1 | ||
fi | ||
done |
Oops, something went wrong.