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
3 // found in the LICENSE file.
6 var getURL = chrome.extension.getURL;
7 chrome.tabs.create({"url": "about:blank"}, function(tab) {
10 chrome.test.runTests([
11 // Navigates to a.html which includes an iframe with a srcdoc attribute.
14 { label: "a-onBeforeNavigate",
15 event: "onBeforeNavigate",
16 details: { frameId: 0,
21 url: getURL('srcdoc/a.html') }},
22 { label: "a-onCommitted",
24 details: { frameId: 0,
28 transitionQualifiers: [],
29 transitionType: "link",
30 url: getURL('srcdoc/a.html') }},
31 { label: "a-onDOMContentLoaded",
32 event: "onDOMContentLoaded",
33 details: { frameId: 0,
37 url: getURL('srcdoc/a.html') }},
38 { label: "a-onCompleted",
40 details: { frameId: 0,
44 url: getURL('srcdoc/a.html') }},
45 { label: "b-onBeforeNavigate",
46 event: "onBeforeNavigate",
47 details: { frameId: 1,
52 url: 'about:srcdoc' }},
53 { label: "b-onCommitted",
55 details: { frameId: 1,
59 transitionQualifiers: [],
60 transitionType: "auto_subframe",
61 url: 'about:srcdoc' }},
62 { label: "b-onDOMContentLoaded",
63 event: "onDOMContentLoaded",
64 details: { frameId: 1,
68 url: 'about:srcdoc' }},
69 { label: "b-onCompleted",
71 details: { frameId: 1,
75 url: 'about:srcdoc' }}],
76 [ navigationOrder("a-"),
77 navigationOrder("b-"),
78 isIFrameOf("b-", "a-")]);
79 chrome.tabs.update(tabId, { url: getURL('srcdoc/a.html') });