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

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

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
1 <!--
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. Use of this
3 * source code is governed by a BSD-style license that can be found in the
4 * LICENSE file.
5 -->
1 <script src="tabs_util.js"></script> 6 <script src="tabs_util.js"></script>
2 7 <script src="relative_urls.js"></script>
3 <script>
4 var firstWindowId;
5 var relativePageLoaded;
6
7 chrome.test.runTests([
8 function setupRelativeUrlTests() {
9 createWindow(["about:blank"], {}, pass(function(winId, tabIds) {
10 firstWindowId = winId;
11 }));
12 },
13
14 function relativeUrlTestsTabsCreate() {
15 // Will be called from relative.html
16 relativePageLoaded = chrome.test.callbackAdded();
17 var createCompleted = chrome.test.callbackAdded();
18
19 chrome.tabs.create({windowId: firstWindowId, url: 'relative.html'},
20 function(tab){
21 testTabId = tab.id;
22 createCompleted();
23 }
24 );
25 },
26
27 function relativeUrlTestsTabsUpdate() {
28 // Will be called from relative.html
29 relativePageLoaded = chrome.test.callbackAdded();
30
31 chrome.tabs.update(testTabId, {url: pageUrl("a")}, function(tab) {
32 chrome.test.assertEq(pageUrl("a"), tab.url);
33 chrome.tabs.update(tab.id, {url: "relative.html"}, function(tab) {
34 });
35 });
36 },
37
38 function relativeUrlTestsWindowCreate() {
39 // Will be called from relative.html
40 relativePageLoaded = chrome.test.callbackAdded();
41
42 chrome.windows.create({url: "relative.html"});
43 }
44
45 ]);
46 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698