Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8494)

Unified Diff: chrome/test/data/extensions/api_test/webnavigation/test_srcdoc.js

Issue 11791018: When an iframe displays its srcdoc, generate navigation events for about:srcdoc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/data/extensions/api_test/webnavigation/test_srcdoc.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/extensions/api_test/webnavigation/test_srcdoc.js
diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_clientRedirect.js b/chrome/test/data/extensions/api_test/webnavigation/test_srcdoc.js
similarity index 68%
copy from chrome/test/data/extensions/api_test/webnavigation/test_clientRedirect.js
copy to chrome/test/data/extensions/api_test/webnavigation/test_srcdoc.js
index d1b9b9c9620eec5f4725dd6ff038c4b236fb5c1e..8f1e0fd28444ba18a803b117cb44b9d9e6a06ab9 100644
--- a/chrome/test/data/extensions/api_test/webnavigation/test_clientRedirect.js
+++ b/chrome/test/data/extensions/api_test/webnavigation/test_srcdoc.js
@@ -6,9 +6,10 @@ onload = function() {
var getURL = chrome.extension.getURL;
chrome.tabs.create({"url": "about:blank"}, function(tab) {
var tabId = tab.id;
+
chrome.test.runTests([
- // Navigates to a.html that redirects to b.html (using javascript).
- function clientRedirect() {
+ // Navigates to a.html which includes an iframe with a srcdoc attribute.
+ function srcdoc() {
expect([
{ label: "a-onBeforeNavigate",
event: "onBeforeNavigate",
@@ -17,7 +18,7 @@ onload = function() {
processId: 0,
tabId: 0,
timeStamp: 0,
- url: getURL('clientRedirect/a.html') }},
+ url: getURL('srcdoc/a.html') }},
{ label: "a-onCommitted",
event: "onCommitted",
details: { frameId: 0,
@@ -26,56 +27,56 @@ onload = function() {
timeStamp: 0,
transitionQualifiers: [],
transitionType: "link",
- url: getURL('clientRedirect/a.html') }},
+ url: getURL('srcdoc/a.html') }},
{ label: "a-onDOMContentLoaded",
event: "onDOMContentLoaded",
details: { frameId: 0,
processId: 0,
tabId: 0,
timeStamp: 0,
- url: getURL('clientRedirect/a.html') }},
+ url: getURL('srcdoc/a.html') }},
{ label: "a-onCompleted",
event: "onCompleted",
details: { frameId: 0,
processId: 0,
tabId: 0,
timeStamp: 0,
- url: getURL('clientRedirect/a.html') }},
+ url: getURL('srcdoc/a.html') }},
{ label: "b-onBeforeNavigate",
event: "onBeforeNavigate",
- details: { frameId: 0,
- parentFrameId: -1,
+ details: { frameId: 1,
+ parentFrameId: 0,
processId: 0,
tabId: 0,
timeStamp: 0,
- url: getURL('clientRedirect/b.html') }},
+ url: 'about:srcdoc' }},
{ label: "b-onCommitted",
event: "onCommitted",
- details: { frameId: 0,
+ details: { frameId: 1,
processId: 0,
tabId: 0,
timeStamp: 0,
- transitionQualifiers: ["client_redirect"],
- transitionType: "link",
- url: getURL('clientRedirect/b.html') }},
+ transitionQualifiers: [],
+ transitionType: "auto_subframe",
+ url: 'about:srcdoc' }},
{ label: "b-onDOMContentLoaded",
event: "onDOMContentLoaded",
- details: { frameId: 0,
+ details: { frameId: 1,
processId: 0,
tabId: 0,
timeStamp: 0,
- url: getURL('clientRedirect/b.html') }},
+ url: 'about:srcdoc' }},
{ label: "b-onCompleted",
event: "onCompleted",
- details: { frameId: 0,
+ details: { frameId: 1,
processId: 0,
tabId: 0,
timeStamp: 0,
- url: getURL('clientRedirect/b.html') }}],
+ url: 'about:srcdoc' }}],
[ navigationOrder("a-"),
navigationOrder("b-"),
- isLoadedBy("b-", "a-") ]);
- chrome.tabs.update(tabId, { url: getURL('clientRedirect/a.html') });
+ isIFrameOf("b-", "a-")]);
+ chrome.tabs.update(tabId, { url: getURL('srcdoc/a.html') });
},
]);
});
« no previous file with comments | « chrome/test/data/extensions/api_test/webnavigation/test_srcdoc.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698