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 // Navigates to an URL. | 11 // Navigates to an URL. |
12 function simpleLoad() { | 12 function simpleLoad() { |
13 expect([ | 13 expect([ |
14 { label: "a-onBeforeNavigate", | 14 { label: "a-onBeforeNavigate", |
15 event: "onBeforeNavigate", | 15 event: "onBeforeNavigate", |
(...skipping 23 matching lines...) Expand all Loading... |
39 details: { frameId: 0, | 39 details: { frameId: 0, |
40 processId: 0, | 40 processId: 0, |
41 tabId: 0, | 41 tabId: 0, |
42 timeStamp: 0, | 42 timeStamp: 0, |
43 url: getURL('simpleLoad/a.html') }}], | 43 url: getURL('simpleLoad/a.html') }}], |
44 [ navigationOrder("a-") ]); | 44 [ navigationOrder("a-") ]); |
45 chrome.tabs.update(tabId, { url: getURL('simpleLoad/a.html') }); | 45 chrome.tabs.update(tabId, { url: getURL('simpleLoad/a.html') }); |
46 }, | 46 }, |
47 ]); | 47 ]); |
48 }); | 48 }); |
49 } | 49 }; |
OLD | NEW |