mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-10 05:08:36 +02:00
Automatic update from web-platform-tests
Replace some assert_throws('Something', stuff) calls with assert_throws_dom. (#21392)
This diff was generated by running:
find . -type f -print0 | xargs -0 perl -pi -e "BEGIN { \$/ = undef; } s/assert_throws\(([ \n]*'[A-Za-z_]*') *(, *.)/assert_throws_dom(\1\2/gs"
in bash (doesn't work in tcsh, due to the $ inside "").
This does affect indentation poorly in cases when the first arg was on the same
line as the assert_throws, there was a newline after the ',' after the first
arg, and the following args were lined up with the first arg. Fixing that,
especially when there are multiple lines after the first arg, is not trivial
with a regexp.
Co-authored-by: Boris Zbarsky <bzbarsky@mit.edu>
--
wpt-commits: d5103044974ae41deb6e099649d7520c374aa36b
wpt-pr: 21392
26 lines
952 B
HTML
26 lines
952 B
HTML
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>innerHTML in XHTML</title>
|
|
<link rel="author" title="Simon Pieters" href="mailto:simonp@opera.com"/>
|
|
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"/>
|
|
<link rel="help" href="http://html5.org/specs/dom-parsing.html#dom-innerhtml"/>
|
|
<link rel="help" href="http://www.whatwg.org/html5/#xml-fragment-serialization-algorithm"/>
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="log"></div>
|
|
<iframe src="data:text/xml,<html xmlns='http://www.w3.org/1999/xhtml'><foo--/></html>"></iframe>
|
|
<script><![CDATA[
|
|
var t = async_test();
|
|
window.onload = t.step_func(function() {
|
|
var foo = window[0].document.documentElement.firstChild;
|
|
assert_throws_dom('SyntaxError', function() {
|
|
foo.innerHTML = 'x<\/foo--><\!--y';
|
|
// This is ridiculous.
|
|
});
|
|
t.done();
|
|
});
|
|
]]></script>
|
|
</body>
|
|
</html>
|