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

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

Issue 9796012: Revert 127833 - Re-land alexbost's experimental offscreenTabs API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « chrome/test/data/extensions/api_test/offscreen_tabs/mouse_events.js ('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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 var pass = chrome.test.callbackPass;
6 var fail = chrome.test.callbackFail;
7 var assertEq = chrome.test.assertEq;
8 var assertTrue = chrome.test.assertTrue;
9 var assertFalse = chrome.test.assertFalse;
10
11 var Q_KEY = 113;
12
13 function assertEqTabs(tab1, tab2) {
14 assertEq(tab1.id, tab2.id);
15 assertSimilarTabs(tab1, tab2);
16 }
17
18 function maybeExpandURL(url) {
19 if (url.match('chrome-extension'))
20 return url;
21 return chrome.extension.getURL(url);
22 }
23
24 function assertSimilarTabs(tab1, tab2) {
25 assertEq(maybeExpandURL(tab1.url), maybeExpandURL(tab2.url));
26 assertEq(tab1.width, tab2.width);
27 assertEq(tab1.height, tab2.height);
28 }
29
30 function assertTabDoesNotExist(tabId) {
31 var expectedError = 'No offscreen tab with id: ' + tabId + '.';
32 chrome.experimental.offscreenTabs.get(tabId, fail(expectedError));
33 }
34
35 function getBaseMouseEvent() {
36 return {
37 button: 0,
38 altKey: false,
39 ctrlKey: false,
40 shiftKey: false
41 };
42 };
43
44 function getKeyboardEvent(keyCode) {
45 return {
46 type: 'keypress',
47 charCode: keyCode,
48 keyCode: keyCode,
49 altKey: false,
50 ctrlKey: false,
51 shiftKey: false
52 };
53 }
OLDNEW
« no previous file with comments | « chrome/test/data/extensions/api_test/offscreen_tabs/mouse_events.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698