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.
6 var relativePageLoaded;
9 function setupRelativeUrlTests() {
10 createWindow(["about:blank"], {}, pass(function(winId, tabIds) {
11 firstWindowId = winId;
15 function relativeUrlTestsTabsCreate() {
16 // Will be called from relative.html
17 relativePageLoaded = chrome.test.callbackAdded();
18 var createCompleted = chrome.test.callbackAdded();
20 chrome.tabs.create({windowId: firstWindowId, url: 'relative.html'},
28 function relativeUrlTestsTabsUpdate() {
29 // Will be called from relative.html
30 relativePageLoaded = chrome.test.callbackAdded();
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) {
39 function relativeUrlTestsWindowCreate() {
40 // Will be called from relative.html
41 relativePageLoaded = chrome.test.callbackAdded();
43 chrome.windows.create({url: "relative.html"});