From d41a01a8c992ed6e26acab76cfc312d569d942e6 Mon Sep 17 00:00:00 2001 From: Alexandre Poirot Date: Tue, 31 Jul 2018 07:33:04 -0700 Subject: [PATCH] Bug 1444132 - Fix the order of requests done by html_cause-test-page.html test. r=jdescottes MozReview-Commit-ID: IY8TLzqjrnT --HG-- extra : rebase_source : b01a5cd462d920fe52eadb6b4ba8222d08898972 --- .../netmonitor/test/browser_net_cause.js | 15 ++++--- .../netmonitor/test/html_cause-test-page.html | 44 ++++++++++++------- 2 files changed, 37 insertions(+), 22 deletions(-) diff --git a/devtools/client/netmonitor/test/browser_net_cause.js b/devtools/client/netmonitor/test/browser_net_cause.js index 9744069d5c19..6104874dbd6c 100644 --- a/devtools/client/netmonitor/test/browser_net_cause.js +++ b/devtools/client/netmonitor/test/browser_net_cause.js @@ -38,14 +38,14 @@ const EXPECTED_REQUESTS = [ url: EXAMPLE_URL + "xhr_request", causeType: "xhr", causeUri: CAUSE_URL, - stack: [{ fn: "performXhrRequest", file: CAUSE_FILE_NAME, line: 24 }] + stack: [{ fn: "performXhrRequestCallback", file: CAUSE_FILE_NAME, line: 26 }] }, { method: "GET", url: EXAMPLE_URL + "fetch_request", causeType: "fetch", causeUri: CAUSE_URL, - stack: [{ fn: "performFetchRequest", file: CAUSE_FILE_NAME, line: 28 }] + stack: [{ fn: "performFetchRequest", file: CAUSE_FILE_NAME, line: 31 }] }, { method: "GET", @@ -53,8 +53,9 @@ const EXPECTED_REQUESTS = [ causeType: "fetch", causeUri: CAUSE_URL, stack: [ - { fn: "performPromiseFetchRequest", file: CAUSE_FILE_NAME, line: 40 }, - { fn: null, file: CAUSE_FILE_NAME, line: 39, asyncCause: "promise callback" }, + { fn: "performPromiseFetchRequestCallback", file: CAUSE_FILE_NAME, line: 37 }, + { fn: "performPromiseFetchRequest", file: CAUSE_FILE_NAME, line: 36, + asyncCause: "promise callback" }, ] }, { @@ -63,8 +64,8 @@ const EXPECTED_REQUESTS = [ causeType: "fetch", causeUri: CAUSE_URL, stack: [ - { fn: "performTimeoutFetchRequest", file: CAUSE_FILE_NAME, line: 42 }, - { fn: "performPromiseFetchRequest", file: CAUSE_FILE_NAME, line: 41, + { fn: "performTimeoutFetchRequestCallback2", file: CAUSE_FILE_NAME, line: 44 }, + { fn: "performTimeoutFetchRequestCallback1", file: CAUSE_FILE_NAME, line: 43, asyncCause: "setTimeout handler" }, ] }, @@ -73,7 +74,7 @@ const EXPECTED_REQUESTS = [ url: EXAMPLE_URL + "beacon_request", causeType: "beacon", causeUri: CAUSE_URL, - stack: [{ fn: "performBeaconRequest", file: CAUSE_FILE_NAME, line: 32 }] + stack: [{ fn: "performBeaconRequest", file: CAUSE_FILE_NAME, line: 50 }] }, ]; diff --git a/devtools/client/netmonitor/test/html_cause-test-page.html b/devtools/client/netmonitor/test/html_cause-test-page.html index 3e5a873786db..cf816d0138dc 100644 --- a/devtools/client/netmonitor/test/html_cause-test-page.html +++ b/devtools/client/netmonitor/test/html_cause-test-page.html @@ -17,34 +17,48 @@