canada
Summary
There is consent only if NW actually wanted the sexual touching.
It is also unlikely that the defence of "honest but mistaken belief in communicated consent" is available, but the scenario is under-specified to make that determination.
The elements of sexual assault
To prove an offence, the Crown (prosecution) must establish both the actus reus and mens rea of the offence.
The actus reus of sexual assault is that:
- there is sexual touching;
- there is no consent to that specific sexual touching in the mind of the complainant.
Criminal Code, s. 273.1:
Subject to subsection (2) and subsection 265(3), consent means, for the purposes of sections 271, 272 and 273, the voluntary agreement of the complainant to engage in the sexual activity in question.
Consent for the purpose of sexual assault is only the subjective consent by the complainant. "For the purposes of the actus reus 'consent' means that the complainant in her mind wanted the sexual touching to take place" (R. v. Ewanchuk, [1999] 1 SCR 330).
A prank phone call is not consent. Impersonating someone impersonating oneself is not consent. Inviting someone over to play out a sexual assault fantasy is not consent. Only ongoing subjective consent in the mind of the complainant at the time of the act is consent.
A person can remove consent at any point in the activity.
"The mens rea is the intention to touch, knowing of, or being reckless of or wilfully blind to, a lack of consent, either by words or actions, from the person being touched" (R. v. Ewanchuk, [1999] 1 S.C.R. 330).
A defence: mistaken belief in communicated consent
As part of defending against a charge of sexual assault, an accused may argue that they were under a mistaken belief in communicated consent. This is available when the defendant: (1) has taken reasonable steps to ascertain consent; and, (2) has the honest belief that the complainant actually communicated consent.
This is analogous to California's Mayberry defence presented in bdb484's answer, but the Canadian defence is premised on reasonable steps taken by the accused.
Application: the hypothetical is underspecified
There is not enough information to know whether the actus reus of sexual assault is made out. You would have to stipulate whether the complainant subjectively wanted, in her mind, the touching to take place or not, at the time of the touching. If she wanted it, then there is no sexual assault. If she did not want it, then the analysis proceeds to the accused's awareness of that lack of consent.
The accused's "good faith" that you stipulate (I take this to mean an honest belief in communicated consent) is only relevant if they first establish that they took reasonable steps to ascertain consent.
But, there is not enough information to assess whether the defence of "mistaken belief in communicated consent" is available. We would have to know what steps the accused took to ascertain that the complainant was consenting throughout the encounter. In the case of a sexual assault / non-consent role-play, these steps would have to go quite far in order to be reasonable:
- "an accused’s belief in consent must be grounded in the complainant’s communications of consent at the relevant time to the particular sexual activity in question" (R. v. Gairdner, 2017 BCCA 42, para. 17);
- "a party may not give advance consent to a suite of activities that would leave the complainant 'vulnerable to new and varied assaults'": (R. v. Gairdner, 2017 BCCA 425, para. 24);
- "Once a complainant says 'No', an accused must ensure the complainant has changed her mind before proceeding" (R. v Sweet, 2018 BCSC 1696, para 138);
- it is likely that reasonable steps requires an in-depth in-person discussion confirming consent to a role-play in which no means yes, including discussion and practice of the use of a safe-word to communicate non-consent (R. v. Sweet).