Skip to content

Commit

Permalink
core(meta-tag-gatherers): meta tag search should be case-insensitive (#…
Browse files Browse the repository at this point in the history
…3729)

* Metatag search should be case-insensitive

* Modify SEO smoke test to test case-insenstive meta tags
  • Loading branch information
kdzwinel authored and patrickhulce committed Nov 6, 2017
1 parent af03370 commit 45d8537
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lighthouse-cli/test/fixtures/seo/seo-tester.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<title>SEO audit tester</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<meta name="description" content="The premiere destination for testing your SEO audit gathering">
<meta name="Description" content="The premiere destination for testing your SEO audit gathering">
</head>
<body>
<h1>SEO</h1>
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/gather/gatherers/seo/meta-description.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class MetaDescription extends Gatherer {
afterPass(options) {
const driver = options.driver;

return driver.querySelector('head meta[name="description"]')
return driver.querySelector('head meta[name="description" i]')
.then(node => node && node.getAttribute('content'));
}
}
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/gather/gatherers/theme-color.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ThemeColor extends Gatherer {
afterPass(options) {
const driver = options.driver;

return driver.querySelector('head meta[name="theme-color"]')
return driver.querySelector('head meta[name="theme-color" i]')
.then(node => node && node.getAttribute('content'));
}
}
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-core/gather/gatherers/viewport.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Viewport extends Gatherer {
afterPass(options) {
const driver = options.driver;

return driver.querySelector('head meta[name="viewport"]')
return driver.querySelector('head meta[name="viewport" i]')
.then(node => node && node.getAttribute('content'));
}
}
Expand Down

0 comments on commit 45d8537

Please sign in to comment.