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

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

Issue 6378009: Only allow extension pages to be displayed in the sidebar to be consistent... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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.experimental.sidebar. 5 // API test for chrome.experimental.sidebar.
6 // browser_tests.exe --gtest_filter=SidebarApiTest.Sidebar 6 // browser_tests.exe --gtest_filter=SidebarApiTest.Sidebar
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 const pass = chrome.test.callbackPass; 10 const pass = chrome.test.callbackPass;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 }); 199 });
200 }); 200 });
201 }); 201 });
202 }); 202 });
203 }); 203 });
204 }, 204 },
205 205
206 function navigateSidebar() { 206 function navigateSidebar() {
207 showSidebarForCurrentTab(function() { 207 showSidebarForCurrentTab(function() {
208 expandSidebarForCurrentTab(function() { 208 expandSidebarForCurrentTab(function() {
209 chrome.sidebar.navigate({url: 'simple_page.html'}); 209 chrome.sidebar.navigate({path: 'simple_page.html'});
210 hideSidebarForCurrentTab(pass()); 210 hideSidebarForCurrentTab(pass());
211 }); 211 });
212 }); 212 });
213 }, 213 },
214 214
215 function crashTest() { 215 function crashTest() {
216 // Chrome should not crash on this request. 216 // Chrome should not crash on this request.
217 chrome.sidebar.getState(undefined, function(state) { 217 chrome.sidebar.getState(undefined, function(state) {
218 assertEq('hidden', state); 218 assertEq('hidden', state);
219 chrome.sidebar.getState(null, function(state) { 219 chrome.sidebar.getState(null, function(state) {
(...skipping 17 matching lines...) Expand all
237 // TODO(alekseys): test unicode strings. 237 // TODO(alekseys): test unicode strings.
238 chrome.sidebar.setBadgeText({text: 'Some random text'}); 238 chrome.sidebar.setBadgeText({text: 'Some random text'});
239 chrome.sidebar.setIcon({path: 'icon.png'}); 239 chrome.sidebar.setIcon({path: 'icon.png'});
240 chrome.sidebar.setTitle({title: 'Some random title'}); 240 chrome.sidebar.setTitle({title: 'Some random title'});
241 hideSidebarForCurrentTab(pass()); 241 hideSidebarForCurrentTab(pass());
242 }); 242 });
243 } 243 }
244 ]; 244 ];
245 245
246 chrome.test.runTests(tests); 246 chrome.test.runTests(tests);
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_sidebar_utils.cc ('k') | chrome/test/data/extensions/manifest_tests/sidebar.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698