| 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 // Navigates to a.html which includes an iframe with a srcdoc attribute. | 11 // Navigates to a.html which includes an iframe with a srcdoc attribute. |
| 12 function srcdoc() { | 12 function srcdoc() { |
| 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 10 matching lines...) Expand all Loading... |
| 39 event: "onCompleted", | 39 event: "onCompleted", |
| 40 details: { frameId: 0, | 40 details: { frameId: 0, |
| 41 processId: 0, | 41 processId: 0, |
| 42 tabId: 0, | 42 tabId: 0, |
| 43 timeStamp: 0, | 43 timeStamp: 0, |
| 44 url: getURL('a.html') }}, | 44 url: getURL('a.html') }}, |
| 45 { label: "b-onBeforeNavigate", | 45 { label: "b-onBeforeNavigate", |
| 46 event: "onBeforeNavigate", | 46 event: "onBeforeNavigate", |
| 47 details: { frameId: 1, | 47 details: { frameId: 1, |
| 48 parentFrameId: 0, | 48 parentFrameId: 0, |
| 49 processId: 0, | 49 processId: -1, |
| 50 tabId: 0, | 50 tabId: 0, |
| 51 timeStamp: 0, | 51 timeStamp: 0, |
| 52 url: 'about:srcdoc' }}, | 52 url: 'about:srcdoc' }}, |
| 53 { label: "b-onCommitted", | 53 { label: "b-onCommitted", |
| 54 event: "onCommitted", | 54 event: "onCommitted", |
| 55 details: { frameId: 1, | 55 details: { frameId: 1, |
| 56 processId: 0, | 56 processId: 0, |
| 57 tabId: 0, | 57 tabId: 0, |
| 58 timeStamp: 0, | 58 timeStamp: 0, |
| 59 transitionQualifiers: [], | 59 transitionQualifiers: [], |
| (...skipping 14 matching lines...) Expand all Loading... |
| 74 timeStamp: 0, | 74 timeStamp: 0, |
| 75 url: 'about:srcdoc' }}], | 75 url: 'about:srcdoc' }}], |
| 76 [ navigationOrder("a-"), | 76 [ navigationOrder("a-"), |
| 77 navigationOrder("b-"), | 77 navigationOrder("b-"), |
| 78 isIFrameOf("b-", "a-")]); | 78 isIFrameOf("b-", "a-")]); |
| 79 chrome.tabs.update(tabId, { url: getURL('a.html') }); | 79 chrome.tabs.update(tabId, { url: getURL('a.html') }); |
| 80 }, | 80 }, |
| 81 ]); | 81 ]); |
| 82 }); | 82 }); |
| 83 }; | 83 }; |
| OLD | NEW |