Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / chrome / test / data / extensions / platform_apps / windows_api_alpha_enabled / wrong_frame_type / background.js
1 // Copyright 2014 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.
4
5 var error = 'The alphaEnabled option can only be used with "frame: \'none\'".';
6
7 chrome.app.runtime.onLaunched.addListener(function() {
8   chrome.test.runTests([
9     function testAlphaEnabledFrameNone() {
10       chrome.app.window.create('index.html', {
11         frame: 'none',
12         alphaEnabled: true,
13       }, chrome.test.callbackPass(function (win) {}));
14     },
15     function testAlphaEnabledFrameChrome() {
16       chrome.app.window.create('index.html', {
17         alphaEnabled: true,
18       }, chrome.test.callbackFail(error));
19     },
20     function testAlphaDisabledFrameChrome() {
21       chrome.app.window.create('index.html', {
22       }, chrome.test.callbackPass(function (win) {}));
23     },
24   ]);
25 });
26