Commit Graph

6281 Commits

Author SHA1 Message Date
Andrew McCreight
2b7c6b4c81 Bug 1592465 - Modernize browser_bug343515.js. r=bzbarsky
I rewrote BrowserUtils.addContentEventListener(), and that caused an
intermittent failure in browser_bug343515.js. The use of
addContentEventListener in the test is questionable, and the test as a
whole is old, so I freshened it up.

Instead of nShotsListener (and oneShotListener, which is a special
case of that) which waits for a hard coded number of load events to
fire to ensure that a page and its subframes are all loaded, I use
BrowserTestUtils.browserLoaded().

Instead of waitForPageshow, which runs a script in the content process
that waits for an event, it uses BrowserTestUtils.waitForContentEvent,
which does the same thing in a hopefully more resilient fashion.

The largest change in terms of number of characters changed is that I
rewrote the test so that it is written inside of a single add_task
async function, instead of being split into a chain of async
functions. I also used await to flatten a lot of .then() chained
things.

I fixed up some variable shadowing. There was some trickiness around
shadowed variable names being used as field names, so I introduced an
intermediate 'data' variable to hold the structure.

Finally, I call BrowserTestUtils.removeTab() instead of calling
removeTab() directly on the browser. I figured that was probably
better, though maybe it does not matter.

I added a check after each step that the URI is correct, where
missing, which would have caught a bug in an earlier version of this
patch.

Differential Revision: https://phabricator.services.mozilla.com/D51183

--HG--
extra : moz-landing-system : lando
2019-10-31 02:47:08 +00:00
Andreea Pavel
8846cf3d21 Backed out 13 changesets (bug 1581637) for xpchell failures at test_anonymous-coalescing.js on a CLOSED TREE
Backed out changeset 3a458217248d (bug 1581637)
Backed out changeset a5df33ec7393 (bug 1581637)
Backed out changeset c5d8950b4a4b (bug 1581637)
Backed out changeset 97ff4a06c2da (bug 1581637)
Backed out changeset 496ec0c5a60f (bug 1581637)
Backed out changeset 63b7f1ff1714 (bug 1581637)
Backed out changeset 6b80553abc74 (bug 1581637)
Backed out changeset 6b6b75fbec7f (bug 1581637)
Backed out changeset f09b9a4ba633 (bug 1581637)
Backed out changeset 21b721e37d39 (bug 1581637)
Backed out changeset 58ca75a25253 (bug 1581637)
Backed out changeset c28174eaccbe (bug 1581637)
Backed out changeset e6ff3db0a421 (bug 1581637)
2019-10-31 02:45:42 +02:00
Dragana Damjanovic
7595affeb8 Bug 1581637 - Part 2 - Add NS_ERROR_NET_HTTP3_PROTOCOL_ERROR error. r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D46647

--HG--
extra : moz-landing-system : lando
2019-10-30 20:52:36 +00:00
Kashav Madan
c39158719d Bug 1582531 - Update fission annotations for tests that pass, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D50507

--HG--
extra : moz-landing-system : lando
2019-10-30 21:51:22 +00:00
Razvan Maries
dc147d06b0 Backed out changeset 5f185a11889b (bug 1584998) for perma fails on browser_bug593387.js. CLOSED TREE 2019-10-30 23:26:01 +02:00
Nika Layzell
25a85c2659 Bug 1589342 - Ensure BrowsingContext is not discarded after new process spawn, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D50991

--HG--
extra : moz-landing-system : lando
2019-10-30 17:43:15 +00:00
Christoph Kerschbaumer
36376205fb Bug 1584998: Make x-frame-options work with fission enabled. r=jkt,farre,johannh
Differential Revision: https://phabricator.services.mozilla.com/D50588

--HG--
extra : moz-landing-system : lando
2019-10-30 17:54:36 +00:00
Daniel Varga
617d42c7ed Backed out changeset ac8f6632f7e0 (bug 1584998) on request by dev. On a CLOSED TREE 2019-10-30 19:33:29 +02:00
Ehsan Akhgari
5b7ceaf11d Bug 1528115 - Remove support for the hidden private window; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D51099

--HG--
extra : moz-landing-system : lando
2019-10-30 15:35:31 +00:00
Kris Maglione
00bef42aff Bug 1588220: Keep track of last active inner window when BrowsingContext is discarded. r=bzbarsky
Any number of outer windows may be attached to a BrowsingContext over its
lifetime. While the BrowsingContext is alive, it's easy to keep track of which
of these is active, and therefore which of its inner windows is active. After
it has been discarded, though, it discards its docShell reference, so all we
can tell about an inner window is whether it is active for its own outer
window, but not whether it should be considered active for its
BrowsingContext.

