OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 function runTests() { | 5 onload = function() { |
6 var getURL = chrome.extension.getURL; | 6 var getURL = chrome.extension.getURL; |
7 chrome.tabs.create({"url": "about:blank"}, function(tab) { | 7 chrome.tabs.create({"url": "about:blank"}, function(tab) { |
8 var tabId = tab.id; | 8 var tabId = tab.id; |
9 | 9 |
10 chrome.test.runTests([ | 10 chrome.test.runTests([ |
11 // First navigates to a.html which redirects to to b.html which uses | 11 // First navigates to a.html which redirects to to b.html which uses |
12 // history.back() to navigate back to a.html | 12 // history.back() to navigate back to a.html |
13 function forwardBack() { | 13 function forwardBack() { |
14 expect([ | 14 expect([ |
15 { label: "a-onBeforeNavigate", | 15 { label: "a-onBeforeNavigate", |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 processId: 0, | 101 processId: 0, |
102 tabId: 0, | 102 tabId: 0, |
103 timeStamp: 0, | 103 timeStamp: 0, |
104 url: getURL('forwardBack/a.html') }}], | 104 url: getURL('forwardBack/a.html') }}], |
105 [ navigationOrder("a-"), navigationOrder("b-"), navigationOrder("c-"), | 105 [ navigationOrder("a-"), navigationOrder("b-"), navigationOrder("c-"), |
106 isLoadedBy("b-", "a-"), isLoadedBy("c-", "b-")]); | 106 isLoadedBy("b-", "a-"), isLoadedBy("c-", "b-")]); |
107 chrome.tabs.update(tabId, { url: getURL('forwardBack/a.html') }); | 107 chrome.tabs.update(tabId, { url: getURL('forwardBack/a.html') }); |
108 }, | 108 }, |
109 ]); | 109 ]); |
110 }); | 110 }); |
111 } | 111 }; |
OLD | NEW |