Index: chrome/test/data/extensions/platform_apps/hidden_with_id/test.js |
diff --git a/chrome/test/data/extensions/platform_apps/hidden_with_id/test.js b/chrome/test/data/extensions/platform_apps/hidden_with_id/test.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..91ccea0131be7d295b5d29ce609aee60cf130b07 |
--- /dev/null |
+++ b/chrome/test/data/extensions/platform_apps/hidden_with_id/test.js |
@@ -0,0 +1,31 @@ |
+// 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. |
+ |
+function sendLaunchedAndRunReply() { |
+ chrome.test.sendMessage('Launched', function (reply) { |
+ if (reply) |
+ window[reply](); |
+ }); |
+} |
+ |
+function createHidden() { |
+ chrome.app.window.create('empty.html', { |
+ id: 'hidden_with_id', |
+ hidden: true, |
+ }, function () { |
+ sendLaunchedAndRunReply(); |
+ }); |
+} |
+ |
+function createVisible() { |
+ chrome.app.window.create('empty.html', { |
+ id: 'hidden_with_id', |
+ }, function () { |
+ sendLaunchedAndRunReply(); |
+ }); |
+} |
+ |
+chrome.app.runtime.onLaunched.addListener(function() { |
+ sendLaunchedAndRunReply(); |
+}); |