Skip to content

Commit 6b7cd07

Browse files
committed
WebRTC: Add variants for SFrameTransform idlharness test
See web-platform-tests/interop#847 (comment)
1 parent cf76f31 commit 6b7cd07

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

resources/idlharness.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,10 @@ IdlArray.prototype.merge_partials = function()
783783
}
784784
testedPartials.set(parsed_idl.name, partialTestCount);
785785

786+
if (!self.shouldRunSubTest(partialTestName)) {
787+
return;
788+
}
789+
786790
if (!parsed_idl.untested) {
787791
test(function () {
788792
assert_true(originalExists, `Original ${parsed_idl.type} should be defined`);
@@ -871,14 +875,15 @@ IdlArray.prototype.merge_mixins = function()
871875
{
872876
const lhs = parsed_idl.target;
873877
const rhs = parsed_idl.includes;
878+
const testName = lhs + " includes " + rhs + ": member names are unique";
874879

875880
var errStr = lhs + " includes " + rhs + ", but ";
876881
if (!(lhs in this.members)) throw errStr + lhs + " is undefined.";
877882
if (!(this.members[lhs] instanceof IdlInterface)) throw errStr + lhs + " is not an interface.";
878883
if (!(rhs in this.members)) throw errStr + rhs + " is undefined.";
879884
if (!(this.members[rhs] instanceof IdlInterface)) throw errStr + rhs + " is not an interface.";
880885

881-
if (this.members[rhs].members.length) {
886+
if (this.members[rhs].members.length && self.shouldRunSubTest(testName)) {
882887
test(function () {
883888
var clash = this.members[rhs].members.find(function(member) {
884889
return this.members[lhs].members.find(function(m) {
@@ -892,7 +897,7 @@ IdlArray.prototype.merge_mixins = function()
892897
this.members[lhs].members.push(new IdlInterfaceMember(member));
893898
}.bind(this));
894899
assert_true(!clash, "member " + (clash && clash.name) + " is unique");
895-
}.bind(this), lhs + " includes " + rhs + ": member names are unique");
900+
}.bind(this), testName);
896901
}
897902
}
898903
this.includes = [];

webrtc-encoded-transform/idlharness.https.window.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// META: variant=?exclude=SFrameTransform.*
2+
// META: variant=?include=SFrameTransform.*
3+
// META: script=/common/subset-tests-by-key.js
14
// META: script=/resources/WebIDLParser.js
25
// META: script=/resources/idlharness.js
36
// META: script=./RTCPeerConnection-helper.js

0 commit comments

Comments
 (0)