This patch updates the BrowsingContext detach logic to store a flag on the
current inner window recording that it was active when its BrowsingContext was
detached, and then later checks that flag to determine if it is the current
window for a detached BrowsingContext.

Differential Revision: https://phabricator.services.mozilla.com/D49032

--HG--
extra : moz-landing-system : lando
2019-10-30 17:22:37 +00:00
Christoph Kerschbaumer
9c55479432 Bug 1584998: Make x-frame-options work with fission enabled. r=jkt,farre,johannh
Differential Revision: https://phabricator.services.mozilla.com/D50588

--HG--
extra : moz-landing-system : lando
2019-10-30 14:47:19 +00:00
Kashav Madan
498ac84e23 Bug 1590239 - Send a "browsing-context-discarded" notification when detaching, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D50520

--HG--
extra : moz-landing-system : lando
2019-10-29 17:15:29 +00:00
Christoph Kerschbaumer
78b7848da6 Bug 1592201: Enable test_bug13871.html with fission enabled. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D50905

--HG--
extra : moz-landing-system : lando
2019-10-29 14:08:20 +00:00
Olli Pettay
542288fa53 Bug 1396309, try to make file_fragment_handling_during_load.html less racy, r=peterv
The changes try to ensure we haven't really started load process of the new page, just that
there is ongoing active request. history.back() will then only affect to the fragment navigation.

Differential Revision: https://phabricator.services.mozilla.com/D50220

--HG--
rename : docshell/test/navigation/file_fragment_handling_during_load_frame2.html => docshell/test/navigation/file_fragment_handling_during_load_frame2.sjs
extra : moz-landing-system : lando
2019-10-28 20:18:24 +00:00
Arthur Iakab
2db2be67ab Bug 1591865 - enable test on fission because it is fixed. a=test-only CLOSED TREE
--HG--
extra : amend_source : 1418e4a510118edec95bb8d5ceff29dba0da869b
2019-10-28 22:20:22 +02:00
Christoph Kerschbaumer
3c9fc41d3d Bug 1591865: Make browser_cross_process_csp_inheritance.js work with fission enabled. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D50842

--HG--
extra : moz-landing-system : lando
2019-10-28 18:55:53 +00:00
Edgar Chen
5c03d212e3 Bug 1587062 - Move SandboxFlags from DocShell to BrowsingContext; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D50663

--HG--
extra : moz-landing-system : lando
2019-10-28 11:48:30 +00:00
Brian Grinstead
432c1a8641 Bug 1587142 - Remove miscellaneous XBL tests r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D50652

--HG--
extra : moz-landing-system : lando
2019-10-25 21:53:33 +00:00
Andreas Farre
15dd2821c0 Bug 1575051 - Part 4: Expose JS stack access check control on FindWithName. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D49286

--HG--
extra : moz-landing-system : lando
2019-10-25 15:34:30 +00:00
Andreas Farre
6330b1de84 Bug 1575051 - Part 3: Test that nsWindowWatcher can find windows. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D48977

--HG--
extra : moz-landing-system : lando
2019-10-24 14:53:07 +00:00
Andreas Farre
5e8eaa0a0b Bug 1575051 - Part 2: Look in chrome browsing context group when docshell is missing. r=kmag
Also some minor cleanup in nsWindowWatcher, as well as a small fix,
where GetWindowByName forgot to addref its return value (as changed in
Part 1).

Differential Revision: https://phabricator.services.mozilla.com/D48976

--HG--
extra : moz-landing-system : lando
2019-10-24 14:53:07 +00:00
Andreas Farre
268d5bd571 Bug 1575051 - Part 1: Remove nsIDocShellTreeItem.findItemWithName. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D46285

--HG--
extra : moz-landing-system : lando
2019-10-24 14:53:07 +00:00
Emilio Cobos Álvarez
68d7ee2298 Bug 1590816 - Remove a useless script blocker and comment from BaseHistory. r=mak
This was copied verbatim from places, but the only thing the code can do is
schedule runnables, which outlive the function, so there's no script that can
run.

Depends on D50502.

Differential Revision: https://phabricator.services.mozilla.com/D50503

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:39 +00:00
Emilio Cobos Álvarez
c3dd22054d Bug 1590816 - Don't remove tracked links from GeckoViewHistory. r=lina
And make the assertions consistent with places.

