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

Side by Side Diff: chrome/test/data/extensions/api_test/tabs/basics/relative_urls.js

Issue 8762014: Move another set of extension tests to manifest_version 2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years 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
(Empty)
1 // Copyright (c) 2011 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 firstWindowId;
6 var relativePageLoaded;
7
8 chrome.test.runTests([
9 function setupRelativeUrlTests() {
10 createWindow(["about:blank"], {}, pass(function(winId, tabIds) {
11 firstWindowId = winId;
12 }));
13 },
14
15 function relativeUrlTestsTabsCreate() {
16 // Will be called from relative.html
17 relativePageLoaded = chrome.test.callbackAdded();
18 var createCompleted = chrome.test.callbackAdded();
19
20 chrome.tabs.create({windowId: firstWindowId, url: 'relative.html'},
21 function(tab){
22 testTabId = tab.id;
23 createCompleted();
24 }
25 );
26 },
27
28 function relativeUrlTestsTabsUpdate() {
29 // Will be called from relative.html
30 relativePageLoaded = chrome.test.callbackAdded();
31
32 chrome.tabs.update(testTabId, {url: pageUrl("a")}, function(tab) {
33 chrome.test.assertEq(pageUrl("a"), tab.url);
34 chrome.tabs.update(tab.id, {url: "relative.html"}, function(tab) {
35 });
36 });
37 },
38
39 function relativeUrlTestsWindowCreate() {
40 // Will be called from relative.html
41 relativePageLoaded = chrome.test.callbackAdded();
42
43 chrome.windows.create({url: "relative.html"});
44 }
45
46 ]);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698