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; |
+} |