Permalink
Browse files

Add Windows Phone OS to mobile browser list.

Fixes #2428
  • Loading branch information...
1 parent c90aafb commit ac408b38e3dda9458795f4df7f01a59db3f78443 @markstory markstory committed Jan 1, 2012
Showing with 5 additions and 1 deletion.
  1. +1 −1 lib/Cake/Network/CakeRequest.php
  2. +4 −0 lib/Cake/Test/Case/Network/CakeRequestTest.php
@@ -107,7 +107,7 @@ class CakeRequest implements ArrayAccess {
'Android', 'AvantGo', 'BlackBerry', 'DoCoMo', 'Fennec', 'iPod', 'iPhone',
'J2ME', 'MIDP', 'NetFront', 'Nokia', 'Opera Mini', 'Opera Mobi', 'PalmOS', 'PalmSource',
'portalmmm', 'Plucker', 'ReqwirelessWeb', 'SonyEricsson', 'Symbian', 'UP\\.Browser',
- 'webOS', 'Windows CE', 'Xiino'
+ 'webOS', 'Windows CE', 'Windows Phone OS', 'Xiino'
))
);
@@ -636,6 +636,10 @@ public function testisAjaxFlashAndFriends() {
$_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre Fennec/2.0b1pre';
$this->assertTrue($request->is('mobile'));
$this->assertTrue($request->isMobile());
+
+ $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG; OMNIA7)';
+ $this->assertTrue($request->is('mobile'));
+ $this->assertTrue($request->isMobile());
}
/**

0 comments on commit ac408b3

Please sign in to comment.