author Mike Hommey <>
Fri, 02 Jun 2017 15:07:58 +0900
changeset 410640 f360dd9d411e7ba61531bed2c32a0981cc6c418a
parent 392127 98785831bbb882a30692dfeca09c7614c83941f8
child 528458 ba6f655fd68963530c866d0d4a48c3db3d307777
permissions -rw-r--r--
Bug 1369622 - Restore static asserts for lack of arguments on some macros. r=froydnj Bug 1368932 removed MOZ_STATIC_ASSERT_VALID_ARG_COUNT because it didn't actually work for large numbers of arguments. But it was kind of useful for macros that expand to something broken when they are given no variadic argument at all. Now that we have a macro that doesn't require tricks to count empty arguments lists, however, we can use straightforward static_asserts instead of a generic macro, which has the side effect of providing more context in the error message.

<html xmlns="">
  <title>Test for animate with xlink:href attribute.</title>
  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    div#target {
      width: 300px;
      height: 100px;
      background-color: red;
<p id="display"></p>
<div id="target"></div>
<svg xmlns=""
  <animate xlink:href="#target"
           attributeName="width" from="0" to="200" dur="10s" fill="freeze"/>
<pre id="test">
<script class="testbody" type="text/javascript">

function runTest() {
  var svg = document.getElementById("svg");
  var target = document.getElementById("target");


  var cs = getComputedStyle(target);
  is(cs.width, "100px", "SMIL should affect outer element.");


window.addEventListener("load", runTest);