summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-09-12 20:48:06 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-09-12 21:04:04 -0700
commitc32f95a62f3ad583a58763022e1a2578ecdb9ee5 (patch)
tree10bb62a8c2daf1865a3df7a1de440b05a2503042
parent35275b2df8229736f52b2fc121669113beea50cd (diff)
downloadDotNetOpenAuth-c32f95a62f3ad583a58763022e1a2578ecdb9ee5.zip
DotNetOpenAuth-c32f95a62f3ad583a58763022e1a2578ecdb9ee5.tar.gz
DotNetOpenAuth-c32f95a62f3ad583a58763022e1a2578ecdb9ee5.tar.bz2
OpenIdTextBox now honors Popup == PopupBehavior.Never.
Fixes #126.
-rw-r--r--src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs
index 184707c..a920ac7 100644
--- a/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs
+++ b/src/DotNetOpenAuth/OpenId/RelyingParty/OpenIdTextBox.cs
@@ -1221,7 +1221,16 @@ namespace DotNetOpenAuth.OpenId.RelyingParty {
private bool IsPopupAppropriate() {
Contract.Requires(this.Request != null);
- return this.Popup == PopupBehavior.Always || this.Request.Provider.IsExtensionSupported<UIRequest>();
+ switch (this.Popup) {
+ case PopupBehavior.Never:
+ return false;
+ case PopupBehavior.Always:
+ return true;
+ case PopupBehavior.IfProviderSupported:
+ return this.Request.Provider.IsExtensionSupported<UIRequest>();
+ default:
+ throw new InternalErrorException();
+ }
}
/// <summary>