| 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 // Reference fragment navigation. | 11 // Reference fragment navigation. |
| 12 function referenceFragment() { | 12 function referenceFragment() { |
| 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 21 matching lines...) Expand all Loading... |
| 50 timeStamp: 0, | 50 timeStamp: 0, |
| 51 transitionQualifiers: ["client_redirect"], | 51 transitionQualifiers: ["client_redirect"], |
| 52 transitionType: "link", | 52 transitionType: "link", |
| 53 url: getURL('a.html#anchor') }}], | 53 url: getURL('a.html#anchor') }}], |
| 54 [ navigationOrder("a-") ]); | 54 [ navigationOrder("a-") ]); |
| 55 chrome.tabs.update(tabId, { url: getURL('a.html') }); | 55 chrome.tabs.update(tabId, { url: getURL('a.html') }); |
| 56 }, | 56 }, |
| 57 ]); | 57 ]); |
| 58 }); | 58 }); |
| 59 }; | 59 }; |
| OLD | NEW |