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

Unified Diff: chrome/test/data/extensions/platform_apps/windows_api/test.js

Issue 10436015: Remove chrome.windows.* support for platform apps. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/platform_apps/windows_api/test.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/platform_apps/windows_api/test.js
diff --git a/chrome/test/data/extensions/platform_apps/windows_api/test.js b/chrome/test/data/extensions/platform_apps/windows_api/test.js
index 2e71c9bf21d0d0f67e1e2216fb27a217c528cd9d..8ef951fddb146841fc48d6b1f84688617a2e0e3c 100644
--- a/chrome/test/data/extensions/platform_apps/windows_api/test.js
+++ b/chrome/test/data/extensions/platform_apps/windows_api/test.js
@@ -5,51 +5,22 @@
var callbackPass = chrome.test.callbackPass;
chrome.experimental.app.onLaunched.addListener(function() {
- // Only a few chrome.windows.* API methods are tested, it is assumed that the
- // full API is tested elsewhere.
chrome.test.runTests([
function testCreateWindow() {
- var getShellWindowCount = function(callback) {
- chrome.windows.getAll(function(windows) {
- callback(windows.filter(
- function(window) { return window.type == 'shell' }).length);
- });
- };
-
- getShellWindowCount(callbackPass(function(shellWindowCount) {
- chrome.test.assertEq(0, shellWindowCount);
- chrome.windows.create(
- {type: 'shell', width: 128, height: 128},
- callbackPass(function() {
- getShellWindowCount(callbackPass(function(shellWindowCount) {
- chrome.test.assertEq(1, shellWindowCount);
- }));
- }));
- }));
- },
-
- function testUpdateWindowWidth() {
- chrome.windows.create(
- {type: 'shell', width: 128, height: 128},
- callbackPass(function(window) {
- chrome.windows.update(
- window.id,
- // 256 is a width that will snap to the Aura grid, thus this
- // should be the actual width on Aura (when read back).
- {width: 256, height: 128},
- callbackPass(function() {
- // The timeout is rather lame, but reading back the width from
- // the window manager (on Linux) immediately still reports the
- // old value.
- setTimeout(callbackPass(function() {
- chrome.windows.getCurrent(callbackPass(function(window) {
- chrome.test.assertEq(256, window.width);
- }));
- }), 1000);
- }));
- }));
- },
-
+ chrome.appWindow.create('test.html', {}, callbackPass(function (win) {
+ chrome.test.assertTrue(win.true);
Mihai Parparita -not on Chrome 2012/05/24 21:16:04 Does this actually work? "true" is not a property
jeremya 2012/05/28 04:30:03 Oops, right you are.
+ }))
+ },
+ function testUpdateWindowWidth() {
+ chrome.windows.create('test.html', {width: 128, height: 128},
Mihai Parparita -not on Chrome 2012/05/24 21:16:04 This needs to be updated to chrome.appWindow.creat
jeremya 2012/05/28 04:30:03 Can you tell I didn't run the tests? >_>
+ callbackPass(function(win) {
+ chrome.test.assertEq(win.outerWidth, 128)
+ chrome.test.assertEq(win.outerHeight, 128)
+ win.resizeTo(256, 128)
+ chrome.test.assertEq(win.outerWidth, 256)
+ chrome.test.assertEq(win.outerHeight, 128)
+ }));
+ },
]);
});
« no previous file with comments | « chrome/test/data/extensions/platform_apps/windows_api/test.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698