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 a.html which includes b.html as an iframe. b.html | 11 // Navigates to a.html which includes b.html as an iframe. b.html |
12 // redirects to c.html. | 12 // redirects to c.html. |
13 function iframe() { | 13 function iframe() { |
14 expect([ | 14 expect([ |
15 { label: "a-onBeforeNavigate", | 15 { label: "a-onBeforeNavigate", |
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 url: getURL('iframe/c.html') }}], | 342 url: getURL('iframe/c.html') }}], |
343 [ navigationOrder("h-"), | 343 [ navigationOrder("h-"), |
344 navigationOrder("i-"), | 344 navigationOrder("i-"), |
345 navigationOrder("c-"), | 345 navigationOrder("c-"), |
346 isIFrameOf("i-", "h-"), | 346 isIFrameOf("i-", "h-"), |
347 isLoadedBy("c-", "i-") ]); | 347 isLoadedBy("c-", "i-") ]); |
348 chrome.tabs.update(tabId, { url: getURL('iframe/h.html') }); | 348 chrome.tabs.update(tabId, { url: getURL('iframe/h.html') }); |
349 }, | 349 }, |
350 ]); | 350 ]); |
351 }); | 351 }); |
352 } | 352 }; |
OLD | NEW |