Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / PerformanceTests / Bindings / named-property-enumerator.html
blob4e934f3eb681a0ea9d85652857b7a249d27005d9
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../resources/runner.js"></script>
5 <script>
6 var div = document.createElement("div");
7 for (var i = 0; i < 1000; i++) {
8 var key = "key_" + i;
9 var value = "value_" + i;
10 div.dataset[key] = value;
12 function assertEquals(a, b) {
13 if (a !== b) console.log("assertion failed: not equal", a, b);
15 var i = 0;
16 for (var key in div.dataset) {
17 var ref_key = "key_" + i;
18 var ref_value = "value_" + i;
19 assertEquals(key, ref_key);
20 assertEquals(div.dataset[key], ref_value);
21 i++;
24 PerfTestRunner.measureRunsPerSecond({
25 description: "This benchmark covers enumerator of named properties",
26 run: function() {
27 for (var key in div.dataset);
28 }});
29 </script>
30 </body>
31 </html>