[Cronet] Delay StartNetLog and StopNetLog until native request context is initialized
[chromium-blink-merge.git] / chrome / test / data / extensions / platform_apps / get_display_path / test.js
blobc789c3047ac64ea96a2dc64db58ea6aea7cfd001
1 // Copyright (c) 2012 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 chrome.app.runtime.onLaunched.addListener(function (launchData) {
6 // Test that the isKioskSession field is |false| and the items field is
7 // populated correctly in the launch data and that the FileEntry in
8 // launchData.items[0].entry can have its display path gotten.
9 chrome.test.runTests([
10 function testGetDisplayPath() {
11 chrome.test.assertFalse(!launchData, "No launchData");
12 chrome.test.assertFalse(launchData.isKioskSession,
13 "launchData.isKioskSession incorrect");
14 chrome.test.assertFalse(!launchData.items[0], "No launchData.items[0]");
15 chrome.test.assertFalse(!launchData.items[0].entry,
16 "No launchData.items[0].entry");
17 var entry = launchData.items[0].entry;
18 chrome.fileSystem.getDisplayPath(entry,
19 chrome.test.callbackPass(function(path) {
20 chrome.test.assertFalse(path.indexOf('test.txt') == -1);
21 }));
23 ]);
24 });