Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: chrome/test/data/extensions/platform_apps/windows_api_shape/background.js

Issue 456943004: Fix SetShape (SetAlphaShape) to allow Null regions (+ tests). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add missing delete; Remove unnecessary layer check" Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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 function testWindowShape(testId, region) {
6 var createOptions = { id: testId, frame: 'none' };
7
8 chrome.app.window.create('index.html',
9 createOptions,
10 chrome.test.callbackPass(function(win) {
11 win.setShape(region)
12 }));
13 }
14
15 chrome.app.runtime.onLaunched.addListener(function() {
16 chrome.test.runTests([
17
18 // Window shape is a single rect.
19 function testWindowShapeSingleRect() {
20 testWindowShape('testWindowShapeSingleRect',
21 {rects: [{left:100, top:50, width:50, height:100}]});
22 },
23
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}]});
29 },
30
31 // Window shape is null.
32 function testWindowShapeNull() {
33 testWindowShape('testWindowShapeNull', {});
34 },
35
36 // Window shape is empty.
37 function testWindowShapeEmpty() {
38 testWindowShape('testWindowShapeEmpty', {rects: []});
39 },
40
41 ]);
42 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698