Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Unified Diff: third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-custom-iterator.html

Issue 2810843002: bindings: Make the sequence conversion code more complaint with WebIDL. (Closed)
Patch Set: Adjust even more tests Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-custom-iterator.html
diff --git a/third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-custom-iterator.html b/third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-custom-iterator.html
new file mode 100644
index 0000000000000000000000000000000000000000..363ad3f9b35d4bc66c2ec80e75e291c853a2aa1c
--- /dev/null
+++ b/third_party/WebKit/PerformanceTests/Bindings/sequence-conversion-custom-iterator.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src="../resources/runner.js"></script>
+<script>
+let dataArray = [];
+for (let i = 0; i < 100000; i++)
+ dataArray.push('abcdefg foo bar baz');
+
+let iterableData = {
+ [Symbol.iterator]() {
+ var count = 0;
+ return {
+ next() {
+ if (count >= dataArray.length)
+ return {done: true};
+ return {done: false, value: dataArray[count++]};
+ }
+ }
+ }
+};
+
+PerfTestRunner.measureRunsPerSecond({
+ description: "This benchmark measures the overhead of converting JavaScript objects into WebIDL sequences (slow path using the @@iteratorprotocol)",
+ run: function() {
+ new Blob(iterableData);
+ }});
+</script>
+</body>
+</html>
« no previous file with comments | « third_party/WebKit/LayoutTests/webaudio/dom-exceptions-expected.txt ('k') | third_party/WebKit/Source/bindings/bindings.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698