Bug 1443987 [wpt PR 9909] - [css-typed-om] Clean up parsing tests., a=testonly

Automatic update from web-platform-tests[css-typed-om] Clean up parsing tests.

This patch:
- Deletes unused interface.html
- Fixes <div> tag in tests.
- Adds case-sensitivity tests.

Bug: 774887
Change-Id: I194ec7549991bfcd7708e640458246b40fc3ab03
Reviewed-on: https://chromium-review.googlesource.com/952509
Reviewed-by: nainar <nainar@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541592}

wpt-commits: ab1fd254ca0a97ca7cbca5c9fca853596cd22cfd
wpt-pr: 9909
wpt-commits: ab1fd254ca0a97ca7cbca5c9fca853596cd22cfd
wpt-pr: 9909
This commit is contained in:
Darren Shen 2018-03-26 15:28:24 +00:00 коммит произвёл James Graham
Родитель eb0783f5bb
Коммит 7e9c76654a
4 изменённых файлов: 17 добавлений и 35 удалений

Просмотреть файл

@ -315738,12 +315738,6 @@
{}
]
],
"css/css-typed-om/stylevalue-objects/interface.html": [
[
"/css/css-typed-om/stylevalue-objects/interface.html",
{}
]
],
"css/css-typed-om/stylevalue-objects/parse-invalid.html": [
[
"/css/css-typed-om/stylevalue-objects/parse-invalid.html",
@ -520393,16 +520387,12 @@
"f5078badde83ca4823844a9df5cde800593efbfc",
"testharness"
],
"css/css-typed-om/stylevalue-objects/interface.html": [
"5c9086db5b7f3a9d6e3109f1ce47385ad345f474",
"testharness"
],
"css/css-typed-om/stylevalue-objects/parse-invalid.html": [
"5c699b58f44dfc6d352cfae423eca4981eb78f1e",
"testharness"
],
"css/css-typed-om/stylevalue-objects/parse.html": [
"afb2b2dabf80ba3d96812e63205f9903589595eb",
"863df0a575d1209387b29e186fb73cfc6acd3859",
"testharness"
],
"css/css-typed-om/stylevalue-objects/parseAll-invalid.html": [
@ -520410,7 +520400,7 @@
"testharness"
],
"css/css-typed-om/stylevalue-objects/parseAll.html": [
"0b45c2f4fce50274d41f6d836377e965e9b9a1eb",
"f4018787ff06606bcf22a3d36b3d8e43aa47b481",
"testharness"
],
"css/css-typed-om/stylevalue-serialization/cssImageValue.html": [

Просмотреть файл

@ -1,21 +0,0 @@
<!doctype html>
<meta charset=utf-8>
<title>CSSStyleValue IDL</title>
<link rel="help" href="https://drafts.css-houdini.org/css-typed-om-1/#stylevalue-objects">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/WebIDLParser.js"></script>
<script src="/resources/idlharness.js"></script>
<script type="text/plain" id="idl">
interface CSSStyleValue {
stringifier;
static CSSStyleValue? parse(DOMString property, DOMString cssText);
static sequence<CSSStyleValue>? parseAll(DOMString property, DOMString cssText);
};
</script>
<script>
'use strict';
const idlArray = new IdlArray();
idlArray.add_idls(document.getElementById('idl').textContent);
idlArray.test();
</script>

Просмотреть файл

@ -6,7 +6,7 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<div id="log">
<div id="log"></div>
<script>
'use strict';
@ -16,6 +16,12 @@ test(() => {
'Result must be a subclass of CSSStyleValue');
}, 'CSSStyleValue.parse() with a valid property returns a CSSStyleValue');
test(() => {
const result = CSSStyleValue.parse('WiDtH', '10px');
assert_true(result instanceof CSSStyleValue,
'Result must be a subclass of CSSStyleValue');
}, 'CSSStyleValue.parse() is not case sensitive');
test(() => {
const result = CSSStyleValue.parse('transition-duration', '1s, 2s, 3s');
assert_true(result instanceof CSSStyleValue,

Просмотреть файл

@ -6,7 +6,7 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<div id="log">
<div id="log"></div>
<script>
'use strict';
@ -17,6 +17,13 @@ test(() => {
'Only element in result must be a subclass of CSSStyleValue');
}, 'CSSStyleValue.parseAll() with a valid property returns a list with a single CSSStyleValue');
test(() => {
const result = CSSStyleValue.parseAll('WiDtH', '10px');
assert_equals(result.length, 1, 'Result must be a list with one element');
assert_true(result[0] instanceof CSSStyleValue,
'Only element in result must be a subclass of CSSStyleValue');
}, 'CSSStyleValue.parseAll() is not case sensitive');
test(() => {
const result = CSSStyleValue.parseAll('transition-duration', '1s, 2s, 3s');
assert_equals(result.length, 3, 'Result must be a list with three elements');