Differential Revision: https://phabricator.services.mozilla.com/D50502

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:35 +00:00
Emilio Cobos Álvarez
f8863b0c94 Bug 1590816 - Cleanup some link coloring APIs to make them infallible when appropriate. r=mak
GeckoView does this link clearing stuff (which is somewhat dubious), but always
used to return NS_OK.

The error handling case in Link.cpp was pretty broken anyway (it'd leave the
link marked as registered), so make that infallible, given we fatally assert in
the non-android case.

NotifyVisited is also infallible so make that infallible too.

There's no need to use NS_IMETHOD gunk when not using scriptable XPCOM, and
these functions are not called from script, so make them regular pure-virtual
functions.

Depends on D50478.

Differential Revision: https://phabricator.services.mozilla.com/D50480

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:25 +00:00
Emilio Cobos Álvarez
ea222cccf7 Bug 1590816 - Various naming and comment cleanups, as suggested in review comments. r=mak
Depends on D50266

Differential Revision: https://phabricator.services.mozilla.com/D50478

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:23 +00:00
Emilio Cobos Álvarez
a4a8b9ded2 Bug 1590816 - Make GetLinkDocument a static function again. r=mak
Now without a duplicate version on another file :)

Differential Revision: https://phabricator.services.mozilla.com/D50266

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:22 +00:00
Emilio Cobos Álvarez
462ada88ab Bug 1590816 - Move NotifyVisited to BaseHistory. r=mak,lina
Differential Revision: https://phabricator.services.mozilla.com/D50265

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:20 +00:00
Emilio Cobos Álvarez
b1cb605f8c Bug 1590816 - Move Register and UnregisterVisitedCallback to BaseHistory. r=mak,lina
Differential Revision: https://phabricator.services.mozilla.com/D50264

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:18 +00:00
Emilio Cobos Álvarez
7c0ed40aed Bug 1590816 - Move History::DispatchNotifyVisited and related code to BaseHistory. r=mak,lina
Interestingly the android implementation had a potentially serious bug (was
missing a script blocker).

Differential Revision: https://phabricator.services.mozilla.com/D50263

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:16 +00:00
Emilio Cobos Álvarez
32427afa56 Bug 1590816 - Introduce mozilla::BaseHistory, and move tracked URIs and a simple function there. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D50262

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:08 +00:00
Emilio Cobos Álvarez
eee44e6620 Bug 1590816 - Move the tracked URIs hash table to IHistory. r=mak
In preparation for moving all the link coloring code.

Differential Revision: https://phabricator.services.mozilla.com/D50260

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:04 +00:00
Emilio Cobos Álvarez
3538eb4d27 Bug 1590816 - Use the same data structures for GeckoViewHistory and places History. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D50259

--HG--
extra : moz-landing-system : lando
2019-10-25 13:02:02 +00:00
Paul Zuehlcke
7b483252bd Bug 1588461 - Added OA StripAttributes flag for privateBrowsingId. r=johannh,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D49174

--HG--
extra : moz-landing-system : lando
2019-10-24 14:18:54 +00:00
Tim Huang
336cd10b0e Bug 1590032 - Propagate the first party domain when creating new browser in Fission. r=smaug
In this patch, we add the propagation of the first party domain through
the tabContext while creating OOP browsers. In the window.open() case,
we will propagate the first party domain from the opener's browser parent.
And in the frame case, we will propagate it from the manager of the
browserBridgeParent of the OOP frame.

Differential Revision: https://phabricator.services.mozilla.com/D49886

--HG--
extra : moz-landing-system : lando
2019-10-24 08:51:06 +00:00
Matt Woodrow
f44ddd9679 Bug 1590748 - Setup result principal URI on the content process LoadInfo as well as the parent process one, since ServiceWorkers depends on it there. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D50372

--HG--
extra : moz-landing-system : lando
2019-10-24 00:46:37 +00:00
Thomas Nguyen
cf2f2ec008 Bug 1580462 - Store iframe's FeaturePolicy in browsingContext to inherit cross origin document. r=baku,farre
Differential Revision: https://phabricator.services.mozilla.com/D48825

