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

Unified Diff: tools/perf/page_sets/idle_multi_tab_cases.js

Issue 1145173002: Add benchmark that tests garbage collector and idle time handler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: tools/perf/page_sets/idle_multi_tab_cases.js
diff --git a/tools/perf/page_sets/idle_multi_tab_cases.js b/tools/perf/page_sets/idle_multi_tab_cases.js
new file mode 100644
index 0000000000000000000000000000000000000000..bdb4c9f4bed3ed0d8f3e96cd6578a5249e915c66
--- /dev/null
+++ b/tools/perf/page_sets/idle_multi_tab_cases.js
@@ -0,0 +1,19 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+__telemetry_spawned_tabs = [];
+
+function __telemetry_spawn_tab() {
+ var tab = window.open(window.location.href);
+ if (typeof tab === "undefined") {
+ throw "Cannot open tab. Forgot --disable-popup-blocking flag?";
+ }
+ __telemetry_spawned_tabs.push(tab);
+ return __telemetry_spawned_tabs.length - 1;
+}
+
+function __telemetry_close_tab(tab) {
+ __telemetry_spawned_tabs[tab].close();
+ __telemetry_spawned_tabs[tab] = null;
+}

Powered by Google App Engine
This is Rietveld 408576698