[Cronet] Delay StartNetLog and StopNetLog until native request context is initialized
[chromium-blink-merge.git] / chrome / test / data / extensions / platform_apps / hidden_with_id / test.js
blob91ccea0131be7d295b5d29ce609aee60cf130b07
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 function sendLaunchedAndRunReply() {
6 chrome.test.sendMessage('Launched', function (reply) {
7 if (reply)
8 window[reply]();
9 });
12 function createHidden() {
13 chrome.app.window.create('empty.html', {
14 id: 'hidden_with_id',
15 hidden: true,
16 }, function () {
17 sendLaunchedAndRunReply();
18 });
21 function createVisible() {
22 chrome.app.window.create('empty.html', {
23 id: 'hidden_with_id',
24 }, function () {
25 sendLaunchedAndRunReply();
26 });
29 chrome.app.runtime.onLaunched.addListener(function() {
30 sendLaunchedAndRunReply();
31 });