From fd8a84a8821873696efa2789bbc910c94040ba0d Mon Sep 17 00:00:00 2001 From: Patrick Brosset Date: Mon, 2 Mar 2015 12:06:41 +0100 Subject: [PATCH] Bug 1137694 - Avoid calling content methods directly in browser_net_sort-03.js; r=past --HG-- extra : rebase_source : 032a534ec480cdc0650f785ed9eb6ccd84b2d12c --- browser/devtools/netmonitor/test/browser.ini | 1 - .../netmonitor/test/browser_net_sort-02.js | 24 +++++++++++++- .../netmonitor/test/browser_net_sort-03.js | 32 ++++++++++++++++--- .../test/html_sorting-test-page.html | 29 ----------------- 4 files changed, 51 insertions(+), 35 deletions(-) diff --git a/browser/devtools/netmonitor/test/browser.ini b/browser/devtools/netmonitor/test/browser.ini index be83a6268d49..297e87ce9325 100644 --- a/browser/devtools/netmonitor/test/browser.ini +++ b/browser/devtools/netmonitor/test/browser.ini @@ -100,7 +100,6 @@ skip-if = e10s # Bug 1091612 [browser_net_sort-01.js] [browser_net_sort-02.js] [browser_net_sort-03.js] -skip-if = (os == 'linux' && e10s && !debug) # bug 1137694 [browser_net_statistics-01.js] [browser_net_statistics-02.js] [browser_net_statistics-03.js] diff --git a/browser/devtools/netmonitor/test/browser_net_sort-02.js b/browser/devtools/netmonitor/test/browser_net_sort-02.js index 7a5eb7e0c9ae..49046d2dd224 100644 --- a/browser/devtools/netmonitor/test/browser_net_sort-02.js +++ b/browser/devtools/netmonitor/test/browser_net_sort-02.js @@ -16,6 +16,26 @@ function test() { let { $, $all, L10N, NetMonitorView } = aMonitor.panelWin; let { RequestsMenu } = NetMonitorView; + // Loading the frame script and preparing the xhr request URLs so we can + // generate some requests later. + loadCommonFrameScript(); + let requests = [{ + url: "sjs_sorting-test-server.sjs?index=1&" + Math.random(), + method: "GET1" + }, { + url: "sjs_sorting-test-server.sjs?index=5&" + Math.random(), + method: "GET5" + }, { + url: "sjs_sorting-test-server.sjs?index=2&" + Math.random(), + method: "GET2" + }, { + url: "sjs_sorting-test-server.sjs?index=4&" + Math.random(), + method: "GET4" + }, { + url: "sjs_sorting-test-server.sjs?index=3&" + Math.random(), + method: "GET3" + }]; + RequestsMenu.lazyUpdate = false; waitForNetworkEvents(aMonitor, 5).then(() => { @@ -269,6 +289,8 @@ function test() { return promise.resolve(null); } - aDebuggee.performRequests(); + performRequestsInContent(requests).then(null, e => { + ok(false, e); + }); }); } diff --git a/browser/devtools/netmonitor/test/browser_net_sort-03.js b/browser/devtools/netmonitor/test/browser_net_sort-03.js index 8a60142cff0b..5e5560c8699e 100644 --- a/browser/devtools/netmonitor/test/browser_net_sort-03.js +++ b/browser/devtools/netmonitor/test/browser_net_sort-03.js @@ -16,6 +16,26 @@ function test() { let { $, $all, L10N, NetMonitorView } = aMonitor.panelWin; let { RequestsMenu } = NetMonitorView; + // Loading the frame script and preparing the xhr request URLs so we can + // generate some requests later. + loadCommonFrameScript(); + let requests = [{ + url: "sjs_sorting-test-server.sjs?index=1&" + Math.random(), + method: "GET1" + }, { + url: "sjs_sorting-test-server.sjs?index=5&" + Math.random(), + method: "GET5" + }, { + url: "sjs_sorting-test-server.sjs?index=2&" + Math.random(), + method: "GET2" + }, { + url: "sjs_sorting-test-server.sjs?index=4&" + Math.random(), + method: "GET4" + }, { + url: "sjs_sorting-test-server.sjs?index=3&" + Math.random(), + method: "GET3" + }]; + RequestsMenu.lazyUpdate = false; waitForNetworkEvents(aMonitor, 5).then(() => { @@ -38,7 +58,7 @@ function test() { }) .then(() => { info("Performing more requests."); - aDebuggee.performRequests(); + performRequestsInContent(requests); return waitForNetworkEvents(aMonitor, 5); }) .then(() => { @@ -54,7 +74,7 @@ function test() { }) .then(() => { info("Performing more requests."); - aDebuggee.performRequests(); + performRequestsInContent(requests); return waitForNetworkEvents(aMonitor, 5); }) .then(() => { @@ -77,7 +97,11 @@ function test() { .then(() => { return teardown(aMonitor); }) - .then(finish); + .then(finish, e => { + ok(false, e); + }); + }, e => { + ok(false, e); }); function testHeaders(aSortType, aDirection) { @@ -191,6 +215,6 @@ function test() { return promise.resolve(null); } - aDebuggee.performRequests(); + performRequestsInContent(requests).then(null, Cu.reportError); }); } diff --git a/browser/devtools/netmonitor/test/html_sorting-test-page.html b/browser/devtools/netmonitor/test/html_sorting-test-page.html index 582d84aeae32..640c58b8e8b3 100644 --- a/browser/devtools/netmonitor/test/html_sorting-test-page.html +++ b/browser/devtools/netmonitor/test/html_sorting-test-page.html @@ -13,35 +13,6 @@

Sorting test

- -