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

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

Issue 267303003: Promote chrome app window frame color to stable. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 6 years, 7 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
« no previous file with comments | « chrome/common/extensions/api/app_window.idl ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var callbackPass = chrome.test.callbackPass; 5 var callbackPass = chrome.test.callbackPass;
6 var callbackFail = chrome.test.callbackFail; 6 var callbackFail = chrome.test.callbackFail;
7 var defaultFuzzFactor = 1; 7 var defaultFuzzFactor = 1;
8 8
9 function assertFuzzyEq(expected, actual, fuzzFactor, message) { 9 function assertFuzzyEq(expected, actual, fuzzFactor, message) {
10 if (!message) { 10 if (!message) {
(...skipping 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 chrome.app.window.create('test.html', { 1345 chrome.app.window.create('test.html', {
1346 frame: { 1346 frame: {
1347 color: 'DontWorryBeHappy' 1347 color: 'DontWorryBeHappy'
1348 } 1348 }
1349 }, 1349 },
1350 callbackFail('The color specification could not be parsed.')); 1350 callbackFail('The color specification could not be parsed.'));
1351 } 1351 }
1352 ]); 1352 ]);
1353 } 1353 }
1354 1354
1355 function testFrameColorsInStable() {
1356 chrome.test.runTests([
1357 function testWithNoColor() {
1358 chrome.app.window.create('test.html', callbackPass(function(win) {
1359 if (navigator.platform.substr(0, 3).toLowerCase() == "win") {
1360 chrome.test.assertEq(true, win.hasFrameColor);
1361 chrome.test.assertEq(0xFFFFFF, win.activeFrameColor);
1362 chrome.test.assertEq(0xFFFFFF, win.inactiveFrameColor);
1363 } else {
1364 chrome.test.assertEq(false, win.hasFrameColor);
1365 }
1366 win.close();
1367 }));
1368 },
1369
1370 function testWithOptionsGivesError() {
1371 chrome.app.window.create('test.html', {
1372 frame: {
1373 color: '#FFF'
1374 }
1375 },
1376 callbackFail('Frame options are only available in dev channel.'));
1377 }
1378 ]);
1379 }
1380
1381 chrome.app.runtime.onLaunched.addListener(function() { 1355 chrome.app.runtime.onLaunched.addListener(function() {
1382 chrome.test.sendMessage('Launched', function(reply) { 1356 chrome.test.sendMessage('Launched', function(reply) {
1383 window[reply](); 1357 window[reply]();
1384 }); 1358 });
1385 }); 1359 });
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/app_window.idl ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698