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 // Opens a tab and waits for the user to click on a link in it. | 11 // Opens a tab and waits for the user to click on a link in it. |
12 function userAction() { | 12 function userAction() { |
13 expect([ | 13 expect([ |
14 { label: "a-onBeforeNavigate", | 14 { label: "a-onBeforeNavigate", |
15 event: "onBeforeNavigate", | 15 event: "onBeforeNavigate", |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 navigationOrder("b-"), | 83 navigationOrder("b-"), |
84 [ "a-onDOMContentLoaded", | 84 [ "a-onDOMContentLoaded", |
85 "b-onCreatedNavigationTarget", | 85 "b-onCreatedNavigationTarget", |
86 "b-onBeforeNavigate" ]]); | 86 "b-onBeforeNavigate" ]]); |
87 | 87 |
88 // Notify the api test that we're waiting for the user. | 88 // Notify the api test that we're waiting for the user. |
89 chrome.test.notifyPass(); | 89 chrome.test.notifyPass(); |
90 }, | 90 }, |
91 ]); | 91 ]); |
92 }); | 92 }); |
93 } | 93 }; |
OLD | NEW |