root/HTTP-MobileAgent/trunk/t/04_ezweb.t

Revision 826 (checked in by miyagawa, 18 years ago)

added is_wap12

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 use strict;
2 use Test::More tests => 460;
3
4 BEGIN { use_ok 'HTTP::MobileAgent' }
5
6 my @Tests = (
7     # ua, version, device_id, server, xhtml_compliant, comment, is_wap1, is_wap2
8     [ 'UP.Browser/3.01-HI01 UP.Link/3.4.5.2',
9       '3.01', 'HI01', 'UP.Link/3.4.5.2', undef, undef, 1, undef ],
10     [ 'KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1',
11       '6.0.2.276 (GUI)', 'TS21', 'MMP/1.1', 1, undef, undef, 1 ],
12     [ 'UP.Browser/3.04-TS14 UP.Link/3.4.4 (Google WAP Proxy/1.0)',
13       '3.04', 'TS14', 'UP.Link/3.4.4', undef, 'Google WAP Proxy/1.0', 1, undef ],
14 );
15
16 for (@Tests) {
17     my($ua, @data) = @$_;
18     my $agent = HTTP::MobileAgent->new($ua);
19     isa_ok $agent, 'HTTP::MobileAgent';
20     isa_ok $agent, 'HTTP::MobileAgent::EZweb';
21     is $agent->name, 'UP.Browser';
22     ok !$agent->is_docomo && !$agent->is_j_phone && $agent->is_ezweb;
23     is $agent->user_agent, $ua,         "ua is $ua";
24
25     is $agent->version, $data[0];
26     is $agent->device_id, $data[1];
27     is $agent->server, $data[2];
28     is $agent->xhtml_compliant, $data[3];
29     is $agent->comment, $data[4];
30     ok $agent->is_wap1 if $data[5];
31     ok $agent->is_wap2 if $data[6];
32 }
33
34 while (<DATA>) {
35     next if /^#/;
36     chomp;
37     local $ENV{HTTP_USER_AGENT} = $_;
38     my $agent = HTTP::MobileAgent->new;
39     isa_ok $agent, 'HTTP::MobileAgent', "$_";
40     is $agent->name, 'UP.Browser';
41     ok !$agent->is_docomo && !$agent->is_j_phone && $agent->is_ezweb;
42 }
43
44 __END__
45 KDDI-CA21 UP.Browser/6.0.6 (GUI) MMP/1.1
46 KDDI-CA21 UP.Browser/6.0.7.1 (GUI) MMP/1.1
47 KDDI-HI21 UP.Browser/6.0.2.213 (GUI) MMP/1.1
48 KDDI-HI21 UP.Browser/6.0.2.273 (GUI) MMP/1.1
49 KDDI-HI21 UP.Browser/6.0.6 (GUI) MMP/1.1
50 KDDI-KC21 UP.Browser/6.0.2.273 (GUI) MMP/1.1
51 KDDI-KC21 UP.Browser/6.0.5 (GUI) MMP/1.1
52 KDDI-KC21 UP.Browser/6.0.6 (GUI) MMP/1.1
53 KDDI-MA21 UP.Browser/6.0.2.276 (GUI) MMP/1.1
54 KDDI-MA21 UP.Browser/6.0.5 (GUI) MMP/1.1
55 KDDI-MA21 UP.Browser/6.0.6 (GUI) MMP/1.1
56 KDDI-MA21 UP.Browser/6.0.7 (GUI) MMP/1.1
57 KDDI-SA21 UP.Browser/6.0.6 (GUI) MMP/1.1
58 KDDI-SA21 UP.Browser/6.0.7 (GUI) MMP/1.1
59 KDDI-SA21 UP.Browser/6.0.7.1 (GUI) MMP/1.1
60 KDDI-SA22 UP.Browser/6.0.7.2 (GUI) MMP/1.1
61 KDDI-SN21 UP.Browser/6.0.7 (GUI) MMP/1.1
62 KDDI-SN22 UP.Browser/6.0.7 (GUI) MMP/1.1
63 KDDI-TS21 UP.Browser/6.0.2.273 (GUI) MMP/1.1
64 KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1
65 KDDI-TS21 UP.Browser/6.0.5.287 (GUI) MMP/1.1
66 KDDI-TS21 UP.Browser/6.0.6 (GUI) MMP/1.1
67 KDDI-TS22 UP.Browser/6.0.6 (GUI) MMP/1.1
68 KDDI-TS22 UP.Browser/6.0.7.1 (GUI) MMP/1.1
69 UP.Browser/3.01-HI01 UP.Link/3.4.5.2
70 UP.Browser/3.01-HI02 UP.Link/3.2.1.2
71 UP.Browser/3.03-HI11 UP.Link/3.2.2.7c
72 UP.Browser/3.03-HI11 UP.Link/3.4.4
73 UP.Browser/3.03-KCT3 UP.Link/3.4.4
74 UP.Browser/3.03-SYC1 UP.Link/3.4.4
75 UP.Browser/3.03-TS11 UP.Link/3.2.2.7c
76 UP.Browser/3.03-TST1 UP.Link/3.2.2.7c
77 UP.Browser/3.04-CA11 UP.Link/3.2.2.7c
78 UP.Browser/3.04-CA11 UP.Link/3.3.0.3
79 UP.Browser/3.04-CA11 UP.Link/3.3.0.5
80 UP.Browser/3.04-CA11 UP.Link/3.4.4
81 UP.Browser/3.04-CA12 UP.Link/3.4.4
82 UP.Browser/3.04-CA13 UP.Link/3.3.0.5
83 UP.Browser/3.04-CA13 UP.Link/3.4.4
84 UP.Browser/3.04-CA14 UP.Link/3.4.4
85 UP.Browser/3.04-DN11 UP.Link/3.3.0.1
86 UP.Browser/3.04-DN11 UP.Link/3.4.4
87 UP.Browser/3.04-HI11 UP.Link/3.2.2.7c
88 UP.Browser/3.04-HI11 UP.Link/3.4.4
89 UP.Browser/3.04-HI12 UP.Link/3.2.2.7c
90 UP.Browser/3.04-HI12 UP.Link/3.3.0.3
91 UP.Browser/3.04-HI12 UP.Link/3.4.4
92 UP.Browser/3.04-HI12 UP.Link/3.4.4 (Google WAP Proxy/1.0)
93 UP.Browser/3.04-HI13 UP.Link/3.4.4
94 UP.Browser/3.04-HI14 UP.Link/3.4.4
95 UP.Browser/3.04-HI14 UP.Link/3.4.5.2
96 UP.Browser/3.04-KC11 UP.Link/3.4.4
97 UP.Browser/3.04-KC12 UP.Link/3.4.4
98 UP.Browser/3.04-KC13 UP.Link/3.4.4
99 UP.Browser/3.04-KC14 UP.Link/3.4.4
100 UP.Browser/3.04-KC15 UP.Link/3.4.4
101 UP.Browser/3.04-KCT4 UP.Link/3.4.4
102 UP.Browser/3.04-KCT5 UP.Link/3.4.4
103 UP.Browser/3.04-KCT6 UP.Link/3.4.4
104 UP.Browser/3.04-KCT7 UP.Link/3.4.4
105 UP.Browser/3.04-KCT8 UP.Link/3.4.4
106 UP.Browser/3.04-KCT9 UP.Link/3.4.4
107 UP.Browser/3.04-MA11 UP.Link/3.2.2.7c
108 UP.Browser/3.04-MA11 UP.Link/3.3.0.3
109 UP.Browser/3.04-MA11 UP.Link/3.3.0.5
110 UP.Browser/3.04-MA11 UP.Link/3.4.4
111 UP.Browser/3.04-MA12 UP.Link/3.2.2.7c
112 UP.Browser/3.04-MA12 UP.Link/3.3.0.5
113 UP.Browser/3.04-MA12 UP.Link/3.4.4
114 UP.Browser/3.04-MA12 UP.Link/3.4.4 (Google WAP Proxy/1.0)
115 UP.Browser/3.04-MA13 UP.Link/3.3.0.5
116 UP.Browser/3.04-MA13 UP.Link/3.4.4
117 UP.Browser/3.04-MA13 UP.Link/3.4.4 (Google WAP Proxy/1.0)
118 UP.Browser/3.04-MA13 UP.Link/3.4.5.2
119 UP.Browser/3.04-MAC2 UP.Link/3.4.4
120 UP.Browser/3.04-MAI1 UP.Link/3.2.2.7c
121 UP.Browser/3.04-MAI2 UP.Link/3.2.2.7c
122 UP.Browser/3.04-MAI2 UP.Link/3.4.4
123 UP.Browser/3.04-MAT1 UP.Link/3.3.0.3
124 UP.Browser/3.04-MAT3 UP.Link/3.4.4
125 UP.Browser/3.04-MIT1 UP.Link/3.3.0.3
126 UP.Browser/3.04-MIT1 UP.Link/3.4.4
127 UP.Browser/3.04-MIT1 UP.Link/3.4.5.2
128 UP.Browser/3.04-SN11 UP.Link/3.2.2.7c
129 UP.Browser/3.04-SN11 UP.Link/3.3.0.3
130 UP.Browser/3.04-SN11 UP.Link/3.4.4
131 UP.Browser/3.04-SN11 UP.Link/3.4.4 (Google WAP Proxy/1.0)
132 UP.Browser/3.04-SN12 UP.Link/3.3.0.1
133 UP.Browser/3.04-SN12 UP.Link/3.3.0.5
134 UP.Browser/3.04-SN12 UP.Link/3.4.4
135 UP.Browser/3.04-SN12 UP.Link/3.4.5.2
136 UP.Browser/3.04-SN13 UP.Link/3.3.0.3
137 UP.Browser/3.04-SN13 UP.Link/3.3.0.5
138 UP.Browser/3.04-SN13 UP.Link/3.4.4
139 UP.Browser/3.04-SN14 UP.Link/3.4.4
140 UP.Browser/3.04-SN14 UP.Link/3.4.5.2
141 UP.Browser/3.04-SN15 UP.Link/3.4.4
142 UP.Browser/3.04-SN15 UP.Link/3.4.5.2
143 UP.Browser/3.04-SN16 UP.Link/3.4.4
144 UP.Browser/3.04-SN17 UP.Link/3.4.4
145 UP.Browser/3.04-SNI1 UP.Link/3.4.4
146 UP.Browser/3.04-ST11 UP.Link/3.3.0.1
147 UP.Browser/3.04-ST11 UP.Link/3.3.0.5
148 UP.Browser/3.04-ST11 UP.Link/3.4.4
149 UP.Browser/3.04-ST12 UP.Link/3.4.4
150 UP.Browser/3.04-ST13 UP.Link/3.4.4
151 UP.Browser/3.04-SY11 UP.Link/3.2.2.7c
152 UP.Browser/3.04-SY11 UP.Link/3.4.4
153 UP.Browser/3.04-SY12 UP.Link/3.3.0.1
154 UP.Browser/3.04-SY12 UP.Link/3.3.0.3
155 UP.Browser/3.04-SY12 UP.Link/3.3.0.5
156 UP.Browser/3.04-SY12 UP.Link/3.4.4
157 UP.Browser/3.04-SY12 UP.Link/3.4.5.2
158 UP.Browser/3.04-SY12 UP.Link/3.4.5.6
159 UP.Browser/3.04-SY13 UP.Link/3.4.4
160 UP.Browser/3.04-SY14 UP.Link/3.4.4
161 UP.Browser/3.04-SY15 UP.Link/3.4.4
162 UP.Browser/3.04-SYT3 UP.Link/3.4.4
163 UP.Browser/3.04-SYT3 UP.Link/3.4.5.2
164 UP.Browser/3.04-TS11 UP.Link/3.2.2.7c
165 UP.Browser/3.04-TS11 UP.Link/3.3.0.5
166 UP.Browser/3.04-TS11 UP.Link/3.4.4
167 UP.Browser/3.04-TS12 UP.Link/3.2.2.7c
168 UP.Browser/3.04-TS12 UP.Link/3.3.0.1
169 UP.Browser/3.04-TS12 UP.Link/3.3.0.3
170 UP.Browser/3.04-TS12 UP.Link/3.3.0.5
171 UP.Browser/3.04-TS12 UP.Link/3.4.4
172 UP.Browser/3.04-TS13 UP.Link/3.4.4
173 UP.Browser/3.04-TS14 UP.Link/3.4.4
174 UP.Browser/3.04-TS14 UP.Link/3.4.4 (Google WAP Proxy/1.0)
175 UP.Browser/3.04-TS14 UP.Link/3.4.5.2
176 UP.Browser/3.04-TSI1 UP.Link/3.2.2.7c
177 UP.Browser/3.04-TST3 UP.Link/3.4.4
178 UP.Browser/3.04-TST4 UP.Link/3.4.4
179 UP.Browser/3.04-TST4 UP.Link/3.4.5.2
180 UP.Browser/3.04-TST4 UP.Link/3.4.5.6
181 UP.Browser/3.04-TST5 UP.Link/3.4.4
182 UP.Browser/3.1-NT95 UP.Link/3.2
183 UP.Browser/3.1-SY11 UP.Link/3.2
184 UP.Browser/3.1-UPG1 UP.Link/3.2
185 UP.Browser/3.2.9.1-SA12 UP.Link/3.2
186 UP.Browser/3.2.9.1-UPG1 UP.Link/3.2
Note: See TracBrowser for help on using the browser.