1 <script src="../resources/magnitude-perf.js"></script>
5 function setupFunction(magnitude)
7 element = document.createElement('div');
11 function test(magnitude)
13 element.setAttribute(key, counter ? counter-- : counter++);
16 Magnitude.description("Tests that setAttribute is constant time.");
17 Magnitude.run(setupFunction, test, Magnitude.CONSTANT);