Skip to content

Commit

Permalink
Update to latest rust-cssparser.
Browse files Browse the repository at this point in the history
This also updates wpt tests for new CSS Level 4 color parsing, and
disables the relevant CSS tests until they can be updated (tracked
by #6856).
  • Loading branch information
metajack committed Jul 30, 2015
1 parent df722ec commit 154b5fd
Show file tree
Hide file tree
Showing 16 changed files with 129 additions and 43 deletions.
18 changes: 9 additions & 9 deletions components/servo/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions ports/cef/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions ports/gonk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

@@ -0,0 +1,3 @@
[border-bottom-color-030.htm]
type: reftest
expected: FAIL
@@ -0,0 +1,3 @@
[border-left-color-030.htm]
type: reftest
expected: FAIL
@@ -0,0 +1,3 @@
[border-right-color-030.htm]
type: reftest
expected: FAIL
@@ -0,0 +1,3 @@
[border-top-color-030.htm]
type: reftest
expected: FAIL
26 changes: 24 additions & 2 deletions tests/wpt/metadata/MANIFEST.json
Expand Up @@ -28856,8 +28856,30 @@
]
},
"local_changes": {
"deleted": [],
"items": {},
"deleted": [
"shadow-dom/shadow-trees/hosting-multiple-shadow-trees-002.html",
"shadow-dom/shadow-trees/hosting-multiple-shadow-trees-006.html",
"shadow-dom/shadow-trees/hosting-multiple-shadow-trees-004.html",
"shadow-dom/shadow-trees/hosting-multiple-shadow-trees-003.html",
"2dcontext/transformations/canvas_transformations_reset_001.htm",
"shadow-dom/shadow-trees/hosting-multiple-shadow-trees-005.html"
],
"items": {
"testharness": {
"2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html": [
{
"path": "2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html",
"url": "/2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.hex4.html"
}
],
"2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html": [
{
"path": "2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html",
"url": "/2dcontext/fill-and-stroke-styles/2d.fillStyle.parse.hex8.html"
}
]
}
},
"reftest_nodes": {}
},
"reftest_nodes": {
Expand Down
12 changes: 0 additions & 12 deletions tests/wpt/mozilla/meta/MANIFEST.json
Expand Up @@ -63,18 +63,6 @@
"url": "/_mozilla/css/absolute_hypothetical_float.html"
}
],
"css/empty_pseudo_selector.html": [
{
"path": "css/empty_pseudo_selector.html",
"references": [
[
"/_mozilla/css/empty_pseudo_selector_ref.html",
"=="
]
],
"url": "/_mozilla/css/empty_pseudo_selector.html"
}
],
"css/class-namespaces.html": [
{
"path": "css/class-namespaces.html",
Expand Down
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.fillStyle.parse.hex4</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">

<h1>2d.fillStyle.parse.hex4</h1>
<p class="desc"></p>

<p class="notes">
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hex4.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {


ctx.fillStyle = '#f00';
ctx.fillStyle = '#0f0f';
ctx.fillRect(0, 0, 100, 50);
_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");


});
</script>

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by tools/gentest.py. -->
<title>Canvas test: 2d.fillStyle.parse.hex8</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/canvas-tests.js"></script>
<link rel="stylesheet" href="/common/canvas-tests.css">
<body class="show_output">

<h1>2d.fillStyle.parse.hex8</h1>
<p class="desc"></p>

<p class="notes">
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
<p class="output expectedtext">Expected output:<p><img src="2d.fillStyle.parse.hex8.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
var t = async_test("");
_addTest(function(canvas, ctx) {


ctx.fillStyle = '#f00';
ctx.fillStyle = '#00ff00ff';
ctx.fillRect(0, 0, 100, 50);
_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");


});
</script>

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -21,7 +21,7 @@ <h1>2d.fillStyle.parse.invalid.hex4</h1>


ctx.fillStyle = '#0f0';
try { ctx.fillStyle = '#ff00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
try { ctx.fillStyle = '#fg00'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
ctx.fillRect(0, 0, 100, 50);
_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");

Expand Down
Expand Up @@ -21,7 +21,7 @@ <h1>2d.fillStyle.parse.invalid.hex8</h1>


ctx.fillStyle = '#0f0';
try { ctx.fillStyle = '#ff0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
try { ctx.fillStyle = '#fg0000ff'; } catch (e) { } // this shouldn't throw, but it shouldn't matter here if it does
ctx.fillRect(0, 0, 100, 50);
_assertPixel(canvas, 50,25, 0,255,0,255, "50,25", "0,255,0,255");

Expand Down
6 changes: 4 additions & 2 deletions tests/wpt/web-platform-tests/2dcontext/tools/tests2d.yaml
Expand Up @@ -1329,7 +1329,9 @@
for name, string, r,g,b,a, notes in [
('html4', 'limE', 0,255,0,255, ""),
('hex3', '#0f0', 0,255,0,255, ""),
('hex4', '#0f0f', 0,255,0,255, ""),
('hex6', '#00fF00', 0,255,0,255, ""),
('hex8', '#00ff00ff', 0,255,0,255, ""),
('rgb-num', 'rgb(0,255,0)', 0,255,0,255, ""),
('rgb-clamp-1', 'rgb(-1000, 1000, -1000)', 0,255,0,255, 'Assumes colours are clamped to [0,255].'),
('rgb-clamp-2', 'rgb(-200%, 200%, -200%)', 0,255,0,255, 'Assumes colours are clamped to [0,255].'),
Expand Down Expand Up @@ -1397,11 +1399,11 @@
('hex1', '#f'),
('hex2', '#f0'),
('hex3', '#g00'),
('hex4', '#ff00'),
('hex4', '#fg00'),
('hex5', '#ff000'),
('hex6', '#fg0000'),
('hex7', '#ff0000f'),
('hex8', '#ff0000ff'),
('hex8', '#fg0000ff'),
('rgb-1', 'rgb(255.0, 0, 0)'),
('rgb-2', 'rgb(255, 0.0, 0)'),
('rgb-3', 'rgb(255.0, 0, 0,)'),
Expand Down

0 comments on commit 154b5fd

Please sign in to comment.