Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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() { | |
|
Matt Giuca
2014/05/07 11:48:34
Maybe you should keep this test (at least for a wh
benwells
2014/05/08 02:43:18
Yeah, I'll keep it around for a little while. Not
Matt Giuca
2014/05/08 04:30:14
Ah that makes sense.
| |
| 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 }); |
| OLD | NEW |