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.
5 function testWindowShape(testId, region) {
6 var createOptions = { id: testId, frame: 'none' };
8 chrome.app.window.create('index.html',
10 chrome.test.callbackPass(function(win) {
15 chrome.app.runtime.onLaunched.addListener(function() {
16 chrome.test.runTests([
18 // Window shape is a single rect.
19 function testWindowShapeSingleRect() {
20 testWindowShape('testWindowShapeSingleRect',
21 {rects: [{left:100, top:50, width:50, height:100}]});
24 // Window shape is multiple rects.
25 function testWindowShapeMultipleRects() {
26 testWindowShape('testWindowShapeMultipleRects',
27 {rects: [{left:100, top:50, width:50, height:100},
28 {left:200, top:100, width:50, height:50}]});
31 // Window shape is null.
32 function testWindowShapeNull() {
33 testWindowShape('testWindowShapeNull', {});
36 // Window shape is empty.
37 function testWindowShapeEmpty() {
38 testWindowShape('testWindowShapeEmpty', {rects: []});