mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 22:05:44 +00:00
Bug 1230042 - Fix clients-matchall-include-uncontrolled.https.html by sorting the clients array and ignoring non-test clients; r=bkelly
This commit is contained in:
parent
7963856ba1
commit
e894f92893
@ -1,3 +0,0 @@
|
||||
[clients-matchall-include-uncontrolled.https.html]
|
||||
type: testharness
|
||||
disabled: https://bugzilla.mozilla.org/show_bug.cgi?id=1230042
|
@ -48,10 +48,13 @@ function test_matchall(frame, expected, query_options) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var channel = new MessageChannel();
|
||||
channel.port1.onmessage = function(e) {
|
||||
// Ignore hidden clients which may be coming from background tabs.
|
||||
// Ignore hidden clients which may be coming from background tabs, or
|
||||
// clients unrelated to this test.
|
||||
var data = e.data.filter(function(info) {
|
||||
return info[0] == 'visible';
|
||||
return info[0] == 'visible' &&
|
||||
info[2].indexOf('service-worker') > -1;
|
||||
});
|
||||
data.sort(function(a, b) { return a[2] > b[2] ? 1 : -1; });
|
||||
assert_equals(data.length, expected.length);
|
||||
for (var i = 0; i < data.length; i++)
|
||||
assert_array_equals(data[i], expected[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user