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

Side by Side Diff: chrome/test/data/extensions/api_test/get_views/test.js

Issue 7635019: Set Extension Infobars to have a fixed height determined by the developer (clamped to sane min an... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // API test for chrome.extension.getViews. 5 // API test for chrome.extension.getViews.
6 // browser_tests.exe --gtest_filter=ExtensionApiTest.GetViews 6 // browser_tests.exe --gtest_filter=ExtensionApiTest.GetViews
7 7
8 const assertEq = chrome.test.assertEq; 8 const assertEq = chrome.test.assertEq;
9 const assertTrue = chrome.test.assertTrue; 9 const assertTrue = chrome.test.assertTrue;
10 10
(...skipping 26 matching lines...) Expand all
37 assertEq(1, chrome.extension.getViews().length); 37 assertEq(1, chrome.extension.getViews().length);
38 assertEq(0, chrome.extension.getViews({"type": "tab"}).length); 38 assertEq(0, chrome.extension.getViews({"type": "tab"}).length);
39 assertEq(0, chrome.extension.getViews({"type": "infobar"}).length); 39 assertEq(0, chrome.extension.getViews({"type": "infobar"}).length);
40 assertEq(0, chrome.extension.getViews({"type": "notification"}).length); 40 assertEq(0, chrome.extension.getViews({"type": "notification"}).length);
41 41
42 chrome.windows.getAll({populate: true}, function(windows) { 42 chrome.windows.getAll({populate: true}, function(windows) {
43 assertEq(1, windows.length); 43 assertEq(1, windows.length);
44 44
45 // Show an infobar. 45 // Show an infobar.
46 chrome.experimental.infobars.show({tabId: windows[0].tabs[0].id, 46 chrome.experimental.infobars.show({tabId: windows[0].tabs[0].id,
47 "path": "infobar.html"}, 47 "path": "infobar.html",
48 "height": 36},
48 function(window) { 49 function(window) {
49 assertTrue(window.id > 0); 50 assertTrue(window.id > 0);
50 // The infobar will call back to us through infobarCallback (above). 51 // The infobar will call back to us through infobarCallback (above).
51 }); 52 });
52 53
53 }); 54 });
54 } 55 }
55 ]; 56 ];
56 57
57 chrome.test.runTests(tests); 58 chrome.test.runTests(tests);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698