root/lang/perl/HTML-WidgetValidator-Widget/trunk/t/nikeplus.t @ 1837

Revision 1837, 9.5 kB (checked in by yoshidaster, 6 years ago)

lang/perl/HTML-WidgetValidator?-Widget/Nikeplus.pm: fix - screenName contains wide character

Line 
1use strict;
2use Test::Base;
3use HTML::WidgetValidator;
4
5sub validate {
6    my $validator = HTML::WidgetValidator->new(widgets => [ 'Nikeplus' ]);
7    my $result = $validator->validate(shift);
8    return $result ? $result->name : ' ';
9}
10
11filters {
12    input    => [qw/chomp validate/],
13    expected => [qw/chomp/],
14};
15
16__END__
17=== Nikeplus object - profiles
18--- input
19<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="198" height="182" id="Nike+ Profile" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="movie" value="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/profile.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="id=217188745&userDefaultUnit=km&dateFormat=YY/MM/DD&region=jp&language=ja&locale=ja_jp"/><embed src="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/profile.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="198" height="182" name="Nike+ Profile" align="middle" allowScriptAccess="sameDomain" FlashVars="id=217188745&userDefaultUnit=km&dateFormat=YY/MM/DD&region=jp&language=ja&locale=ja_jp" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>
20--- expected
21Nikeplus
22=== Nikeplus object - individual runs
23--- input
24<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="198" height="145" id="Nike+ Runs" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="movie" value="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="type=individualRun&userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&id=149749104&region=jp&language=ja&locale=ja_jp"/><embed src="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="198" height="145" name="Nike+ Runs" align="middle" allowScriptAccess="sameDomain" FlashVars="type=individualRun&userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&id=149749104&region=jp&language=ja&locale=ja_jp" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>
25--- expected
26Nikeplus
27=== Nikeplus object - last5 runs
28--- input
29<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="198" height="145" id="Nike+ Runs" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="movie" value="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&id=217188745&type=last5Runs&region=jp&language=ja&locale=ja_jp"/><embed src="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="198" height="145" name="Nike+ Runs" align="middle" allowScriptAccess="sameDomain" FlashVars="userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&id=217188745&type=last5Runs&region=jp&language=ja&locale=ja_jp" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>
30--- expected
31Nikeplus
32=== Nikeplus object - fastest runs
33--- input
34<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="198" height="145" id="Nike+ Runs" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="movie" value="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&id=217188745&type=fastestRun&region=jp&language=ja&locale=ja_jp"/><embed src="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="198" height="145" name="Nike+ Runs" align="middle" allowScriptAccess="sameDomain" FlashVars="userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&id=217188745&type=fastestRun&region=jp&language=ja&locale=ja_jp" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>
35--- expected
36Nikeplus
37=== Nikeplus object - farthest runs
38--- input
39<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="198" height="145" id="Nike+ Runs" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="movie" value="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&id=217188745&type=farthestRun&region=jp&language=ja&locale=ja_jp"/><embed src="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="198" height="145" name="Nike+ Runs" align="middle" allowScriptAccess="sameDomain" FlashVars="userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&id=217188745&type=farthestRun&region=jp&language=ja&locale=ja_jp" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>
40--- expected
41Nikeplus
42=== Nikeplus object - challenge
43--- input
44<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="198" height="260" id="Nike+ Runs" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="movie" value="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/challenge.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="type=scrapeChallenge&userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&versionNum=2.0&id=418942017&region=jp&language=ja&locale=ja_jp"/><embed src="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/challenge.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="198" height="260" name="Nike+ Runs" align="middle" allowScriptAccess="sameDomain" FlashVars="type=scrapeChallenge&userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&versionNum=2.0&id=418942017&region=jp&language=ja&locale=ja_jp" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>
45--- expected
46Nikeplus
47=== Nikeplus object - goal
48--- input
49<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="198" height="145" id="Nike+ Runs" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="movie" value="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/goal.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="type=individualGoal&userDefaultUnit=km&screenName=hi-r&ocks&dateFormat=YY/MM/DD&id=2029033269&region=jp&language=ja&locale=ja_jp"/><embed src="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/goal.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="198" height="145" name="Nike+ Runs" align="middle" allowScriptAccess="sameDomain" FlashVars="type=individualGoal&userDefaultUnit=km&screenName=hi-rocks&dateFormat=YY/MM/DD&id=2029033269&region=jp&language=ja&locale=ja_jp" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>
50--- expected
51Nikeplus
52=== Nikeplus object - wide character screenName
53--- input
54<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="198" height="145" id="Nike+ Runs" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="wmode" value="transparent" /><param name="movie" value="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /><param name="FlashVars" value="type=last5Runs&userDefaultUnit=km&screenName=��ateFormat=YY/MM/DD&id=1693757924&region=jp&language=ja&locale=ja_jp"/><embed src="http://nikeplus.nike.com/nikeplus/v1/swf/scrapablewidget/rundetail.swf" quality="high" wmode="transparent" bgcolor="#ffffff" width="198" height="145" name="Nike+ Runs" align="middle" allowScriptAccess="sameDomain" FlashVars="type=last5Runs&userDefaultUnit=km&screenName=��ateFormat=YY/MM/DD&id=1693757924&region=jp&language=ja&locale=ja_jp" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed></object>
55--- expected
56Nikeplus
57
Note: See TracBrowser for help on using the browser.