Skip to content

Commit

Permalink
Fix most remaining "TRAILING WHITESPACE" lint errors (#19847)
Browse files Browse the repository at this point in the history
  • Loading branch information
foolip authored Oct 23, 2019
1 parent a3dd2ad commit f87822f
Show file tree
Hide file tree
Showing 42 changed files with 75 additions and 99 deletions.
4 changes: 2 additions & 2 deletions css/CSS2/generated-content/before-after-positioned-002.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
}
#test:before{
bottom:0;
right:50px;
right:50px;
}
</style>
</head>

<body>
<p>Test passes if there is a square (four equal sides) at the bottom right of the page.</p>
<div id="test"></div>
<div id="test"></div>
</body>

</html>
4 changes: 2 additions & 2 deletions css/CSS2/generated-content/before-after-positioned-003.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@
}
#test:before{
bottom:0;
right:50px;
right:50px;
}
</style>
</head>

<body>
<p>Test passes if there is a square (four equal sides) at the bottom right of the page.</p>
<div id="test"></div>
<div id="test"></div>
</body>

</html>
4 changes: 2 additions & 2 deletions css/CSS2/generated-content/before-after-positioned-004.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
}
#test:before{
left:50px;
top:0;
top:0;
}
</style>
</head>

<body>
<p>Test passes if there is a square (four equal sides) below.</p>
<div id="test"></div>
<div id="test"></div>
</body>

</html>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
background: yellow;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div slot="foo"></div>
<div slot="bar"></div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
color: red;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div class="red">FAIL</div>
<div class="green" slot="green">FAIL</div>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/css-scoping-shadow-host-rule.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
color: green;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div>FAIL</div>
</my-host>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
background: green;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div>FAIL</div>
</my-host>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/css-scoping-shadow-invisible-slot.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
height: 50%;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div slot="green" style="background: green;"></div>
<div style="background: red;">FAIL</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
width: 100%; height: 100%; background: red;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div>FAIL</div>
</my-host>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
background: green;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div></div>
</my-host>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/css-scoping-shadow-slot-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
height: 50%;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div slot="green" style="background: green;">FAIL</div>
<div slot="green" style="background: inherit;">FAIL</div>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/css-scoping-shadow-slot.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
height: 50%;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div slot="green" style="background: green;"></div>
<div style="background: red;">FAIL</div>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/css-scoping-shadow-slotted-nested.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
height: 25px;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<outer-host>
<span slot="outer">FAIL1</span>
<span slot="inner">FAIL2</span>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/css-scoping-shadow-slotted-rule.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
height: 25px;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div class="green">FAIL1</div>
<myelem><span>FAIL2</span></myelem>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/css-scoping-shadow-with-outside-rules.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div>FAIL</div>
</my-host>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
color:green;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
</my-host>
<div>FAIL</div>
Expand Down
2 changes: 1 addition & 1 deletion css/css-scoping/css-scoping-shadow-with-rules.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
width: 100%; height: 100%; background: red;
}
</style>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<p>Test passes if you see a single 100px by 100px green box below.</p>
<my-host>
<div>FAIL</div>
</my-host>
Expand Down
6 changes: 3 additions & 3 deletions custom-elements/CustomElementRegistry.html
Original file line number Diff line number Diff line change
Expand Up @@ -313,15 +313,15 @@
get: function (target, name) {
if (name == 'prototype' || name == 'observedAttributes')
throw 'Unexpected access to observedAttributes';
prototypeCalls.push(callOrder++);
prototypeCalls.push(callOrder++);
prototypeCalls.push(name);
return target[name];
}
});
var constructorCalls = [];
var proxy = new Proxy(constructor, {
get: function (target, name) {
constructorCalls.push(callOrder++);
constructorCalls.push(callOrder++);
constructorCalls.push(name);
return target[name];
}
Expand Down Expand Up @@ -627,7 +627,7 @@
return Promise.resolve().then(function () {
assert_false(resolved, 'The promise returned by "whenDefined" must not be resolved until a custom element is defined');
assert_false(rejected, 'The promise returned by "whenDefined" must not be rejected until a custom element is defined');
});
});
}, 'customElements.whenDefined must return an unresolved promise when the registry does not contain the entry with the given name')

