Skip to content

Commit

Permalink
Bug fix for github issue web-platform-tests#241 in w3c/automotive
Browse files Browse the repository at this point in the history
(w3c/automotive#241)
- Remove non necessary 'assert_true'
- Added some value check
  • Loading branch information
aShinjiroUrata committed Nov 24, 2017
1 parent 2ad5d41 commit 76e8918
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions vehicle/viss/0180-subscribe-success.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,15 @@
addLogMessage("Ignore SubscriptionNotificationErrorResponse.");
return;
}
var res3 = isUnsubscribeSuccessResponse(reqId, subId, msg);
assert_true(res3, "True if unsubscribeSuccessResponse received.");
if (res3) {
if (msg.action !== 'unsubscribe') {
addLogMessage("Ignore messages except for UnsubscirbeSuccessResponse/ErrorResonse.");
return;
}
if (isUnsubscribeSuccessResponse(reqId, subId, msg)) {
// unsubscibe success
phase = PH_UNSUBSCRIBED;
helper_terminate_normal("unsubscribeSuccessResponse received");
} else {
} else if (isUnsubscribeErrorResponse(reqId, subId, msg)) {
// unsubscibe error
// Test is already success. Terminate anyway
helper_terminate_normal("unsubscribeErrorResponse received");
Expand Down

0 comments on commit 76e8918

Please sign in to comment.