diff options
author | hiroshige <hiroshige@chromium.org> | 2015-12-17 00:46:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-17 08:47:39 +0000 |
commit | 76efe99397c323d99ba95a3eb0102207358aeb29 (patch) | |
tree | 6e19d6e2a24b518a39064825a81a6477ea266bb2 /third_party/WebKit/PerformanceTests | |
parent | 8dfc2dd02de38a9f2d7cd389ad3f320fb5aa63b8 (diff) | |
download | chromium_src-76efe99397c323d99ba95a3eb0102207358aeb29.zip chromium_src-76efe99397c323d99ba95a3eb0102207358aeb29.tar.gz chromium_src-76efe99397c323d99ba95a3eb0102207358aeb29.tar.bz2 |
Use iframe in blink_perf.pywebsocket perf tests to remove --disable-web-security
Previously:
(a) util_performance_test.js in Blink runs performance tests using
(b) pywebsocket's scripts,
but this required --disable-web-security for cross-origin workers
because (a) and (b) have different origins.
We change this so that:
(a) util_performance_test.js creates
(c) <iframe> with src=pywebsocket's example/*_iframe.html that runs
the performance tests on the iframe using
(b) pywebsocket's scripts.
Because (b) and (c) have the same origin (but (a) has a different origin),
Tests are run in the same-origin while we have an cross-origin iframe.
This CL adds pywebsocket-side iframe HTML/JavaScript files for (b) and (c). and
updates DEPS to include pywebsocket-side changes [1].
[1] pywebsocket-side: https://github.com/google/pywebsocket/pull/147
[2] Chromium-side: This CL.
BUG=567533
CQ_EXTRA_TRYBOTS=tryserver.chromium.perf:linux_perf_bisect;tryserver.chromium.perf:mac_10_10_perf_bisect;tryserver.chromium.perf:win_perf_bisect
Review URL: https://codereview.chromium.org/1521943002
Cr-Commit-Position: refs/heads/master@{#365787}
Diffstat (limited to 'third_party/WebKit/PerformanceTests')
37 files changed, 42 insertions, 133 deletions
diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-window-async-verify.html index 35879bc..a8af7e3 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/benchmark.js"></script> </head> <body onload="startPerformanceTest( 'WebSocket', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-worker-async-verify.html index 532f56b..28500f3 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/WebSocket-receive-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/benchmark.js"></script> </head> <body onload="startPerformanceTest( 'WebSocket', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-window-async-verify.html index d13be99..0230347 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-async-verify.html index 6b263dc..bb4984b 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-sync-verify.html index b8bd5e3b..3e34a6d 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-sync-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-arraybuffer-worker-sync-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-window-async-verify.html index 4221473..d745f56 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-async-verify.html index 0055878..26dd7f1 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-sync-verify.html index 0e7319c..8a163c7 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-sync-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-blob-worker-sync-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-window-async-verify.html index 56a3987..e9d06e8 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-async-verify.html index a2af594..d267a5d 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-sync-verify.html index fe9ca9e..ee9b109 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-sync-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-receive-text-worker-sync-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-async-verify.html index 7f4a17d..fbdccbf 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-sync-verify.html index b20d6f0..49f593a 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-sync-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-window-sync-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-async-verify.html index 42a81a2..13c3328 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-sync-verify.html index aa1d315..2702b98 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-sync-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-arraybuffer-worker-sync-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-async-verify.html index df1c4db..118520b 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-sync-verify.html index 6f5b1ce..985cdc2 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-sync-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-window-sync-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-async-verify.html index 10c2a6e..6557a2c 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-sync-verify.html index 826e362..f4295fc 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-sync-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-blob-worker-sync-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-async-verify.html index da63e55..6d7448c 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-sync-verify.html index 94e8c9f..9cbf463 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-sync-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-window-sync-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-async-verify.html index 767a66e..4bd304a 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-sync-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-sync-verify.html index 365782a..2e04e52 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-sync-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/XHR-send-text-worker-sync-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/xhr_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'XHR', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-window-async-verify.html index b30352f..db4ec54 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-worker-async-verify.html index 38e617c..802a660 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-arraybuffer-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-window-async-verify.html index 022065a..37c70eb 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-worker-async-verify.html index 9061267..ce2d178 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-blob-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-window-async-verify.html index 9b3410c..7bbe525 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-worker-async-verify.html index 0b2196b..951d10d 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-receive-text-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-window-async-verify.html index b9339d7..1ebb6b1 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-worker-async-verify.html index 1428d60..5715a9c9 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-arraybuffer-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-window-async-verify.html index 017b61a..76df2cc 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-worker-async-verify.html index e739f39..5361d63 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-blob-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-window-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-window-async-verify.html index 63b6f39..931a1ff 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-window-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-window-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-worker-async-verify.html b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-worker-async-verify.html index 0e43c53..c51c00f 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-worker-async-verify.html +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/fetch-send-text-worker-async-verify.html @@ -1,9 +1,7 @@ <!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="http://localhost:8001/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="http://localhost:8001/fetch_benchmark.js"></script> </head> <body onload="startPerformanceTest( 'fetch', diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/resources/generate.py b/third_party/WebKit/PerformanceTests/Pywebsocket/resources/generate.py index 0c04b6c..726fc8f 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/resources/generate.py +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/resources/generate.py @@ -16,8 +16,6 @@ def generate(connection_type, is_worker, is_async, does_verify): - pywebsocket_server = 'http://localhost:8001' - test_file_name = ('%s-%s%s-%s-%s-%s.html' % (connection_type, benchmark_name, @@ -29,9 +27,7 @@ def generate(connection_type, test_file_content_template = '''<!DOCTYPE html> <head> <script src="../resources/runner.js"></script> -<script src="{pywebsocket_server_root}/util.js"></script> <script src="resources/util_performance_test.js"></script> -<script src="{pywebsocket_server_root}/{script_name}"></script> </head> <body onload="startPerformanceTest( '{connection_type}', @@ -52,7 +48,6 @@ def generate(connection_type, script_name = 'fetch_benchmark.js' test_file_content = test_file_content_template.format( - pywebsocket_server_root=pywebsocket_server, script_name=script_name, connection_type=connection_type, benchmark_name=benchmark_name, diff --git a/third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js b/third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js index 20021a4..a201b9e 100644 --- a/third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js +++ b/third_party/WebKit/PerformanceTests/Pywebsocket/resources/util_performance_test.js @@ -1,64 +1,48 @@ -function perfTestAddToLog(text) { - PerfTestRunner.log(text); -} - -function perfTestAddToSummary(text) { -} - -function perfTestMeasureValue(value) { - PerfTestRunner.measureValueAsync(value); - PerfTestRunner.gc(); -} - -function perfTestNotifyAbort() { - PerfTestRunner.logFatalError("benchmark aborted"); -} - const numIterations = 10; const numWarmUpIterations = 5; -function getConfigForPerformanceTest(connectionType, dataType, async, - verifyData) { - return { - prefixUrl: - connectionType === 'WebSocket' ? 'ws://localhost:8001/benchmark_helper' : - 'http://localhost:8001/073be001e10950692ccbf3a2ad21c245', // XHR or fetch - printSize: true, - numXHRs: 1, - numFetches: 1, - numSockets: 1, - // + 1 is for a warmup iteration by the Telemetry framework. - numIterations: numIterations + numWarmUpIterations + 1, - numWarmUpIterations: numWarmUpIterations, - minTotal: 10240000, - startSize: 10240000, - stopThreshold: 10240000, - multipliers: [2], - verifyData: verifyData, - dataType: dataType, - async: async, - addToLog: perfTestAddToLog, - addToSummary: perfTestAddToSummary, - measureValue: perfTestMeasureValue, - notifyAbort: perfTestNotifyAbort - }; -} - function startPerformanceTest(connectionType, benchmarkName, dataType, isWorker, async, verifyData){ - initWorker(connectionType, 'http://localhost:8001'); - - PerfTestRunner.prepareToMeasureValuesAsync({ - done: function() { - var config = getConfigForPerformanceTest(connectionType, dataType, - async, verifyData); - doAction(config, isWorker, 'stop'); - }, - unit: 'ms', - dromaeoIterationCount: numIterations - }); - - var config = getConfigForPerformanceTest(connectionType, dataType, async, - verifyData); - doAction(config, isWorker, benchmarkName); + var iframe = document.createElement('iframe'); + if (connectionType === 'WebSocket') { + iframe.src = "http://localhost:8001/performance_test_iframe.html"; + } else if (connectionType === 'XHR') { + iframe.src = "http://localhost:8001/xhr_performance_test_iframe.html"; + } else { + iframe.src = "http://localhost:8001/fetch_performance_test_iframe.html"; + } + iframe.onload = function() { + var child = iframe.contentWindow; + PerfTestRunner.prepareToMeasureValuesAsync({ + done: function() { + child.postMessage({'command': 'stop'}, + 'http://localhost:8001'); + }, + unit: 'ms', + dromaeoIterationCount: numIterations + }); + + child.postMessage({'command': 'start', + 'connectionType': connectionType, + 'benchmarkName': benchmarkName, + 'dataType': dataType, + 'isWorker': isWorker, + 'async': async, + 'verifyData': verifyData, + 'numIterations': numIterations, + 'numWarmUpIterations': numWarmUpIterations}, + 'http://localhost:8001'); + }; + document.body.appendChild(iframe); } + +onmessage = function(message) { + if (message.data.command === 'log') { + PerfTestRunner.log(message.data.value); + } else if (message.data.command === 'measureValue') { + PerfTestRunner.measureValueAsync(message.data.value); + PerfTestRunner.gc(); + } else if (message.data.command === 'notifyAbort') { + PerfTestRunner.logFatalError("benchmark aborted"); + } +}; |