| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 onload = function() { | 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 middle-click on a link in it. | 11 // Opens a tab and waits for the user to middle-click on a link in it. |
| 12 function requestOpenTab() { | 12 function requestOpenTab() { |
| 13 expect([ | 13 expect([ |
| 14 { label: "a-onBeforeNavigate", | 14 { label: "a-onBeforeNavigate", |
| 15 event: "onBeforeNavigate", | 15 event: "onBeforeNavigate", |
| 16 details: { frameId: 0, | 16 details: { frameId: 0, |
| 17 parentFrameId: -1, | 17 parentFrameId: -1, |
| 18 processId: 0, | 18 processId: -1, |
| 19 tabId: 0, | 19 tabId: 0, |
| 20 timeStamp: 0, | 20 timeStamp: 0, |
| 21 url: getURL('a.html') }}, | 21 url: getURL('a.html') }}, |
| 22 { label: "a-onCommitted", | 22 { label: "a-onCommitted", |
| 23 event: "onCommitted", | 23 event: "onCommitted", |
| 24 details: { frameId: 0, | 24 details: { frameId: 0, |
| 25 processId: 0, | 25 processId: 0, |
| 26 tabId: 0, | 26 tabId: 0, |
| 27 timeStamp: 0, | 27 timeStamp: 0, |
| 28 transitionQualifiers: [], | 28 transitionQualifiers: [], |
| (...skipping 18 matching lines...) Expand all Loading... |
| 47 details: { sourceFrameId: 0, | 47 details: { sourceFrameId: 0, |
| 48 sourceProcessId: 0, | 48 sourceProcessId: 0, |
| 49 sourceTabId: 0, | 49 sourceTabId: 0, |
| 50 tabId: 1, | 50 tabId: 1, |
| 51 timeStamp: 0, | 51 timeStamp: 0, |
| 52 url: getURL('b.html') }}, | 52 url: getURL('b.html') }}, |
| 53 { label: "b-onBeforeNavigate", | 53 { label: "b-onBeforeNavigate", |
| 54 event: "onBeforeNavigate", | 54 event: "onBeforeNavigate", |
| 55 details: { frameId: 0, | 55 details: { frameId: 0, |
| 56 parentFrameId: -1, | 56 parentFrameId: -1, |
| 57 processId: 0, | 57 processId: -1, |
| 58 tabId: 1, | 58 tabId: 1, |
| 59 timeStamp: 0, | 59 timeStamp: 0, |
| 60 url: getURL('b.html') }}, | 60 url: getURL('b.html') }}, |
| 61 { label: "b-onCommitted", | 61 { label: "b-onCommitted", |
| 62 event: "onCommitted", | 62 event: "onCommitted", |
| 63 details: { frameId: 0, | 63 details: { frameId: 0, |
| 64 processId: 0, | 64 processId: 0, |
| 65 tabId: 1, | 65 tabId: 1, |
| 66 timeStamp: 0, | 66 timeStamp: 0, |
| 67 transitionQualifiers: [], | 67 transitionQualifiers: [], |
| (...skipping 18 matching lines...) Expand all Loading... |
| 86 [ "a-onDOMContentLoaded", | 86 [ "a-onDOMContentLoaded", |
| 87 "b-onCreatedNavigationTarget", | 87 "b-onCreatedNavigationTarget", |
| 88 "b-onBeforeNavigate" ]]); | 88 "b-onBeforeNavigate" ]]); |
| 89 | 89 |
| 90 // Notify the api test that we're waiting for the user. | 90 // Notify the api test that we're waiting for the user. |
| 91 chrome.test.notifyPass(); | 91 chrome.test.notifyPass(); |
| 92 }, | 92 }, |
| 93 ]); | 93 ]); |
| 94 }); | 94 }); |
| 95 }; | 95 }; |
| OLD | NEW |