promise_test(function () {
Expand Down
2 changes: 1 addition & 1 deletion custom-elements/reactions/resources/reactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function testNodeDisconnector(testFunction, name) {
let container = document.createElement('div');
container.appendChild(document.createElement('div'));
document.body.appendChild(container);

test(function () {
var element = define_new_custom_element();
var instance = document.createElement(element.name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
<body>
<div id="log"></div>
<script>

async function construct_custom_element_in_parser(test, call_function)
{
const window = await create_window_in_test(test);
const document = window.document;

document.open();

let executed = false;
let exception = null;
class CustomElement extends window.HTMLElement {
Expand All @@ -35,83 +35,83 @@
}
}
window.customElements.define('some-element', CustomElement);

document.write('<!DOCTYPE html><html><body><some-element></some-element></body></html>');
document.close();

assert_true(executed, 'Must synchronously instantiate a custom element');
return {window, document, exception};
}

promise_test(async function () {
const result = await construct_custom_element_in_parser(this, (document) => document.open());
assert_throws('InvalidStateError', () => { throw result.exception; }, 'Must throw an InvalidStateError');
}, 'document.open() must throw an InvalidStateError when synchronously constructing a custom element');

promise_test(async function () {
const result = await construct_custom_element_in_parser(this, (document) => document.open('text/html'));
assert_throws('InvalidStateError', () => { throw result.exception; }, 'Must throw an InvalidStateError');
}, 'document.open("text/html") must throw an InvalidStateError when synchronously constructing a custom element');

// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open-window
promise_test(async function () {
let load_promise = new Promise((resolve) => window.onmessage = (event) => resolve(event.data));
const result = await construct_custom_element_in_parser(this, (document, window) => document.open('resources/navigation-destination.html', '_self', ''));
assert_equals(result.exception, null);
assert_equals(await load_promise, 'didNavigate');
}, 'document.open(URL) must NOT throw an InvalidStateError when synchronously constructing a custom element');

promise_test(async function () {
const result = await construct_custom_element_in_parser(this, (document) => document.close());
assert_throws('InvalidStateError', () => { throw result.exception; }, 'Must throw an InvalidStateError');
}, 'document.close() must throw an InvalidStateError when synchronously constructing a custom element');

promise_test(async function () {
const result = await construct_custom_element_in_parser(this, (document) => document.write('<b>some text</b>'));
assert_throws('InvalidStateError', () => { throw result.exception; }, 'Must throw an InvalidStateError');
assert_equals(result.document.querySelector('b'), null, 'Must not insert new content');
assert_false(result.document.documentElement.innerHTML.includes('some text'), 'Must not insert new content');
}, 'document.write must throw an InvalidStateError when synchronously constructing a custom element');

promise_test(async function () {
const result = await construct_custom_element_in_parser(this, (document) => document.writeln('<b>some text</b>'));
assert_throws('InvalidStateError', () => { throw result.exception; }, 'Must throw an InvalidStateError');
assert_equals(result.document.querySelector('b'), null, 'Must not insert new content');
assert_false(result.document.documentElement.innerHTML.includes('some text'), 'Must not insert new content');
}, 'document.writeln must throw an InvalidStateError when synchronously constructing a custom element');

promise_test(async function () {
const another_window = await create_window_in_test(this);
const result = await construct_custom_element_in_parser(this, (document) => another_window.document.open());
assert_equals(result.exception, null);
}, 'document.open() of another document must not throw an InvalidStateError when synchronously constructing a custom element');

promise_test(async function () {
const another_window = await create_window_in_test(this);
const result = await construct_custom_element_in_parser(this, (document) => another_window.document.open('text/html'));
assert_equals(result.exception, null);
}, 'document.open("text/html") of another document must not throw an InvalidStateError when synchronously constructing a custom element');

promise_test(async function () {
const another_window = await create_window_in_test(this);
const result = await construct_custom_element_in_parser(this, (document) => another_window.document.close());
assert_equals(result.exception, null);
}, 'document.close() of another document must not throw an InvalidStateError when synchronously constructing a custom element');

promise_test(async function () {
const another_window = await create_window_in_test(this);
const result = await construct_custom_element_in_parser(this, (document) => another_window.document.write('<b>some text</b>'));
assert_equals(result.exception, null);
assert_equals(another_window.document.querySelector('b').outerHTML, '<b>some text</b>');
}, 'document.write of another document must not throw an InvalidStateError when synchronously constructing a custom element');

promise_test(async function () {
const another_window = await create_window_in_test(this);
const result = await construct_custom_element_in_parser(this, (document) => another_window.document.writeln('<b>some text</b>'));
assert_equals(result.exception, null);
assert_equals(another_window.document.querySelector('b').outerHTML, '<b>some text</b>');
}, 'document.writeln of another document must not throw an InvalidStateError when synchronously constructing a custom element');

</script>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
const document = window.document;

document.open();

let executed = false;
let exception = null;
class CustomElement extends window.HTMLElement {
Expand All @@ -35,7 +35,7 @@
}
CustomElement.observedAttributes = ['title'];
window.customElements.define('some-element', CustomElement);

document.write('<!DOCTYPE html><html><body><some-element title="some title"></some-element></body></html>');
document.close();

Expand All @@ -47,12 +47,12 @@
const result = await custom_element_reactions_in_parser(this, (document) => document.open());
assert_throws('InvalidStateError', () => { throw result.exception; }, 'Must throw an InvalidStateError');
}, 'document.open() must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element');

promise_test(async function () {
const result = await custom_element_reactions_in_parser(this, (document) => document.open('text/html'));
assert_throws('InvalidStateError', () => { throw result.exception; }, 'Must throw an InvalidStateError');
}, 'document.open("text/html") must throw an InvalidStateError when processing custom element reactions for a synchronous constructed custom element');

// https://html.spec.whatwg.org/multipage/dynamic-markup-insertion.html#dom-document-open-window
promise_test(async function () {
let load_promise = new Promise((resolve) => window.onmessage = (event) => resolve(event.data));
Expand Down
2 changes: 1 addition & 1 deletion html-longdesc/fail-fragment.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ <h1><a id="fragment"></a>The description</h1>
<p>The image is signed in the space under the floor that is at the top of the stairs with an "R" rune flipped backwards, somewhat resembling a "Я" with top and bottom border lines sloping upward from left to right, and is marked ©2013. It was actually drawn by Charles McCathie Nevile.</p>
</div>
<p>This paragraph is not part of the description. As of September 2013 there is no conformance requirement making it a failure to read this paragraph, but best practice would be to present only the description, and not this part.</p>
<p>The description is encapsulated in a well-formed fragment, but since the target of a link is an empty element it is not possible to positively identify it.</p>
<p>The description is encapsulated in a well-formed fragment, but since the target of a link is an empty element it is not possible to positively identify it.</p>
</body>
</html>
2 changes: 1 addition & 1 deletion html-longdesc/pass-fragment.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ <h1>Pass</h1>
<p>The image is signed in the space under the floor that is at the top of the stairs with an "R" rune flipped backwards, somewhat resembling a "Я" with top and bottom border lines sloping upward from left to right, and is marked ©2013. It was actually drawn by Charles McCathie Nevile.</p>
</div>
<p>This paragraph is not part of the description. As of September 2013 there is no conformance requirement making it a failure to read this paragraph, best practice would be to present only the description, and not this part.</p>
<p>The description is encapsulated in a well-formed div element, so it is possible to identify it.</p>
<p>The description is encapsulated in a well-formed div element, so it is possible to identify it.</p>
</body>
</html>
2 changes: 1 addition & 1 deletion html-longdesc/pass.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<body>
<h1>Pass</h1>
<p>The image is a drawn cartoon, on the left is a parson in a wheelchair in profile, facing toward the centre of the image, under a banner with the text "e-democracy?" on it. In front of the person is stairs, at the top of the stairs is a table. On the table is a computer, whose screen says "Vote!" and has a red and a green button</p>
<p>The image is signed in the space under the floor that is at the top of the stairs with an "R" rune flipped backwards, somewhat resembling a "Я" with top and bottom border lines sloping upward from left to right, and is marked ©2013. It was actually drawn by Charles McCathie Nevile.</p>
<p>The image is signed in the space under the floor that is at the top of the stairs with an "R" rune flipped backwards, somewhat resembling a "Я" with top and bottom border lines sloping upward from left to right, and is marked ©2013. It was actually drawn by Charles McCathie Nevile.</p>
</body>
</html>
2 changes: 1 addition & 1 deletion html-longdesc/rebased/fail.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
<body>
<h1>Pass</h1>
<p>(The image is a drawn cartoon, on the right is a parson a wheelchair in profile, facing toward the centre of the image, under a banner with the text "e-democracy?" on it. In front of the person are some stairs, at the top of the stairs is a table. On the table is a computer, whose screen says "Vote!" and has a red and a green button)</p>
<p>The image is signed (in the space under the floor that is at the top of the stairs) with an "R" rune flipped backwards, somewhat resembling a "Я" with top and bottom border lines sloping upward from left to right, and is marked ©1999. It was actually drawn by Charles McCathie Nevile.</p>
<p>The image is signed (in the space under the floor that is at the top of the stairs) with an "R" rune flipped backwards, somewhat resembling a "Я" with top and bottom border lines sloping upward from left to right, and is marked ©1999. It was actually drawn by Charles McCathie Nevile.</p>
</body>
</html>
Loading

0 comments on commit f87822f

Please sign in to comment.