--HG--
extra : moz-landing-system : lando
2019-10-23 19:39:00 +00:00
Razvan Maries
7fb625f8cf Backed out changeset ae33b9c001e5 (bug 1580462) for build bustages on nsWindow.cpp. CLOSED TREE 2019-10-23 11:07:00 +03:00
Thomas Nguyen
a220530f6b Bug 1580462 - Store iframe's FeaturePolicy in browsingContext to inherit cross origin document. r=baku,farre
Differential Revision: https://phabricator.services.mozilla.com/D48825

--HG--
extra : moz-landing-system : lando
2019-10-22 14:36:00 +00:00
Tom Tung
da052d4b6a Bug 1583251 - P1 - Propagate the targetAgentClusterId to PostMessageEvent::Run(); r=nika
Differential Revision: https://phabricator.services.mozilla.com/D48347

--HG--
extra : moz-landing-system : lando
2019-10-23 07:19:48 +00:00
Dorel Luca
c50e4ba81d Backed out changeset 578e4005a84b (bug 1588118) for Browser-chrome failures in docshell/test/browser/browser_uriFixupIntegration.js. CLOSED TREE 2019-10-23 02:06:52 +03:00
Gijs Kruitbosch
f5e7a6ea1b Bug 1588118 - use the right flag to guard search service use from the URI fixup code, r=mak
Differential Revision: https://phabricator.services.mozilla.com/D50051

--HG--
extra : moz-landing-system : lando
2019-10-22 22:05:53 +00:00
Matt Woodrow
e398ffe261 Bug 1583700 - Copy hasNonEmptySandboxingFlags across with DocumentChannel so that it can be set on the nHttpChannel in the parent. r=JuniorHsu,valentin
Depends on D49870

We fail coop-sandbox.https.html  without this, since the changes in bug 1566868 don't apply to DocumentChannel.

Differential Revision: https://phabricator.services.mozilla.com/D49871

--HG--
extra : moz-landing-system : lando
2019-10-22 19:16:28 +00:00
Matt Woodrow
df21aaeee9 Bug 1583700 - Move CSP setup code to run in both processes. r=nika,ckerschb,mattwoodrow
We want this to run in both processes so that we set the cspToInherit on the LoadInfo within the child as well as the parent.

Differential Revision: https://phabricator.services.mozilla.com/D47355

--HG--
extra : moz-landing-system : lando
2019-10-22 01:03:18 +00:00
Mihai Alexandru Michis
f3ba6ba32f Backed out 7 changesets (bug 1583700) for causing raptor dom failures.
Backed out changeset 48ceb0dd5d09 (bug 1583700)
Backed out changeset c662a369062f (bug 1583700)
Backed out changeset dc9e317da307 (bug 1583700)
Backed out changeset 41e07201a158 (bug 1583700)
Backed out changeset 015ec42c311a (bug 1583700)
Backed out changeset cfb571dd120a (bug 1583700)
Backed out changeset b9d06db6d43c (bug 1583700)
2019-10-22 03:57:07 +03:00
Matt Woodrow
c6fc3268fc Bug 1583700 - Copy hasNonEmptySandboxingFlags across with DocumentChannel so that it can be set on the nHttpChannel in the parent. r=JuniorHsu,valentin
Depends on D49870

We fail coop-sandbox.https.html  without this, since the changes in bug 1566868 don't apply to DocumentChannel.

Differential Revision: https://phabricator.services.mozilla.com/D49871

--HG--
extra : moz-landing-system : lando
2019-10-21 20:47:28 +00:00
Matt Woodrow
b7011c4713 Bug 1583700 - Move CSP setup code to run in both processes. r=nika,ckerschb,mattwoodrow
We want this to run in both processes so that we set the cspToInherit on the LoadInfo within the child as well as the parent.

Differential Revision: https://phabricator.services.mozilla.com/D47355

--HG--
extra : moz-landing-system : lando
2019-10-15 07:52:09 +00:00
Kashav Madan
6f7ced56cb Bug 1589399 - Make BrowsingContext implement nsISupports, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D49786

--HG--
extra : moz-landing-system : lando
2019-10-18 18:58:30 +00:00
Mark Banner
2e1253978b Bug 1588785 - Make the search service also detect when the UI is not enabled. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D49652

--HG--
extra : moz-landing-system : lando
2019-10-18 18:53:36 +00:00
Oana Pop Rus
852f034b58 Backed out 2 changesets (bug 1588785) for causing bc perma failures in browser_searchDefaultEngine.js on a CLOSED TREE
Backed out changeset 6ad4b26b21d7 (bug 1588785)
Backed out changeset 4a4afa268baf (bug 1588785)
2019-10-18 18:45:58 +03:00