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

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

Issue 7859014: Refactor ExtensionApiTest.WebNavigationEvents* to not rely on window.setTimeout (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 9 years, 3 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
Index: chrome/test/data/extensions/api_test/webnavigation/test_clientRedirect.js
diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_clientRedirect.js b/chrome/test/data/extensions/api_test/webnavigation/test_clientRedirect.js
index a6ed172a3ce3ab38946f49b05d2784ca512f0a23..79082c81379bbe388c923b6d8f5f15ae218cc204 100644
--- a/chrome/test/data/extensions/api_test/webnavigation/test_clientRedirect.js
+++ b/chrome/test/data/extensions/api_test/webnavigation/test_clientRedirect.js
@@ -7,55 +7,64 @@ function runTests() {
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)
- // after a delay of 500ms, so the initial navigation is completed and
- // the redirection is marked as client_redirect.
+ // Navigates to a.html that redirects to b.html (using javascript).
function clientRedirect() {
expect([
- [ "onBeforeNavigate",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- url: getURL('clientRedirect/a.html') }],
- [ "onCommitted",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- transitionQualifiers: [],
- transitionType: "link",
- url: getURL('clientRedirect/a.html') }],
- [ "onDOMContentLoaded",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- url: getURL('clientRedirect/a.html') }],
- [ "onCompleted",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- url: getURL('clientRedirect/a.html') }],
- [ "onBeforeNavigate",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- url: getURL('clientRedirect/b.html') }],
- [ "onCommitted",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- transitionQualifiers: ["client_redirect"],
- transitionType: "link",
- url: getURL('clientRedirect/b.html') }],
- [ "onDOMContentLoaded",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- url: getURL('clientRedirect/b.html') }],
- [ "onCompleted",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- url: getURL('clientRedirect/b.html') }]]);
+ { label: "a-onBeforeNavigate",
+ event: "onBeforeNavigate",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: getURL('clientRedirect/a.html') }},
+ { label: "a-onCommitted",
+ event: "onCommitted",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ transitionQualifiers: [],
+ transitionType: "link",
+ url: getURL('clientRedirect/a.html') }},
+ { label: "a-onDOMContentLoaded",
+ event: "onDOMContentLoaded",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: getURL('clientRedirect/a.html') }},
+ { label: "a-onCompleted",
+ event: "onCompleted",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: getURL('clientRedirect/a.html') }},
+ { label: "b-onBeforeNavigate",
+ event: "onBeforeNavigate",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: getURL('clientRedirect/b.html') }},
+ { label: "b-onCommitted",
+ event: "onCommitted",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ transitionQualifiers: ["client_redirect"],
+ transitionType: "link",
+ url: getURL('clientRedirect/b.html') }},
+ { label: "b-onDOMContentLoaded",
+ event: "onDOMContentLoaded",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: getURL('clientRedirect/b.html') }},
+ { label: "b-onCompleted",
+ event: "onCompleted",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: getURL('clientRedirect/b.html') }}],
+ [ navigationOrder("a-"),
+ navigationOrder("b-"),
+ isLoadedBy("b-", "a-") ]);
chrome.tabs.update(tabId, { url: getURL('clientRedirect/a.html') });
},
]);

Powered by Google App Engine
This is Rietveld 408576698