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

Unified Diff: chrome/test/data/extensions/api_test/webnavigation/test_userAction.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_userAction.js
diff --git a/chrome/test/data/extensions/api_test/webnavigation/test_userAction.js b/chrome/test/data/extensions/api_test/webnavigation/test_userAction.js
index 7c2d09ce7427afb820bcff976180eab0fb525960..6f80aa2c4828341ef13e24ba747fda126a691ec1 100644
--- a/chrome/test/data/extensions/api_test/webnavigation/test_userAction.js
+++ b/chrome/test/data/extensions/api_test/webnavigation/test_userAction.js
@@ -11,56 +11,70 @@ function runTests() {
// Opens a tab and waits for the user to click on a link in it.
function userAction() {
expect([
- [ "onBeforeNavigate",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- url: getURL('userAction/a.html') }],
- [ "onCommitted",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- transitionQualifiers: [],
- transitionType: "typed",
- url: getURL('userAction/a.html') }],
- [ "onDOMContentLoaded",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- url: getURL('userAction/a.html') }],
- [ "onCompleted",
- { frameId: 0,
- tabId: 0,
- timeStamp: 0,
- url: getURL('userAction/a.html') }],
- [ "onCreatedNavigationTarget",
- { sourceFrameId: 0,
- sourceTabId: 0,
- tabId: 1,
- timeStamp: 0,
- url: getURL('userAction/b.html') }],
- [ "onBeforeNavigate",
- { frameId: 0,
- tabId: 1,
- timeStamp: 0,
- url: getURL('userAction/b.html') }],
- [ "onCommitted",
- { frameId: 0,
- tabId: 1,
- timeStamp: 0,
- transitionQualifiers: [],
- transitionType: "link",
- url: getURL('userAction/b.html') }],
- [ "onDOMContentLoaded",
- { frameId: 0,
- tabId: 1,
- timeStamp: 0,
- url: getURL('userAction/b.html') }],
- [ "onCompleted",
- { frameId: 0,
- tabId: 1,
- timeStamp: 0,
- url: getURL('userAction/b.html') }]]);
+ { label: "a-onBeforeNavigate",
+ event: "onBeforeNavigate",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: getURL('userAction/a.html') }},
+ { label: "a-onCommitted",
+ event: "onCommitted",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ transitionQualifiers: [],
+ transitionType: "typed",
+ url: getURL('userAction/a.html') }},
+ { label: "a-onDOMContentLoaded",
+ event: "onDOMContentLoaded",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: getURL('userAction/a.html') }},
+ { label: "a-onCompleted",
+ event: "onCompleted",
+ details: { frameId: 0,
+ tabId: 0,
+ timeStamp: 0,
+ url: getURL('userAction/a.html') }},
+ { label: "b-onCreatedNavigationTarget",
+ event: "onCreatedNavigationTarget",
+ details: { sourceFrameId: 0,
+ sourceTabId: 0,
+ tabId: 1,
+ timeStamp: 0,
+ url: getURL('userAction/b.html') }},
+ { label: "b-onBeforeNavigate",
+ event: "onBeforeNavigate",
+ details: { frameId: 0,
+ tabId: 1,
+ timeStamp: 0,
+ url: getURL('userAction/b.html') }},
+ { label: "b-onCommitted",
+ event: "onCommitted",
+ details: { frameId: 0,
+ tabId: 1,
+ timeStamp: 0,
+ transitionQualifiers: [],
+ transitionType: "link",
+ url: getURL('userAction/b.html') }},
+ { label: "b-onDOMContentLoaded",
+ event: "onDOMContentLoaded",
+ details: { frameId: 0,
+ tabId: 1,
+ timeStamp: 0,
+ url: getURL('userAction/b.html') }},
+ { label: "b-onCompleted",
+ event: "onCompleted",
+ details: { frameId: 0,
+ tabId: 1,
+ timeStamp: 0,
+ url: getURL('userAction/b.html') }}],
+ [ navigationOrder("a-"),
+ navigationOrder("b-"),
+ [ "a-onDOMContentLoaded",
+ "b-onCreatedNavigationTarget",
+ "b-onBeforeNavigate" ]]);
// Notify the api test that we're waiting for the user.
chrome.test.notifyPass();

Powered by Google App Engine
This is Rietveld 408576698