зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1740538: Get site name from organization microdata. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D130883
This commit is contained in:
Родитель
606a3f598a
Коммит
fe86d983fc
|
@ -148,6 +148,9 @@ const SchemaOrgPageData = {
|
|||
collectProduct(pageData, scope);
|
||||
}
|
||||
break;
|
||||
case "schema.org/Organization":
|
||||
pageData.siteName = getProp(scope, "name")[0];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,10 @@ add_task(async function test_single_product_data() {
|
|||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"></meta>
|
||||
</head>
|
||||
<body>
|
||||
<div itemscope itemtype="https://schema.org/Organization">
|
||||
<span itemprop="name">Mozilla</span>
|
||||
</div>
|
||||
|
||||
<div itemscope itemtype="https://schema.org/Product">
|
||||
<img itemprop="image" src="bon-echo-microwave-17in.jpg" />
|
||||
<a href="microwave.html" itemprop="url">
|
||||
|
@ -32,6 +36,7 @@ add_task(async function test_single_product_data() {
|
|||
</html>
|
||||
`,
|
||||
{
|
||||
siteName: "Mozilla",
|
||||
description: "The most amazing microwave in the world",
|
||||
image: BASE_URL + "/bon-echo-microwave-17in.jpg",
|
||||
data: {
|
||||
|
|
Загрузка…
Ссылка в новой задаче