From abe80cc31d5a40ebed743085011fbcda0c1a9a10 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Tue, 23 Apr 2019 15:32:23 -0400 Subject: Issue #1053 - Drop support Android and remove Fennec - Part 1a: Remove mobile/android --- .../tests/browser/chrome/basic_article.html | 16 - .../tests/browser/chrome/basic_article_mobile.html | 19 - mobile/android/tests/browser/chrome/chrome.ini | 49 - .../browser/chrome/desktopmode_user_agent.sjs | 11 - .../android/tests/browser/chrome/devicesearch.xml | 17 - mobile/android/tests/browser/chrome/head.js | 72 - mobile/android/tests/browser/chrome/head_search.js | 46 - .../tests/browser/chrome/memory_page_1.html | 16 - .../tests/browser/chrome/memory_page_2.html | 16 - .../tests/browser/chrome/memory_page_3.html | 16 - .../tests/browser/chrome/memory_page_4.html | 16 - .../browser/chrome/session_formdata_sample.html | 20 - .../android/tests/browser/chrome/simpleservice.xml | 15 - .../tests/browser/chrome/test_about_logins.html | 106 - .../tests/browser/chrome/test_accounts.html | 48 - .../tests/browser/chrome/test_android_log.html | 95 - .../tests/browser/chrome/test_app_constants.html | 35 - .../tests/browser/chrome/test_awsy_lite.html | 258 -- .../tests/browser/chrome/test_debugger_server.html | 53 - .../browser/chrome/test_desktop_useragent.html | 75 - .../browser/chrome/test_device_search_engine.html | 75 - .../browser/chrome/test_get_last_visited.html | 106 - .../browser/chrome/test_hidden_select_option.html | 103 - .../tests/browser/chrome/test_home_provider.html | 165 - .../tests/browser/chrome/test_identity_mode.html | 58 - .../tests/browser/chrome/test_java_addons.html | 118 - mobile/android/tests/browser/chrome/test_jni.html | 82 - .../tests/browser/chrome/test_migrate_ui.html | 57 - .../tests/browser/chrome/test_network_manager.html | 41 - .../tests/browser/chrome/test_offline_page.html | 111 - .../tests/browser/chrome/test_reader_view.html | 56 - .../chrome/test_resource_substitutions.html | 72 - .../browser/chrome/test_restricted_profiles.html | 57 - .../tests/browser/chrome/test_select_disabled.html | 86 - .../tests/browser/chrome/test_selectoraddtab.html | 92 - .../browser/chrome/test_session_form_data.html | 274 -- .../chrome/test_session_scroll_position.html | 310 -- .../browser/chrome/test_session_zombification.html | 185 - .../browser/chrome/test_shared_preferences.html | 255 -- .../browser/chrome/test_simple_discovery.html | 86 - .../tests/browser/chrome/test_video_discovery.html | 154 - .../tests/browser/chrome/test_web_channel.html | 121 - .../163.wrating.com/a.gif@a=&c=860010-0503010000 | Bin 43 -> 0 bytes .../chrome/tp5/163.com/163.wrating.com/a1.js | 1 - .../chrome/tp5/163.com/adgeo.163.com/ad_cookies | 0 .../chrome/tp5/163.com/analytics.163.com/ntes.js | 1 - ...ate=homepage&cat=homepage&type=adend&location=1 | 1 - ...ate=homepage&cat=homepage&type=popup&location=1 | 1 - ...&cat=homepage&type=banner360x65&location=1.html | 1 - ...&cat=homepage&type=banner360x65&location=2.html | 1 - ...cat=homepage&type=column360x100&location=1.html | 1 - ...cat=homepage&type=column360x100&location=2.html | 43 - ...cat=homepage&type=column360x100&location=3.html | 43 - ...cat=homepage&type=column360x100&location=5.html | 43 - ...cat=homepage&type=column360x100&location=6.html | 43 - ...cat=homepage&type=column390x100&location=1.html | 1 - ...cat=homepage&type=column390x100&location=2.html | 1 - ...cat=homepage&type=column390x100&location=3.html | 43 - ...cat=homepage&type=column390x100&location=4.html | 43 - ...cat=homepage&type=column390x100&location=5.html | 43 - ...cat=homepage&type=column390x100&location=6.html | 43 - ...&cat=homepage&type=column600x80&location=1.html | 1 - ...e&cat=homepage&type=logo190x100&location=1.html | 1 - ...e&cat=homepage&type=logo190x100&location=2.html | 43 - ...e&cat=homepage&type=logo190x180&location=1.html | 43 - ...e&cat=homepage&type=logo190x180&location=2.html | 1 - ...e&cat=homepage&type=logo190x180&location=3.html | 43 - ...e&cat=homepage&type=logo190x180&location=4.html | 1 - ...e&cat=homepage&type=logo190x300&location=1.html | 43 - ...e&cat=homepage&type=logo190x300&location=2.html | 1 - ...cat=homepage&type=textlinkhouse&location=1.html | 15 - ...cat=homepage&type=textlinkhouse&location=2.html | 15 - .../163.com/img1.126.net/channel1/55x20_bai.gif | Bin 1667 -> 0 bytes .../163.com/img1.126.net/channel1/55x20_lan.gif | Bin 1789 -> 0 bytes .../img1.126.net/channel5/008976/bolon_110302.png | Bin 501 -> 0 bytes .../img1.126.net/channel5/360/360100_110318.jpg | Bin 10245 -> 0 bytes .../cnews/2011/4/6/20110406182512d4541.jpg | Bin 4979 -> 0 bytes .../cnews/2011/4/8/20110408075741e084c.jpg | Bin 3946 -> 0 bytes .../cnews/2011/4/8/2011040808080199ae7.jpg | Bin 4259 -> 0 bytes .../cnews/2011/4/8/201104080835397174e.jpg | Bin 6215 -> 0 bytes .../cnews/2011/4/8/201104080847137e997.jpg | Bin 5682 -> 0 bytes .../cnews/2011/4/8/20110408085323b9296.jpg | Bin 5246 -> 0 bytes .../cnews/2011/4/8/20110408092834ed61d.jpg | Bin 7343 -> 0 bytes .../cnews/2011/4/8/201104080930016f866.jpg | Bin 3899 -> 0 bytes .../cnews/2011/4/8/201104080934433598e.jpg | Bin 4137 -> 0 bytes .../cnews/2011/4/8/2011040809550649773.jpg | Bin 6902 -> 0 bytes .../cnews/2011/4/8/20110408104255a47ce.jpg | Bin 4358 -> 0 bytes .../cnews/2011/4/8/201104081119113f37f.jpg | Bin 5600 -> 0 bytes .../cnews/2011/4/8/2011040811445023471.jpg | Bin 5544 -> 0 bytes .../cnews/2011/4/8/2011040814544385564.jpg | Bin 4738 -> 0 bytes .../cnews/2011/4/8/2011040815090608fd9.jpg | Bin 3513 -> 0 bytes .../cnews/2011/4/9/20110409022720f974c.jpg | Bin 5284 -> 0 bytes .../cnews/netease/wzdzbs.gif | Bin 2664 -> 0 bytes .../digi/linzj/1102/03/191.jpg | Bin 12682 -> 0 bytes .../img1.cache.netease.com/img09/icon/icon.png | Bin 579 -> 0 bytes .../img1.cache.netease.com/www/v2011/img/attr.png | Bin 930 -> 0 bytes .../www/v2011/img/icon_product_listv0.0.3.png | Bin 2616 -> 0 bytes .../www/v2011/img/iconv0.0.7.png | Bin 4028 -> 0 bytes .../www/v2011/img/neteasy_mallv0.0.1.png | Bin 911 -> 0 bytes .../www/v2011/img/theme_blue.png | Bin 1782 -> 0 bytes .../www/v2011/img/yodao_bg_blue.jpg | Bin 9514 -> 0 bytes .../xoimages/game/20110216/ql/x/390x100.jpg | Bin 19460 -> 0 bytes .../xoimages/game/20110216/ql/x/600x80.gif | Bin 24228 -> 0 bytes .../xoimages/hr/20110216/hz/360x100.jpg | Bin 17913 -> 0 bytes .../xoimages/sales/2011/03/ly/390x100.jpg | Bin 19684 -> 0 bytes .../xoimages/sales/2011/04/hy/190x100.jpg | Bin 15226 -> 0 bytes .../xoimages/sales/2011/04/wb/360x65.jpg | Bin 17561 -> 0 bytes .../xoimages/sales/2011/04/yd/190x180.jpg | Bin 17036 -> 0 bytes .../cnews/2011/4/7/20110407093718ef414.jpg | Bin 2133 -> 0 bytes .../cnews/2011/4/7/20110407202028db993.jpg | Bin 5987 -> 0 bytes .../cnews/2011/4/8/201104080728304dcb2.jpg | Bin 3565 -> 0 bytes .../cnews/2011/4/8/20110408082635b6897.jpg | Bin 4289 -> 0 bytes .../cnews/2011/4/8/201104080828458908d.jpg | Bin 5934 -> 0 bytes .../cnews/2011/4/8/2011040808393075049.jpg | Bin 6499 -> 0 bytes .../cnews/2011/4/8/2011040809433960d68.jpg | Bin 6093 -> 0 bytes .../cnews/2011/4/8/20110408100357df2b1.jpg | Bin 4460 -> 0 bytes .../cnews/2011/4/8/20110408115631ad273.jpg | Bin 5471 -> 0 bytes .../cnews/2011/4/8/20110408120203d0f08.jpg | Bin 2217 -> 0 bytes .../cnews/2011/4/8/201104081242198a4ba.jpg | Bin 4224 -> 0 bytes .../cnews/2011/4/8/2011040812525484a8f.jpg | Bin 3088 -> 0 bytes .../cnews/2011/4/8/20110408125931e0a79.jpg | Bin 3858 -> 0 bytes .../cnews/2011/4/8/20110408140704d246b.jpg | Bin 4978 -> 0 bytes .../cnews/2011/4/8/20110408144428d419d.jpg | Bin 5797 -> 0 bytes .../cnews/2011/4/8/2011040814452013ef7.jpg | Bin 2241 -> 0 bytes .../cnews/2011/4/8/2011040814525199c07.jpg | Bin 3245 -> 0 bytes .../cnews/2011/4/8/201104082245192ae96.jpg | Bin 4952 -> 0 bytes .../www/v2011/css/theme_blue1227.css | 1 - .../www/v2011/img/tg_news.jpg | Bin 17987 -> 0 bytes .../163.com/img3.126.net/163homepage/biaoshi.gif | Bin 1290 -> 0 bytes .../tp5/163.com/img3.126.net/163homepage/bj110.gif | Bin 2397 -> 0 bytes .../163.com/img3.126.net/rpic/fld3/fld_homepage.js | 987 ----- .../163.com/img3.126.net/rpic/fld3/flsclasses.js | 30 - .../techpro/shangpin/20110331/36-65.jpg | Bin 10682 -> 0 bytes .../techpro/tuangou/20110218/170-80.jpg | Bin 15209 -> 0 bytes .../scripts/autocomplete.163.165290.js | 1 - .../auto/2011/3/30/20110330215354a8c7a.jpg | Bin 4872 -> 0 bytes .../book/2011/4/7/201104071025387042e.jpg | Bin 3085 -> 0 bytes .../book/2011/4/7/20110407103153df111.jpg | Bin 4546 -> 0 bytes .../book/2011/4/8/20110408105903d5d53.jpg | Bin 7608 -> 0 bytes .../book/2011/4/8/20110408110145beb70.jpg | Bin 6091 -> 0 bytes .../cnews/js/ntes_jslib_1.x.js | 14 - .../edu/2011/4/6/20110406220601277f0.jpg | Bin 3783 -> 0 bytes .../edu/2011/4/9/20110409001451f646c.jpg | Bin 4987 -> 0 bytes .../ent/2011/4/8/20110408183341f6142.jpg | Bin 5721 -> 0 bytes .../game/2011/4/8/20110408091923ca1d8.jpg | Bin 6027 -> 0 bytes .../game/2011/4/8/20110408100456977e5.jpg | Bin 4119 -> 0 bytes .../game/2011/4/8/2011040810253254779.jpg | Bin 5955 -> 0 bytes .../house/2011/4/7/201104070846149dec5.jpg | Bin 3578 -> 0 bytes .../house/2011/4/8/20110408094024dfb90.gif | Bin 11109 -> 0 bytes .../lady/2011/4/7/20110407235235eb565.jpg | Bin 4436 -> 0 bytes .../lady/2011/4/8/20110408082553b8653.jpg | Bin 4341 -> 0 bytes .../life/2011/2/24/20110224214610e49c1.jpg | Bin 2161 -> 0 bytes .../life/2011/4/1/20110401105148c65f3.jpg | Bin 4423 -> 0 bytes .../life/2011/4/6/20110406140048c8dea.jpg | Bin 1627 -> 0 bytes .../life/2011/4/6/201104061402503e782.jpg | Bin 3107 -> 0 bytes .../life/2011/4/8/20110408175702d86a7.jpg | Bin 3168 -> 0 bytes .../mobile/2011/4/8/201104080904537def0.jpg | Bin 5446 -> 0 bytes .../sports/2011/4/8/20110408164530e0dfd.jpg | Bin 2390 -> 0 bytes .../sports/2011/4/8/20110408224146ca253.jpg | Bin 3646 -> 0 bytes .../sports/2011/4/8/20110408234759dabf8.jpg | Bin 4856 -> 0 bytes .../travel/2011/4/7/2011040719553034b7b.jpg | Bin 6179 -> 0 bytes .../video/2011/4/8/20110408143144afad3.jpg | Bin 6793 -> 0 bytes .../img3.cache.netease.com/www/logo/logo_png.png | Bin 992 -> 0 bytes .../auto/2011/4/8/20110408091859b1da7.jpg | Bin 4015 -> 0 bytes .../auto/2011/4/8/201104080930543aaa8.jpg | Bin 3573 -> 0 bytes .../book/2011/4/8/20110408102221db369.jpg | Bin 4521 -> 0 bytes .../digi/2011/4/8/20110408144717d8da9.jpg | Bin 3677 -> 0 bytes .../ent/2011/4/8/20110408074407aed87.jpg | Bin 3444 -> 0 bytes .../ent/2011/4/8/201104080804383b8a7.jpg | Bin 3395 -> 0 bytes .../ent/2011/4/8/2011040809044637924.jpg | Bin 5649 -> 0 bytes .../game/2011/4/5/2011040502293054a8f.jpg | Bin 4196 -> 0 bytes .../game/2011/4/8/201104081007164a116.jpg | Bin 4072 -> 0 bytes .../game/2011/4/8/201104081009084803f.jpg | Bin 6167 -> 0 bytes .../game/2011/4/8/2011040811265683661.jpg | Bin 4767 -> 0 bytes .../home/2011/4/7/20110407131936bb4ec.png | Bin 17647 -> 0 bytes .../house/2011/4/8/201104080927161a54f.jpg | Bin 6032 -> 0 bytes .../lady/2011/4/7/2011040711484089cba.jpg | Bin 4902 -> 0 bytes .../lady/2011/4/8/20110408014720d3fc0.jpg | Bin 3338 -> 0 bytes .../lady/2011/4/8/20110408224817711dd.jpg | Bin 4223 -> 0 bytes .../life/2011/3/7/20110307134125752e1.jpg | Bin 1661 -> 0 bytes .../mobile/2011/4/8/2011040809135520264.jpg | Bin 4486 -> 0 bytes .../0008/2010-01-30/120x90_5U980MMS294H0008.JPG | Bin 3639 -> 0 bytes .../sports/2011/4/8/20110408211535eae49.jpg | Bin 5071 -> 0 bytes .../stock/2011/3/1/201103010846298829b.jpg | Bin 3457 -> 0 bytes .../stock/2011/4/8/201104080929109dd6d.png | Bin 18442 -> 0 bytes .../stock/2011/4/8/20110408121505602ea.jpg | Bin 5538 -> 0 bytes .../stock/2011/4/8/20110408183832fdfa0.png | Bin 11191 -> 0 bytes .../video/2011/4/7/20110407105038a01d2.jpg | Bin 4582 -> 0 bytes .../video/2011/4/7/2011040715531564880.jpg | Bin 4680 -> 0 bytes .../video/2011/4/8/2011040809594909a0a.jpg | Bin 5232 -> 0 bytes .../4227754150194064440.jpg | Bin 25468 -> 0 bytes .../4223532025543403580.jpg | Bin 16689 -> 0 bytes .../4224939400426958880.jpg | Bin 21972 -> 0 bytes .../4226346775310512150.jpg | Bin 13490 -> 0 bytes .../4226628250287222807.jpg | Bin 26297 -> 0 bytes ...image@w=80&h=80&url=http%3A%2F%2F126.fm%2FPjU3g | Bin 1940 -> 0 bytes ...mage@w=80&h=80&url=http%3A%2F%2F126.fm%2F2WEnFW | Bin 1739 -> 0 bytes ...mage@w=80&h=80&url=http%3A%2F%2F126.fm%2F2x2iAO | Bin 2126 -> 0 bytes ...mage@w=80&h=80&url=http%3A%2F%2F126.fm%2F40hcYl | Bin 1943 -> 0 bytes ...mage@w=80&h=80&url=http%3A%2F%2F126.fm%2F46NVMe | Bin 1902 -> 0 bytes ...image@w=80&h=80&url=http%3A%2F%2F126.fm%2FTyjFq | Bin 1757 -> 0 bytes ...mage@w=80&h=80&url=http%3A%2F%2F126.fm%2F3SWBUh | Bin 1512 -> 0 bytes ...ge@w=128&h=128&url=http%3A%2F%2F126.fm%2F3cAjJD | Bin 3307 -> 0 bytes .../163.com/p.mail.163.com/mailinfo/img/mail1.gif | Bin 576 -> 0 bytes .../163.com/p.mail.163.com/mailinfo/img/mail2.gif | Bin 574 -> 0 bytes .../mailinfo/ntes_mail_info_www_1222.js | 156 - .../mailinfo/shownewmsg_www_1222.htm.html | 25 - ...ate=homepage&cat=homepage&type=flash&location=1 | 1 - .../tp5/163.com/qn.163.com/images/qnyh20110411.jpg | Bin 3411 -> 0 bytes ...6413&cus=0_0_0_0_0&wh=360x100&btype=1&js=1.html | 8 - .../chrome/tp5/163.com/www.163.com/index.html | 4024 -------------------- .../chrome/tp5/163.com/www.163.com/mediav.gif | 8 - .../2011032517331513260_2342_190180.js | 1 - mobile/android/tests/browser/chrome/tp5/README | 1 - .../c.baidu.com/c.gif@t=0&q=mozilla&p=0&pn=1.html | 0 .../open.baidu.com/stat/image/Icon_Aladdin.gif | Bin 534 -> 0 bytes .../www.baidu.com/aladdin/img/table/bg.gif | Bin 3241 -> 0 bytes .../chrome/tp5/baidu.com/www.baidu.com/img/arr.gif | Bin 254 -> 0 bytes .../baidu.com/www.baidu.com/img/baidu_jgylogo1.gif | Bin 708 -> 0 bytes .../chrome/tp5/baidu.com/www.baidu.com/img/i2.png | Bin 575 -> 0 bytes .../baidu.com/www.baidu.com/js/bdsug.js@v=1.0.3.0 | 1 - .../tp5/baidu.com/www.baidu.com/s@wd=mozilla.html | 123 - .../tp5/baidu.com/www.baidu.com/user/js/u.js | 1 - ...c.co.uk%2Fnews%2F&c5=&c6=&c15=&cv=1.3&cj=1.html | 0 .../1/H.21--NS/0@AQB=1&pccr=true&AQE=1 | Bin 43 -> 0 bytes .../tp5/bbc.co.uk/edge.quantserve.com/quant.js | 28 - .../js.revsci.net/gateway/gw.js@csid=J08781 | 4 - ...sjson@edition=us&site=news§ion=%2FFrontpage | 195 - .../css/screen/shared/19_58/3pt_ads.css | 1 - .../img/1_0_1/cream/hi/news/news-blocks.gif | Bin 1657 -> 0 bytes .../js/app/bbccom/19_52/s_code.js | 1091 ------ .../js/app/bbccom/19_61/bbccom.js | 1 - .../js/common/3_2/bbc_fmtj_common.js | 1 - .../js/config/apps/4_5/bbc_fmtj_config.js | 1 - .../news.bbcimg.co.uk/js/core/3_2/bbc_fmtj.js | 1 - .../js/locationservices/locator/v4_0/locator.js | 1 - .../images/50112000/jpg/_50112416_010706746-1.jpg | Bin 11114 -> 0 bytes .../images/50906000/jpg/_50906324_006353309-2.jpg | Bin 3541 -> 0 bytes .../images/51990000/jpg/_51990536_011672235-1.jpg | Bin 5558 -> 0 bytes .../52015000/jpg/_52015349_flag_reuters_144.jpg | Bin 6663 -> 0 bytes .../media/images/52054000/jpg/_52054442_mj.144.jpg | Bin 4326 -> 0 bytes .../images/52057000/jpg/_52057539_arniecomp.jpg | Bin 3448 -> 0 bytes .../52058000/jpg/_52058296_holdring_thinks.jpg | Bin 2444 -> 0 bytes .../52058000/jpg/_52058744_jex_1012144_de27-1.jpg | Bin 3705 -> 0 bytes .../images/52063000/jpg/_52063276_52063272.jpg | Bin 4166 -> 0 bytes .../images/52064000/jpg/_52064940_94471941.jpg | Bin 4893 -> 0 bytes .../jpg/_52065323_aionscreenshot,ncsoft.jpg | Bin 5113 -> 0 bytes .../52068000/jpg/_52068942_jex_1012675_de09-1.jpg | Bin 3628 -> 0 bytes .../images/52069000/jpg/_52069270_011711396-1.jpg | Bin 3051 -> 0 bytes .../images/52072000/jpg/_52072075_52072074.jpg | Bin 13528 -> 0 bytes .../media/images/52072000/jpg/_52072121_-3.jpg | Bin 2890 -> 0 bytes .../52072000/jpg/_52072276_jex_1012855_de27-1.jpg | Bin 3829 -> 0 bytes .../images/52073000/jpg/_52073406_008253948-1.jpg | Bin 6021 -> 0 bytes .../images/52073000/jpg/_52073764_011717136-1.jpg | Bin 2708 -> 0 bytes .../52074000/jpg/_52074033_jex_1013006_de27.jpg | Bin 4850 -> 0 bytes .../52075000/jpg/_52075786_stewart_getty304.jpg | Bin 4819 -> 0 bytes .../52076000/jpg/_52076863_jex_1013152_de27-1.jpg | Bin 5668 -> 0 bytes .../52077000/jpg/_52077604_jex_1013246_de27-1.jpg | Bin 4745 -> 0 bytes .../images/52077000/jpg/_52077792_52077791.jpg | Bin 4397 -> 0 bytes .../images/52077000/jpg/_52077993_ivory_coast.jpg | Bin 5486 -> 0 bytes .../images/52078000/jpg/_52078134_astuteshoot.jpg | Bin 5378 -> 0 bytes .../52078000/jpg/_52078945_jex_1013338_de27-1.jpg | Bin 5509 -> 0 bytes .../52079000/jpg/_52079170_jex_1013354_de30-1.jpg | Bin 6634 -> 0 bytes .../cg_bbccom_banner_sprite2.png | Bin 42881 -> 0 bytes .../1_4_11/cream/hi/news/components/components.css | 1 - .../1_4_11/cream/hi/news/img/accordian_overlay.png | Bin 2910 -> 0 bytes .../1_4_11/cream/hi/news/img/arrow_foldout.gif | Bin 1056 -> 0 bytes .../1_4_11/cream/hi/news/img/arrow_foldout.png | Bin 351 -> 0 bytes .../view/1_4_11/cream/hi/news/img/england-map.png | Bin 3899 -> 0 bytes .../hi/news/img/geo-digest-vertical-panel.gif | Bin 126 -> 0 bytes .../1_4_11/cream/hi/news/img/languages-sprite.gif | Bin 11937 -> 0 bytes .../cream/hi/news/img/livestats-sprite-ko.png | Bin 4729 -> 0 bytes .../1_4_11/cream/hi/news/img/livestats-sprite.gif | Bin 4687 -> 0 bytes .../view/1_4_11/cream/hi/news/img/nav-divider.png | Bin 126 -> 0 bytes .../1_4_11/cream/hi/news/img/news_masthead.gif | Bin 970 -> 0 bytes .../hi/news/img/personalisation-help-icon.gif | Bin 139 -> 0 bytes .../cream/hi/news/img/programmes-iplayer-brand.png | Bin 2240 -> 0 bytes .../view/1_4_11/cream/hi/news/img/red-masthead.png | Bin 37257 -> 0 bytes .../view/1_4_11/cream/hi/news/img/roadicon.gif | Bin 185 -> 0 bytes .../cream/hi/news/img/scotland-map-hover.png | Bin 8445 -> 0 bytes .../1_4_11/cream/hi/news/img/scotland-map.png@v.2 | Bin 3600 -> 0 bytes .../cream/hi/news/img/sprite_most_watched.gif | Bin 5093 -> 0 bytes .../cream/hi/news/img/sprite_most_watched_ko.png | Bin 3460 -> 0 bytes .../view/1_4_11/cream/hi/news/img/story_sprite.gif | Bin 2181 -> 0 bytes .../1_4_11/cream/hi/news/img/subnav-divider.png | Bin 126 -> 0 bytes .../1_4_11/cream/hi/news/img/wales-map-hover.png | Bin 2248 -> 0 bytes .../view/1_4_11/cream/hi/news/img/wales-map.png | Bin 2599 -> 0 bytes .../view/1_4_11/cream/hi/news/img/world-map.png | Bin 10166 -> 0 bytes .../view/1_4_11/cream/hi/news/skin.css | 1 - .../view/1_4_9/cream/hi/shared/global.css | 1 - .../1_4_9/cream/hi/shared/img/GVL3-icons-test.png | Bin 15094 -> 0 bytes .../cream/hi/shared/img/carousel-prev-next-3.png | Bin 1594 -> 0 bytes .../view/1_4_9/cream/hi/shared/img/cbl.png | Bin 265 -> 0 bytes .../view/1_4_9/cream/hi/shared/img/cbr.png | Bin 250 -> 0 bytes .../1_4_9/cream/hi/shared/img/foldout-arrow.gif | Bin 2284 -> 0 bytes .../view/1_4_9/cream/hi/shared/img/gvl3-grid-2.png | Bin 296 -> 0 bytes .../1_4_9/cream/hi/shared/img/gvl3-icons-0-2.gif | Bin 10638 -> 0 bytes .../1_4_9/cream/hi/shared/img/gvl3-icons-0-2.png | Bin 16784 -> 0 bytes .../hi/shared/img/gvl3-live-icon-inverted.gif | Bin 186 -> 0 bytes .../cream/hi/shared/img/icons/listen-charcoal.png | Bin 300 -> 0 bytes .../cream/hi/shared/img/icons/play-charcoal.png | Bin 222 -> 0 bytes .../view/1_4_9/cream/hi/shared/img/index-quote.png | Bin 345 -> 0 bytes .../1_4_9/cream/hi/shared/img/live-icon-32.gif | Bin 371 -> 0 bytes .../1_4_9/cream/hi/shared/img/market-data-down.gif | Bin 110 -> 0 bytes .../1_4_9/cream/hi/shared/img/market-data-down.png | Bin 180 -> 0 bytes .../1_4_9/cream/hi/shared/img/market-data-up.gif | Bin 108 -> 0 bytes .../1_4_9/cream/hi/shared/img/market-data-up.png | Bin 189 -> 0 bytes .../1_4_9/cream/hi/shared/img/most_watched.png | Bin 1823 -> 0 bytes .../view/1_4_9/cream/hi/shared/img/search.png | Bin 390 -> 0 bytes .../1_4_9/cream/hi/shared/img/select-arrow.png | Bin 223 -> 0 bytes .../1_4_9/cream/hi/shared/img/services-alert.gif | Bin 1005 -> 0 bytes .../1_4_9/cream/hi/shared/img/services-mail.gif | Bin 256 -> 0 bytes .../1_4_9/cream/hi/shared/img/services-mobile.gif | Bin 123 -> 0 bytes .../1_4_9/cream/hi/shared/img/services-podcast.gif | Bin 210 -> 0 bytes .../1_4_9/cream/hi/shared/img/services-rss.gif | Bin 343 -> 0 bytes .../1_4_9/cream/hi/shared/img/story_sprite.gif | Bin 3595 -> 0 bytes .../1_4_9/cream/hi/shared/img/story_sprite.png | Bin 1859 -> 0 bytes .../1_4_9/cream/hi/shared/img/traffic_icon.gif | Bin 295 -> 0 bytes .../hi/shared/img/transparencies/rgba-0-0-0-07.png | Bin 130 -> 0 bytes .../view/1_4_9/cream/hi/shared/layout/index.css | 1 - .../view/1_4_9/cream/hi/shared/mobile.css | 1 - .../view/1_4_9/cream/hi/shared/print.css | 1 - .../view/1_4_9/cream/hi/shared/type.css | 300 -- .../node1.bbcimg.co.uk/glow/gloader.0.1.4.js | 18 - .../pixel.quantserve.com/pixel/p-ccrmZLtMqYB8w.gif | Bin 35 -> 0 bytes .../bbc.co.uk/pixel.quantserve.com/pixel/r.html | 0 .../tp5/bbc.co.uk/sa.bbc.co.uk/bbc/bbc/s.gif | Bin 43 -> 0 bytes .../tp5/bbc.co.uk/sa.bbc.co.uk/bbc/bbc/s.html | Bin 43 -> 0 bytes .../barlesque/1.3.2/newnav/img/search_icon.png | Bin 287 -> 0 bytes .../1.8.15/desktop/3/img/autosuggest_loader.gif | Bin 673 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/blocks/dark.png | Bin 1023 -> 0 bytes .../1.8.15/desktop/3/img/blocks/light.png | Bin 965 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/main_sprite.png | Bin 2063 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/mast_bg.png | Bin 158 -> 0 bytes .../1.8.15/desktop/3/img/mast_colours.png | Bin 666 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/more_arrow.png | Bin 3630 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/mothball/bg.jpg | Bin 336 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/mothball/i.gif | Bin 1278 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/nav_divider.png | Bin 130 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/panel.png | Bin 2257 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/search_icon.png | Bin 287 -> 0 bytes .../1.8.15/desktop/3/img/suggest_sprite.png | Bin 1200 -> 0 bytes .../1.8.15/desktop/3/img/suggest_sprite_rtl.png | Bin 1317 -> 0 bytes .../barlesque/1.8.15/desktop/3/img/tooltip.png | Bin 1274 -> 0 bytes .../barlesque/1.8.15/desktop/3/script/barlesque.js | 1 - .../barlesque/1.8.15/desktop/3/style/main.css | 1 - .../requirejs/0.6.4/sharedmodules/require.js | 1 - .../img/ic/304-170/1300928948164652012_1.jpg | Bin 14679 -> 0 bytes .../img/ic/304-170/130203147123329681316_1.jpg | Bin 15764 -> 0 bytes .../bbc.com/images/interstitial/arrow.gif | Bin 190 -> 0 bytes .../bbc.com/images/interstitial/header.gif | Bin 3642 -> 0 bytes .../bbc.com/images/interstitial/header_travel.gif | Bin 3642 -> 0 bytes .../tp5/bbc.co.uk/www.bbc.co.uk/news/index.html | 2982 --------------- .../blst.msn.com/as/wea3/i/en-us/law/30.gif | Bin 939 -> 0 bytes .../i/23/6B8E88315584A40B04E32D89551E.jpg | Bin 7805 -> 0 bytes .../i/2F/9EFAECEC174B21FB83D10C82522D2.jpg | Bin 3070 -> 0 bytes .../i/38/FAF3346E94CF4579ECAB641703868.jpg | Bin 3178 -> 0 bytes .../i/5B/CC662FC6233C7449D9C7F9796801D.jpg | Bin 13639 -> 0 bytes .../i/76/CAF5FAB7F245F96327F2B4C806D.jpg | Bin 8252 -> 0 bytes .../i/80/82E2A652E4A790B140675E74293AD6.jpg | Bin 4090 -> 0 bytes .../i/B7/EB75D45B8948F72EE451223E95A96.gif | Bin 2477 -> 0 bytes .../i/CE/19F603C3122D48B6554BBD495195.jpg | Bin 9665 -> 0 bytes .../i/CF/59B3CB34EF11B221719175143187.jpg | Bin 3115 -> 0 bytes .../i/D8/41FF8CA0A47CC8208E684FA1BE6D6.jpg | Bin 10214 -> 0 bytes .../i/E2/37BA92E210D341BFDBF4126422A3D2.gif | Bin 657 -> 0 bytes .../i/EA/9BECE90994978BFAE6F38561515E8.jpg | Bin 3964 -> 0 bytes .../i/FF/6B3EB94D554DA0488C66DC31482D48.jpg | Bin 4099 -> 0 bytes .../col.stc.s-msn.com/br/gbl/lg/csl/favicon.ico | Bin 4286 -> 0 bytes .../sc/css/1d/b0ebeba5ed4ca3c158e6d6059f5074.css | 1 - .../br/sc/i/07/617475cf39bf6f5c0bd6ecb985335c.gif | Bin 48 -> 0 bytes .../br/sc/i/09/4ebdf19a1ce03cce12e11926256422.gif | Bin 79 -> 0 bytes .../br/sc/i/0c/c57bc2a7d38843d7c4aa8028fc9f82.gif | Bin 1142 -> 0 bytes .../br/sc/i/11/999518480e3c07301320f84f4bd855.png | Bin 384 -> 0 bytes .../br/sc/i/16/9798fea395258497f598bba500bf83.png | Bin 2257 -> 0 bytes .../br/sc/i/1a/57011fe37f98be0ee74ce87a62ba9b.png | Bin 13041 -> 0 bytes .../br/sc/i/50/f63ed0301e8b02a8a42d8590a46291.gif | Bin 1383 -> 0 bytes .../br/sc/i/61/379589e51e05637f600f129f305b52.png | Bin 1616 -> 0 bytes .../br/sc/i/61/def0ebad64d00fda0702cb7b8179ea.png | Bin 4670 -> 0 bytes .../br/sc/i/62/b5797d19976f0955d6d5d5c87ec996.jpg | Bin 12284 -> 0 bytes .../br/sc/i/77/b23a82d78a0605243aad8f44e8c079.gif | Bin 56 -> 0 bytes .../sc/i/94/8b0fe9bcd1399077fdc9374e5f314d_1.png | Bin 12823 -> 0 bytes .../br/sc/i/b9/ab98403e7de9ce52839e5de99d27e5.gif | Bin 203 -> 0 bytes .../br/sc/i/c6/7980776cb684844c20339b839ac35e.gif | Bin 7210 -> 0 bytes .../br/sc/i/d7/fb6441a4c45cb3a3b2f592d914a3cd.gif | Bin 72 -> 0 bytes .../br/sc/i/f8/614595fba50d96389708a4135776e4.gif | Bin 43 -> 0 bytes .../br/sc/i/fb/f017d9e8cc630c5e02659b6eaf35fa.gif | Bin 2544 -> 0 bytes .../br/sc/i/ff/290e7f0b12fa8a201581c74c1ae75a.gif | Bin 74 -> 0 bytes .../br/sc/i/icons/BING_websearch_2.jpg | Bin 4082 -> 0 bytes .../br/sc/i/icons/adchoices_gif.gif | Bin 554 -> 0 bytes .../br/sc/js/jquery/jquery-1.4.2.min.js | 154 - ...r-Woods-1120pm-PI_20110407142414593_116_175.JPG | Bin 8415 -> 0 bytes .../browser/chrome/tp5/msn.com/udc.msn.com/c.gif | Bin 42 -> 0 bytes .../tp5/msn.com/www.bing.com/partner/primedns.gif | Bin 43 -> 0 bytes .../chrome/tp5/msn.com/www.msn.com/index.html | 13 - .../a0.twimg.com/a/1302214109/images/loader.gif | Bin 759 -> 0 bytes .../a/1302214109/images/twitter_logo_header.png | Bin 3079 -> 0 bytes .../javascripts/lib/jquery.tipsy.min.js@1302114648 | 3 - .../javascripts/lib/mustache.js@1302114648 | 403 -- .../151aec2f-1534-4f61-9f3e-1e787cb51a8b_mini.png | Bin 2006 -> 0 bytes .../5c42a320-1e91-4d89-a034-0f140d2f23ba_mini.png | Bin 1946 -> 0 bytes .../profile_images/1277610502/Untitled-9_mini.jpg | Bin 2185 -> 0 bytes .../316019228/326994260_1117936370_0_mini.jpeg | Bin 544 -> 0 bytes .../81990615/nightexterior-1_mini.jpg | Bin 1506 -> 0 bytes ...32676789_1332990286_30703899_6344768_n_mini.jpg | Bin 503 -> 0 bytes .../default_profile_4_mini.png | Bin 543 -> 0 bytes .../a1.twimg.com/a/1302214109/images/favicon.ico | Bin 1150 -> 0 bytes .../a1.twimg.com/a/1302214109/images/icon_lock.gif | Bin 226 -> 0 bytes .../a/1302214109/images/reject_small.gif | Bin 385 -> 0 bytes .../a1.twimg.com/a/1302214109/images/spinner.gif | Bin 457 -> 0 bytes .../a/1302214109/images/sprite-icons.png | Bin 20815 -> 0 bytes .../a/1302214109/images/toggle_down_dark.png | Bin 258 -> 0 bytes .../javascripts/dismissable.js@1302114648 | 1 - .../stylesheets/following.css@1302114648.css | 1 - .../1239180764/GlassblowerX_mini.jpg | Bin 718 -> 0 bytes .../redsugarskullnecklace4-pola_mini.jpg | Bin 750 -> 0 bytes ...6787006838_550741838_2009237_6385345_n_mini.jpg | Bin 536 -> 0 bytes .../profile_images/754757071/rawr_mini.jpg | Bin 903 -> 0 bytes .../profile_images/874705507/01_3_mini.jpg | Bin 1068 -> 0 bytes ...833_100000395672538_70559_3952672_n_1__mini.jpg | Bin 582 -> 0 bytes .../a2.twimg.com/a/1302214109/images/ajax.gif | Bin 1737 -> 0 bytes .../a/1302214109/images/arr-inline-form.gif | Bin 68 -> 0 bytes .../a2.twimg.com/a/1302214109/images/arr2.gif | Bin 68 -> 0 bytes .../a/1302214109/images/arrow_right_dark.png | Bin 398 -> 0 bytes .../a/1302214109/images/bg-btn-blue.png | Bin 380 -> 0 bytes .../a/1302214109/images/bg-btn-signup_gold.png | Bin 346 -> 0 bytes .../a2.twimg.com/a/1302214109/images/btn-bg.gif | Bin 593 -> 0 bytes .../a/1302214109/images/btn_green_arrow.gif | Bin 1849 -> 0 bytes .../a/1302214109/images/btn_green_arrow_small.gif | Bin 1563 -> 0 bytes .../a/1302214109/images/btn_red_small.gif | Bin 1370 -> 0 bytes .../a/1302214109/images/buttons/bg-btn-blue.gif | Bin 635 -> 0 bytes .../a/1302214109/images/buttons/bg-btn-chart.gif | Bin 589 -> 0 bytes .../a/1302214109/images/buttons/bg-btn-dark.gif | Bin 612 -> 0 bytes .../a/1302214109/images/buttons/bg-btn-green.gif | Bin 600 -> 0 bytes .../a/1302214109/images/buttons/bg-btn-mint.gif | Bin 605 -> 0 bytes .../a/1302214109/images/buttons/bg-btn-pink.gif | Bin 609 -> 0 bytes .../a/1302214109/images/buttons/bg-btn-red.gif | Bin 592 -> 0 bytes .../a/1302214109/images/buttons/bg-btn-yellow.gif | Bin 947 -> 0 bytes .../a/1302214109/images/buttons/bg-btn.gif | Bin 594 -> 0 bytes .../a2.twimg.com/a/1302214109/images/checkmark.gif | Bin 64 -> 0 bytes .../a/1302214109/images/close_small.png | Bin 246 -> 0 bytes .../images/commercial/garuda-overlay.gif | Bin 162 -> 0 bytes .../a/1302214109/images/dialog_arrows_sprite.gif | Bin 232 -> 0 bytes .../a2.twimg.com/a/1302214109/images/divider.png | Bin 189 -> 0 bytes .../a2.twimg.com/a/1302214109/images/divot.gif | Bin 49 -> 0 bytes .../a2.twimg.com/a/1302214109/images/divvy-up.png | Bin 262 -> 0 bytes .../a2.twimg.com/a/1302214109/images/divvy.gif | Bin 99 -> 0 bytes .../a2.twimg.com/a/1302214109/images/divvy.png | Bin 276 -> 0 bytes .../a/1302214109/images/follow_check.gif | Bin 156 -> 0 bytes .../images/geo_chrome_help_banner_back.png | Bin 12138 -> 0 bytes .../1302214109/images/geo_creation_hint_arrow.gif | Bin 114 -> 0 bytes .../images/geo_firefox_help_banner_back.png | Bin 28756 -> 0 bytes .../images/geo_ie_gtb_help_banner_back.png | Bin 18814 -> 0 bytes .../a/1302214109/images/icon-mobile.gif | Bin 66 -> 0 bytes .../a2.twimg.com/a/1302214109/images/icon_add.png | Bin 3221 -> 0 bytes .../a/1302214109/images/icon_direct_reply.gif | Bin 371 -> 0 bytes .../a2.twimg.com/a/1302214109/images/icon_lock.gif | Bin 226 -> 0 bytes .../a/1302214109/images/icon_remove.png | Bin 3255 -> 0 bytes .../a/1302214109/images/icon_reply.gif | Bin 336 -> 0 bytes .../a/1302214109/images/icon_throbber.gif | Bin 864 -> 0 bytes .../a/1302214109/images/icon_trash.gif | Bin 148 -> 0 bytes .../a/1302214109/images/inline-media.png | Bin 30404 -> 0 bytes .../a/1302214109/images/larry-shadowed-big.png | Bin 3960 -> 0 bytes .../a/1302214109/images/lock_icon_small.png | Bin 282 -> 0 bytes .../a2.twimg.com/a/1302214109/images/more.gif | Bin 129 -> 0 bytes .../a/1302214109/images/nav_search_submit.png | Bin 634 -> 0 bytes .../a/1302214109/images/oauth2/check.png | Bin 242 -> 0 bytes .../a/1302214109/images/oauth2/connect_129px.png | Bin 6761 -> 0 bytes .../a/1302214109/images/oauth2/connect_146px.png | Bin 7595 -> 0 bytes .../a/1302214109/images/oauth2/connect_170px.png | Bin 8809 -> 0 bytes .../a/1302214109/images/oauth2/connect_236px.png | Bin 13755 -> 0 bytes .../images/oauth2/gradient-background.png | Bin 346 -> 0 bytes .../a/1302214109/images/oauth2/rays-box.jpg | Bin 4641 -> 0 bytes .../a/1302214109/images/oauth2/t_170px.png | Bin 392 -> 0 bytes .../a/1302214109/images/petal_spinner.gif | Bin 3971 -> 0 bytes .../a/1302214109/images/retweet/retweet-x.png | Bin 238 -> 0 bytes .../a/1302214109/images/round-btn-hover.gif | Bin 2470 -> 0 bytes .../a2.twimg.com/a/1302214109/images/round-btn.gif | Bin 2470 -> 0 bytes .../a2.twimg.com/a/1302214109/images/rss.gif | Bin 408 -> 0 bytes .../a2.twimg.com/a/1302214109/images/spinner.gif | Bin 457 -> 0 bytes .../a/1302214109/images/sprite-icons.png | Bin 20815 -> 0 bytes .../a/1302214109/images/sprite-icons.png@v3 | Bin 20815 -> 0 bytes .../images/tables/tablesorter-indicators.png | Bin 451 -> 0 bytes .../a/1302214109/images/thumb-bird-bw.gif | Bin 972 -> 0 bytes .../a/1302214109/images/tipsy/tipsy-east.gif | Bin 3224 -> 0 bytes .../a/1302214109/images/tipsy/tipsy-north.gif | Bin 3223 -> 0 bytes .../a/1302214109/images/tipsy/tipsy-south.gif | Bin 3222 -> 0 bytes .../a/1302214109/images/tipsy/tipsy-west.gif | Bin 3224 -> 0 bytes .../a/1302214109/images/toggle_closed.gif | Bin 70 -> 0 bytes .../a/1302214109/images/toggle_down_dark.gif | Bin 150 -> 0 bytes .../a/1302214109/images/toggle_down_dark.png | Bin 258 -> 0 bytes .../a/1302214109/images/toggle_down_light.gif | Bin 154 -> 0 bytes .../a/1302214109/images/toggle_down_light.png | Bin 277 -> 0 bytes .../a/1302214109/images/toggle_opened.gif | Bin 68 -> 0 bytes .../a/1302214109/images/toggle_up_dark.gif | Bin 150 -> 0 bytes .../a/1302214109/images/toggle_up_dark.png | Bin 288 -> 0 bytes .../a/1302214109/images/toptweet-overlay.gif | Bin 295 -> 0 bytes .../a/1302214109/images/translator/translator.png | Bin 995 -> 0 bytes .../a/1302214109/images/trendtip-pointer.gif | Bin 63 -> 0 bytes .../a/1302214109/images/verified/verified.png | Bin 737 -> 0 bytes .../1302214109/images/verified/verified_small.png | Bin 401 -> 0 bytes .../a/1302214109/images/warning-sign.png | Bin 4324 -> 0 bytes .../a/1302214109/javascripts/geov1.js@1302114648 | 1 - .../a/1302214109/javascripts/twitter.js@1302215522 | 2435 ------------ .../a/1302214109/phoenix/img/sprite-icons.png | Bin 20815 -> 0 bytes .../1302214109/stylesheets/geo.css@1302114648.css | 1 - .../stylesheets/twitter.css@1302114648.css | 1 - .../30261844/ICHCTwitterBG.jpg | Bin 172378 -> 0 bytes .../profile_images/1063331761/LOLmart_150_mini.jpg | Bin 967 -> 0 bytes .../profile_images/1124077786/batvatar_mini.png | Bin 4250 -> 0 bytes .../1155395599/Memebase_small_mini.png | Bin 7866 -> 0 bytes .../profile_images/1289641028/CH_mini.jpg | Bin 5381 -> 0 bytes .../profile_image_1301694822477_mini.jpg | Bin 550 -> 0 bytes .../profile_images/700174615/twitter_mini.png | Bin 845 -> 0 bytes .../724048626/Picture_3895-1_mini.jpg | Bin 1338 -> 0 bytes ...284054938_1317351118_31101620_485629_n_mini.jpg | Bin 1437 -> 0 bytes .../profile_images/959952929/ci_300x300_mini.jpg | Bin 359 -> 0 bytes .../default_profile_1_mini.png | Bin 619 -> 0 bytes .../default_profile_2_mini.png | Bin 712 -> 0 bytes .../default_profile_6_mini.png | Bin 706 -> 0 bytes .../a/1302214109/images/arrow_right_dark.png | Bin 398 -> 0 bytes .../a/1302214109/images/buttons/bg-btn.gif | Bin 594 -> 0 bytes .../a/1302214109/images/oauth2/check.png | Bin 242 -> 0 bytes .../a/1302214109/images/oauth2/connect_129px.png | Bin 6761 -> 0 bytes .../a/1302214109/images/oauth2/connect_146px.png | Bin 7595 -> 0 bytes .../a/1302214109/images/oauth2/connect_170px.png | Bin 8809 -> 0 bytes .../a/1302214109/images/oauth2/connect_236px.png | Bin 13755 -> 0 bytes .../images/oauth2/gradient-background.png | Bin 346 -> 0 bytes .../a/1302214109/images/oauth2/rays-box.jpg | Bin 4641 -> 0 bytes .../a/1302214109/images/oauth2/t_170px.png | Bin 392 -> 0 bytes .../a/1302214109/images/sprite-icons.png | Bin 20815 -> 0 bytes .../a/1302214109/javascripts/api.js@1302114648 | 1 - .../javascripts/lib/gears_init.js@1302114648 | 87 - .../stylesheets/buttons_new.css@1302114648.css | 1 - .../profile_images/1092057020/eli_avatar_mini.png | Bin 1441 -> 0 bytes .../1096286685/newpink_copy_mini.jpg | Bin 942 -> 0 bytes .../1110864280/41628_1144937489_2484_q_mini.jpg | Bin 890 -> 0 bytes .../27539_32561485399_2579_n_bigger.jpeg | Bin 5378 -> 0 bytes ...367531945_1621722394_1723810_2598069_o_mini.jpg | Bin 3734 -> 0 bytes ...6974151498_693676498_3960874_1853030_n_mini.jpg | Bin 4384 -> 0 bytes .../1302143328/Profile_copy_mini.jpg | Bin 24379 -> 0 bytes .../default_profile_3_mini.png | Bin 626 -> 0 bytes .../ajax/libs/jquery/1.3.0/jquery.min.js | 19 - .../twitter.com/twitter.com/ICHCheezburger.html | 1203 ------ .../chrome/tp5/twitter.com/www.google.com/jsapi | 39 - .../tests/browser/chrome/video_controls.html | 10 - .../tests/browser/chrome/video_discovery.html | 77 - .../tests/browser/chrome/video_discovery.sjs | 27 - .../android/tests/browser/chrome/web_channel.html | 89 - .../tests/browser/junit3/AndroidManifest.xml.in | 23 - mobile/android/tests/browser/junit3/Makefile.in | 13 - .../tests/browser/junit3/instrumentation.ini | 9 - mobile/android/tests/browser/junit3/moz.build | 55 - .../browser/junit3/res/drawable-hdpi/icon.png | Bin 7639 -> 0 bytes .../browser/junit3/res/drawable-ldpi/icon.png | Bin 2979 -> 0 bytes .../browser/junit3/res/drawable-mdpi/icon.png | Bin 4625 -> 0 bytes .../tests/browser/junit3/res/layout/main.xml | 12 - .../tests/browser/junit3/res/values/strings.xml | 6 - .../tests/browser/junit3/TestDistribution.java | 37 - .../browser/junit3/TestGeckoBackgroundThread.java | 56 - .../tests/browser/junit3/TestGeckoMenu.java | 72 - .../browser/junit3/TestGeckoProfilesProvider.java | 50 - .../tests/browser/junit3/TestGeckoSharedPrefs.java | 153 - .../tests/browser/junit3/TestImageDownloader.java | 205 - .../tests/browser/junit3/TestJarReader.java | 124 - .../tests/browser/junit3/TestRawResource.java | 66 - .../tests/browser/junit3/TestSuggestedSites.java | 473 --- .../harness/BrowserInstrumentationTestRunner.java | 33 - .../junit3/harness/BrowserTestListener.java | 42 - mobile/android/tests/browser/moz.build | 17 - .../tests/browser/robocop/AndroidManifest.xml.in | 67 - mobile/android/tests/browser/robocop/Firefox.jpg | Bin 9775 -> 0 bytes mobile/android/tests/browser/robocop/Makefile.in | 67 - mobile/android/tests/browser/robocop/README | 12 - mobile/android/tests/browser/robocop/README.rst | 61 - mobile/android/tests/browser/robocop/assets/README | 4 - .../robocop/assets/browser_db_upgrade/v27.db | Bin 114688 -> 0 bytes .../robocop/assets/browser_db_upgrade/v28.db | Bin 116736 -> 0 bytes .../robocop/assets/browser_db_upgrade/v29.db | Bin 117760 -> 0 bytes .../robocop/assets/browser_db_upgrade/v30.db | Bin 368640 -> 0 bytes .../robocop/assets/browser_db_upgrade/v31.db | Bin 352256 -> 0 bytes .../robocop/assets/browser_db_upgrade/v32.db | Bin 360448 -> 0 bytes .../robocop/assets/browser_db_upgrade/v33.db | Bin 360448 -> 0 bytes .../robocop/assets/browser_db_upgrade/v34.db | Bin 610304 -> 0 bytes .../robocop/assets/browser_db_upgrade/v35.db | Bin 622593 -> 0 bytes .../assets/ico_decoder_favicons/golem_favicon.ico | Bin 40648 -> 0 bytes .../ico_decoder_favicons/microsoft_favicon.ico | Bin 17174 -> 0 bytes .../assets/ico_decoder_favicons/nvidia_favicon.ico | Bin 25214 -> 0 bytes .../tests/browser/robocop/assets/mock-package.zip | Bin 5650 -> 0 bytes .../reading_list_bookmarks_migration/browser.db | Bin 466944 -> 0 bytes .../readercache/DWUP3U4ERC6TKJVSYXKJLHHEFY.json | 1 - .../readercache/KWNV7PXD3JFOJBQJVFXI3CQKNE.json | 1 - .../browser/robocop/assets/testcheck2-motionevents | 444 --- mobile/android/tests/browser/robocop/green.swf | Bin 112 -> 0 bytes .../tests/browser/robocop/javascript_redirect.sjs | 8 - .../browser/robocop/libs/robotium-solo-5.5.4.jar | Bin 129423 -> 0 bytes .../tests/browser/robocop/link_discovery.html | 8 - mobile/android/tests/browser/robocop/moz.build | 34 - .../robocop/reader_mode_pages/basic_article.html | 16 - .../en/XULRunner/Build_Instructions.html | 373 -- .../robocop/reader_mode_pages/not_an_article.html | 132 - .../tests/browser/robocop/res/values/strings.xml | 9 - mobile/android/tests/browser/robocop/robocop.ini | 118 - .../android/tests/browser/robocop/robocop_404.sjs | 28 - .../tests/browser/robocop/robocop_adobe_flash.html | 17 - .../tests/browser/robocop/robocop_autophone.ini | 1 - .../tests/browser/robocop/robocop_big_link.html | 13 - .../tests/browser/robocop/robocop_big_mailto.html | 13 - .../tests/browser/robocop/robocop_blank_01.html | 7 - .../tests/browser/robocop/robocop_blank_02.html | 8 - .../tests/browser/robocop/robocop_blank_03.html | 7 - .../tests/browser/robocop/robocop_blank_04.html | 7 - .../tests/browser/robocop/robocop_blank_05.html | 7 - .../tests/browser/robocop/robocop_boxes.html | 42 - .../tests/browser/robocop/robocop_dynamic.sjs | 18 - .../tests/browser/robocop/robocop_geolocation.html | 20 - .../browser/robocop/robocop_getusermedia.html | 86 - .../browser/robocop/robocop_getusermedia2.html | 83 - .../android/tests/browser/robocop/robocop_head.js | 829 ---- .../tests/browser/robocop/robocop_input.html | 165 - .../tests/browser/robocop/robocop_javascript.html | 20 - .../robocop/robocop_link_to_slow_loading.html | 12 - .../tests/browser/robocop/robocop_login_01.html | 21 - .../tests/browser/robocop/robocop_login_02.html | 21 - .../browser/robocop/robocop_offline_storage.html | 8 - .../browser/robocop/robocop_picture_link.html | 13 - .../tests/browser/robocop/robocop_popup.html | 12 - .../tests/browser/robocop/robocop_search.html | 11 - .../browser/robocop/robocop_slow_loading.html | 23 - .../tests/browser/robocop/robocop_suggestions.sjs | 32 - .../tests/browser/robocop/robocop_testharness.js | 74 - .../tests/browser/robocop/robocop_text_page.html | 27 - .../tests/browser/robocop/roboextender/Makefile.in | 9 - .../roboextender/base/robocop_home_banner.html | 37 - .../base/robocop_prompt_gridinput.html | 51 - .../browser/robocop/roboextender/bootstrap.js | 65 - .../browser/robocop/roboextender/chrome.manifest | 1 - .../tests/browser/robocop/roboextender/install.rdf | 19 - .../tests/browser/robocop/roboextender/moz.build | 12 - .../tests/browser/robocop/simple_redirect.sjs | 5 - .../robocop/src/org/mozilla/gecko/Actions.java | 126 - .../robocop/src/org/mozilla/gecko/Assert.java | 25 - .../robocop/src/org/mozilla/gecko/Driver.java | 44 - .../robocop/src/org/mozilla/gecko/Element.java | 27 - .../gecko/FennecInstrumentationTestRunner.java | 79 - .../org/mozilla/gecko/FennecMochitestAssert.java | 254 -- .../src/org/mozilla/gecko/FennecNativeActions.java | 482 --- .../src/org/mozilla/gecko/FennecNativeDriver.java | 392 -- .../src/org/mozilla/gecko/FennecNativeElement.java | 116 - .../src/org/mozilla/gecko/FennecTalosAssert.java | 74 - .../LaunchFennecWithConfigurationActivity.java | 40 - .../src/org/mozilla/gecko/PaintedSurface.java | 105 - .../src/org/mozilla/gecko/RoboCopException.java | 24 - .../src/org/mozilla/gecko/RobocopShare1.java | 17 - .../src/org/mozilla/gecko/RobocopShare2.java | 17 - .../src/org/mozilla/gecko/RobocopUtils.java | 58 - .../src/org/mozilla/gecko/StructuredLogger.java | 188 - .../src/org/mozilla/gecko/tests/AboutHomeTest.java | 252 -- .../org/mozilla/gecko/tests/BaseRobocopTest.java | 288 -- .../src/org/mozilla/gecko/tests/BaseTest.java | 976 ----- .../gecko/tests/ContentContextMenuTest.java | 135 - .../mozilla/gecko/tests/ContentProviderTest.java | 255 -- .../org/mozilla/gecko/tests/DatabaseHelper.java | 170 - .../mozilla/gecko/tests/JavascriptBridgeTest.java | 107 - .../org/mozilla/gecko/tests/JavascriptTest.java | 87 - .../org/mozilla/gecko/tests/MotionEventHelper.java | 210 - .../mozilla/gecko/tests/MotionEventReplayer.java | 224 -- .../src/org/mozilla/gecko/tests/PixelTest.java | 117 - .../mozilla/gecko/tests/SelectionHandlerTest.java | 56 - .../src/org/mozilla/gecko/tests/SessionTest.java | 407 -- .../src/org/mozilla/gecko/tests/StringHelper.java | 401 -- .../src/org/mozilla/gecko/tests/UITest.java | 203 - .../src/org/mozilla/gecko/tests/UITestContext.java | 51 - .../gecko/tests/components/AboutHomeComponent.java | 193 - .../gecko/tests/components/AppMenuComponent.java | 295 -- .../gecko/tests/components/BaseComponent.java | 36 - .../gecko/tests/components/GeckoViewComponent.java | 343 -- .../gecko/tests/components/TabStripComponent.java | 56 - .../gecko/tests/components/ToolbarComponent.java | 326 -- .../gecko/tests/helpers/AssertionHelper.java | 112 - .../mozilla/gecko/tests/helpers/DeviceHelper.java | 108 - .../gecko/tests/helpers/FrameworkHelper.java | 94 - .../gecko/tests/helpers/GeckoClickHelper.java | 50 - .../mozilla/gecko/tests/helpers/GeckoHelper.java | 49 - .../gecko/tests/helpers/HelperInitializer.java | 30 - .../gecko/tests/helpers/JavascriptBridge.java | 394 -- .../tests/helpers/JavascriptMessageParser.java | 100 - .../gecko/tests/helpers/NavigationHelper.java | 104 - .../gecko/tests/helpers/RobotiumHelper.java | 43 - .../mozilla/gecko/tests/helpers/WaitHelper.java | 215 -- .../org/mozilla/gecko/tests/testANRReporter.java | 240 -- .../gecko/tests/testAboutHomePageNavigation.java | 107 - .../gecko/tests/testAboutHomeVisibility.java | 57 - .../src/org/mozilla/gecko/tests/testAboutPage.java | 47 - .../mozilla/gecko/tests/testAccessibleCarets.java | 76 - .../gecko/tests/testActivityStreamContextMenu.java | 94 - .../mozilla/gecko/tests/testAddSearchEngine.java | 172 - .../org/mozilla/gecko/tests/testAddonManager.java | 79 - .../org/mozilla/gecko/tests/testAdobeFlash.java | 39 - .../mozilla/gecko/tests/testAppMenuPathways.java | 77 - .../org/mozilla/gecko/tests/testAxisLocking.java | 58 - .../gecko/tests/testBackButtonInEditMode.java | 47 - .../src/org/mozilla/gecko/tests/testBookmark.java | 72 - .../mozilla/gecko/tests/testBookmarkFolders.java | 169 - .../mozilla/gecko/tests/testBookmarkKeyword.java | 28 - .../org/mozilla/gecko/tests/testBookmarklets.java | 46 - .../mozilla/gecko/tests/testBookmarksPanel.java | 174 - .../tests/testBrowserDatabaseHelperUpgrades.java | 150 - .../mozilla/gecko/tests/testBrowserDiscovery.java | 13 - .../mozilla/gecko/tests/testBrowserProvider.java | 1921 ---------- .../gecko/tests/testBrowserSearchVisibility.java | 69 - .../org/mozilla/gecko/tests/testBug1217581.java | 31 - .../src/org/mozilla/gecko/tests/testCheck2.java | 61 - .../src/org/mozilla/gecko/tests/testCheck3.java | 61 - .../src/org/mozilla/gecko/tests/testDBUtils.java | 70 - .../org/mozilla/gecko/tests/testDistribution.java | 556 --- .../org/mozilla/gecko/tests/testDoorHanger.java | 205 - .../mozilla/gecko/tests/testEventDispatcher.java | 450 --- .../org/mozilla/gecko/tests/testFilePicker.java | 52 - .../org/mozilla/gecko/tests/testFilterOpenTab.java | 133 - .../org/mozilla/gecko/tests/testFindInPage.java | 107 - .../mozilla/gecko/tests/testFlingCorrectness.java | 52 - .../org/mozilla/gecko/tests/testFormHistory.java | 104 - .../org/mozilla/gecko/tests/testGeckoProfile.java | 295 -- .../org/mozilla/gecko/tests/testGeckoRequest.java | 121 - .../org/mozilla/gecko/tests/testGetUserMedia.java | 159 - .../src/org/mozilla/gecko/tests/testHistory.java | 74 - .../mozilla/gecko/tests/testHistoryService.java | 12 - .../org/mozilla/gecko/tests/testHomeBanner.java | 94 - .../mozilla/gecko/tests/testHomeListsProvider.java | 118 - .../org/mozilla/gecko/tests/testICODecoder.java | 238 -- .../mozilla/gecko/tests/testInputConnection.java | 349 -- .../org/mozilla/gecko/tests/testInputUrlBar.java | 136 - .../src/org/mozilla/gecko/tests/testJarReader.java | 70 - .../mozilla/gecko/tests/testJavascriptBridge.java | 69 - .../mozilla/gecko/tests/testLinkContextMenu.java | 37 - .../src/org/mozilla/gecko/tests/testLoad.java | 23 - .../mozilla/gecko/tests/testLoginsProvider.java | 387 -- .../mozilla/gecko/tests/testMailToContextMenu.java | 26 - .../org/mozilla/gecko/tests/testNativeCrypto.java | 288 -- .../src/org/mozilla/gecko/tests/testNewTab.java | 65 - .../src/org/mozilla/gecko/tests/testOSLocale.java | 137 - .../mozilla/gecko/tests/testPanCorrectness.java | 49 - .../mozilla/gecko/tests/testPasswordEncrypt.java | 125 - .../mozilla/gecko/tests/testPasswordProvider.java | 104 - .../org/mozilla/gecko/tests/testPermissions.java | 72 - .../gecko/tests/testPictureLinkContextMenu.java | 52 - .../org/mozilla/gecko/tests/testPrefsObserver.java | 81 - .../mozilla/gecko/tests/testPrivateBrowsing.java | 89 - .../mozilla/gecko/tests/testPromptGridInput.java | 47 - .../gecko/tests/testReaderCacheMigration.java | 62 - .../mozilla/gecko/tests/testReaderModeTitle.java | 19 - .../mozilla/gecko/tests/testReadingListCache.java | 12 - .../tests/testReadingListToBookmarksMigration.java | 217 -- .../org/mozilla/gecko/tests/testRestrictions.java | 39 - .../gecko/tests/testRuntimePermissionsAPI.java | 48 - .../gecko/tests/testSearchHistoryProvider.java | 379 -- .../mozilla/gecko/tests/testSearchSuggestions.java | 115 - .../mozilla/gecko/tests/testSessionHistory.java | 37 - .../mozilla/gecko/tests/testSessionOOMRestore.java | 54 - .../mozilla/gecko/tests/testSessionOOMSave.java | 87 - .../src/org/mozilla/gecko/tests/testShareLink.java | 265 -- .../org/mozilla/gecko/tests/testSnackbarAPI.java | 52 - .../mozilla/gecko/tests/testStateWhileLoading.java | 40 - .../mozilla/gecko/tests/testStumblerSetting.java | 90 - .../org/mozilla/gecko/tests/testThumbnails.java | 116 - .../gecko/tests/testTrackingProtection.java | 65 - .../org/mozilla/gecko/tests/testUITelemetry.java | 56 - .../gecko/tests/testUnifiedTelemetryClientId.java | 265 -- .../org/mozilla/gecko/tests/testVideoControls.java | 9 - .../org/mozilla/gecko/tests/testVkbOverlap.java | 105 - .../browser/robocop/testAccessibleCarets.html | 45 - .../tests/browser/robocop/testAccessibleCarets.js | 323 -- .../browser/robocop/testAccessibleCarets2.html | 23 - .../tests/browser/robocop/testBrowserDiscovery.js | 150 - .../tests/browser/robocop/testEventDispatcher.js | 44 - .../tests/browser/robocop/testFilePicker.js | 73 - .../tests/browser/robocop/testFindInPage.js | 89 - .../tests/browser/robocop/testGeckoRequest.js | 40 - .../tests/browser/robocop/testHistoryService.js | 128 - .../tests/browser/robocop/testJavascriptBridge.js | 52 - .../browser/robocop/testReaderCacheMigration.js | 23 - .../tests/browser/robocop/testReadingListCache.js | 126 - .../browser/robocop/testRuntimePermissionsAPI.js | 20 - .../tests/browser/robocop/testSnackbarAPI.js | 21 - .../browser/robocop/testTrackingProtection.js | 166 - .../tests/browser/robocop/testUITelemetry.js | 154 - .../robocop/testUnifiedTelemetryClientId.js | 50 - .../tests/browser/robocop/testVideoControls.js | 157 - .../tests/browser/robocop/test_viewport.sjs | 33 - .../tests/browser/robocop/tracking_bad.html | 12 - .../tests/browser/robocop/tracking_good.html | 12 - .../tests/browser/robocop/video-pattern.ogg | Bin 299507 -> 0 bytes .../tests/browser/robocop/video-pattern.webm | Bin 220609 -> 0 bytes .../tests/browser/robocop/video_controls.html | 10 - 794 files changed, 44802 deletions(-) delete mode 100644 mobile/android/tests/browser/chrome/basic_article.html delete mode 100644 mobile/android/tests/browser/chrome/basic_article_mobile.html delete mode 100644 mobile/android/tests/browser/chrome/chrome.ini delete mode 100644 mobile/android/tests/browser/chrome/desktopmode_user_agent.sjs delete mode 100644 mobile/android/tests/browser/chrome/devicesearch.xml delete mode 100644 mobile/android/tests/browser/chrome/head.js delete mode 100644 mobile/android/tests/browser/chrome/head_search.js delete mode 100644 mobile/android/tests/browser/chrome/memory_page_1.html delete mode 100644 mobile/android/tests/browser/chrome/memory_page_2.html delete mode 100644 mobile/android/tests/browser/chrome/memory_page_3.html delete mode 100644 mobile/android/tests/browser/chrome/memory_page_4.html delete mode 100644 mobile/android/tests/browser/chrome/session_formdata_sample.html delete mode 100644 mobile/android/tests/browser/chrome/simpleservice.xml delete mode 100644 mobile/android/tests/browser/chrome/test_about_logins.html delete mode 100644 mobile/android/tests/browser/chrome/test_accounts.html delete mode 100644 mobile/android/tests/browser/chrome/test_android_log.html delete mode 100644 mobile/android/tests/browser/chrome/test_app_constants.html delete mode 100644 mobile/android/tests/browser/chrome/test_awsy_lite.html delete mode 100644 mobile/android/tests/browser/chrome/test_debugger_server.html delete mode 100644 mobile/android/tests/browser/chrome/test_desktop_useragent.html delete mode 100644 mobile/android/tests/browser/chrome/test_device_search_engine.html delete mode 100644 mobile/android/tests/browser/chrome/test_get_last_visited.html delete mode 100644 mobile/android/tests/browser/chrome/test_hidden_select_option.html delete mode 100644 mobile/android/tests/browser/chrome/test_home_provider.html delete mode 100644 mobile/android/tests/browser/chrome/test_identity_mode.html delete mode 100644 mobile/android/tests/browser/chrome/test_java_addons.html delete mode 100644 mobile/android/tests/browser/chrome/test_jni.html delete mode 100644 mobile/android/tests/browser/chrome/test_migrate_ui.html delete mode 100644 mobile/android/tests/browser/chrome/test_network_manager.html delete mode 100644 mobile/android/tests/browser/chrome/test_offline_page.html delete mode 100644 mobile/android/tests/browser/chrome/test_reader_view.html delete mode 100644 mobile/android/tests/browser/chrome/test_resource_substitutions.html delete mode 100644 mobile/android/tests/browser/chrome/test_restricted_profiles.html delete mode 100644 mobile/android/tests/browser/chrome/test_select_disabled.html delete mode 100644 mobile/android/tests/browser/chrome/test_selectoraddtab.html delete mode 100644 mobile/android/tests/browser/chrome/test_session_form_data.html delete mode 100644 mobile/android/tests/browser/chrome/test_session_scroll_position.html delete mode 100644 mobile/android/tests/browser/chrome/test_session_zombification.html delete mode 100644 mobile/android/tests/browser/chrome/test_shared_preferences.html delete mode 100644 mobile/android/tests/browser/chrome/test_simple_discovery.html delete mode 100644 mobile/android/tests/browser/chrome/test_video_discovery.html delete mode 100644 mobile/android/tests/browser/chrome/test_web_channel.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/163.wrating.com/a.gif@a=&c=860010-0503010000 delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/163.wrating.com/a1.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/adgeo.163.com/ad_cookies delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/analytics.163.com/ntes.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/jr@site=netease&affiliate=homepage&cat=homepage&type=adend&location=1 delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/jr@site=netease&affiliate=homepage&cat=homepage&type=popup&location=1 delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=banner360x65&location=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=banner360x65&location=2.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=2.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=3.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=5.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=6.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=2.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=3.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=4.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=5.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=6.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column600x80&location=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x100&location=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x100&location=2.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=2.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=3.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=4.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x300&location=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x300&location=2.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=textlinkhouse&location=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=textlinkhouse&location=2.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel1/55x20_bai.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel1/55x20_lan.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel5/008976/bolon_110302.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel5/360/360100_110318.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/6/20110406182512d4541.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408075741e084c.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040808080199ae7.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080835397174e.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080847137e997.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408085323b9296.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408092834ed61d.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080930016f866.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080934433598e.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040809550649773.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408104255a47ce.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104081119113f37f.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040811445023471.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040814544385564.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040815090608fd9.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/9/20110409022720f974c.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/netease/wzdzbs.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/digi/linzj/1102/03/191.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/img09/icon/icon.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/attr.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/icon_product_listv0.0.3.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/iconv0.0.7.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/neteasy_mallv0.0.1.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/theme_blue.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/yodao_bg_blue.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/game/20110216/ql/x/390x100.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/game/20110216/ql/x/600x80.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/hr/20110216/hz/360x100.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/03/ly/390x100.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/hy/190x100.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/wb/360x65.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/yd/190x180.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/7/20110407093718ef414.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/7/20110407202028db993.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104080728304dcb2.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408082635b6897.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104080828458908d.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040808393075049.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040809433960d68.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408100357df2b1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408115631ad273.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408120203d0f08.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104081242198a4ba.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040812525484a8f.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408125931e0a79.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408140704d246b.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408144428d419d.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040814452013ef7.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040814525199c07.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104082245192ae96.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/www/v2011/css/theme_blue1227.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/www/v2011/img/tg_news.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/163homepage/biaoshi.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/163homepage/bj110.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/rpic/fld3/fld_homepage.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/rpic/fld3/flsclasses.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/techpro/shangpin/20110331/36-65.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/techpro/tuangou/20110218/170-80.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/yodaoimages/pack.r091221/scripts/autocomplete.163.165290.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/auto/2011/3/30/20110330215354a8c7a.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/7/201104071025387042e.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/7/20110407103153df111.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/8/20110408105903d5d53.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/8/20110408110145beb70.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/cnews/js/ntes_jslib_1.x.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/edu/2011/4/6/20110406220601277f0.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/edu/2011/4/9/20110409001451f646c.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/ent/2011/4/8/20110408183341f6142.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/20110408091923ca1d8.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/20110408100456977e5.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/2011040810253254779.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/house/2011/4/7/201104070846149dec5.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/house/2011/4/8/20110408094024dfb90.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/lady/2011/4/7/20110407235235eb565.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/lady/2011/4/8/20110408082553b8653.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/2/24/20110224214610e49c1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/1/20110401105148c65f3.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/6/20110406140048c8dea.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/6/201104061402503e782.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/8/20110408175702d86a7.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/mobile/2011/4/8/201104080904537def0.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408164530e0dfd.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408224146ca253.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408234759dabf8.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/travel/2011/4/7/2011040719553034b7b.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/video/2011/4/8/20110408143144afad3.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/www/logo/logo_png.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/auto/2011/4/8/20110408091859b1da7.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/auto/2011/4/8/201104080930543aaa8.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/book/2011/4/8/20110408102221db369.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/digi/2011/4/8/20110408144717d8da9.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/20110408074407aed87.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/201104080804383b8a7.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/2011040809044637924.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/5/2011040502293054a8f.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/201104081007164a116.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/201104081009084803f.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/2011040811265683661.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/home/2011/4/7/20110407131936bb4ec.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/house/2011/4/8/201104080927161a54f.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/7/2011040711484089cba.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/8/20110408014720d3fc0.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/8/20110408224817711dd.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/life/2011/3/7/20110307134125752e1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/mobile/2011/4/8/2011040809135520264.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/photo/0008/2010-01-30/120x90_5U980MMS294H0008.JPG delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/sports/2011/4/8/20110408211535eae49.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/3/1/201103010846298829b.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/201104080929109dd6d.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/20110408121505602ea.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/20110408183832fdfa0.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/7/20110407105038a01d2.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/7/2011040715531564880.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/8/2011040809594909a0a.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/40YCPhfL6uaLg3xA4ISWew==/4227754150194064440.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/F4Oc-9fe_HYFRsSk0SRMmA==/4223532025543403580.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/VfPeCwJ6ufovjjY9ueyUxA==/4224939400426958880.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/chRhUK9Mxz9gdCzkEUzn5w==/4226346775310512150.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/nSvNUs-5vbkySqbYp-lnLw==/4226628250287222807.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/oimagea4.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2FPjU3g delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F2WEnFW delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F2x2iAO delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F40hcYl delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/oimageb2.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F46NVMe delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/oimageb3.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2FTyjFq delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/oimagec1.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F3SWBUh delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/oimagec7.ydstatic.com/image@w=128&h=128&url=http%3A%2F%2F126.fm%2F3cAjJD delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/img/mail1.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/img/mail2.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/ntes_mail_info_www_1222.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/shownewmsg_www_1222.htm.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/pro.163.com/js.ng/site=netease&affiliate=homepage&cat=homepage&type=flash&location=1 delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/qn.163.com/images/qnyh20110411.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/show.mediav.com/s@type=1&db=mediav&pub=118_2620_36413&cus=0_0_0_0_0&wh=360x100&btype=1&js=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/www.163.com/index.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/www.163.com/mediav.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/163.com/zjs.ipinyou.com/2011032517331513260_2342_190180.js delete mode 100644 mobile/android/tests/browser/chrome/tp5/README delete mode 100755 mobile/android/tests/browser/chrome/tp5/baidu.com/c.baidu.com/c.gif@t=0&q=mozilla&p=0&pn=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/baidu.com/open.baidu.com/stat/image/Icon_Aladdin.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/aladdin/img/table/bg.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/arr.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/baidu_jgylogo1.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/i2.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/js/bdsug.js@v=1.0.3.0 delete mode 100755 mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/s@wd=mozilla.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/user/js/u.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/b.scorecardresearch.com/b2@c1=2&c2=6035051&c3=&c4=www.bbc.co.uk%2Fnews%2F&c5=&c6=&c15=&cv=1.3&cj=1.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/bbc.112.2o7.net/b/ss/bbcwglobalprod/1/H.21--NS/0@AQB=1&pccr=true&AQE=1 delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/edge.quantserve.com/quant.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/js.revsci.net/gateway/gw.js@csid=J08781 delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbc.co.uk/js/app/av/emp/1_1_3_0_0_426652_426614_1/config.sjson@edition=us&site=news§ion=%2FFrontpage delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/css/screen/shared/19_58/3pt_ads.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/img/1_0_1/cream/hi/news/news-blocks.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/app/bbccom/19_52/s_code.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/app/bbccom/19_61/bbccom.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/common/3_2/bbc_fmtj_common.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/config/apps/4_5/bbc_fmtj_config.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/core/3_2/bbc_fmtj.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/locationservices/locator/v4_0/locator.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/50112000/jpg/_50112416_010706746-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/50906000/jpg/_50906324_006353309-2.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/51990000/jpg/_51990536_011672235-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52015000/jpg/_52015349_flag_reuters_144.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52054000/jpg/_52054442_mj.144.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52057000/jpg/_52057539_arniecomp.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52058000/jpg/_52058296_holdring_thinks.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52058000/jpg/_52058744_jex_1012144_de27-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52063000/jpg/_52063276_52063272.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52064000/jpg/_52064940_94471941.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52065000/jpg/_52065323_aionscreenshot,ncsoft.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52068000/jpg/_52068942_jex_1012675_de09-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52069000/jpg/_52069270_011711396-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52072000/jpg/_52072075_52072074.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52072000/jpg/_52072121_-3.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52072000/jpg/_52072276_jex_1012855_de27-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52073000/jpg/_52073406_008253948-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52073000/jpg/_52073764_011717136-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52074000/jpg/_52074033_jex_1013006_de27.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52075000/jpg/_52075786_stewart_getty304.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52076000/jpg/_52076863_jex_1013152_de27-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52077000/jpg/_52077604_jex_1013246_de27-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52077000/jpg/_52077792_52077791.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52077000/jpg/_52077993_ivory_coast.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52078000/jpg/_52078134_astuteshoot.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52078000/jpg/_52078945_jex_1013338_de27-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/media/images/52079000/jpg/_52079170_jex_1013354_de30-1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/sol/shared/img/v4/commonwealth_games_2010/cg_bbccom_banner_sprite2.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/components/components.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/accordian_overlay.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/arrow_foldout.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/arrow_foldout.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/england-map.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/geo-digest-vertical-panel.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/languages-sprite.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/livestats-sprite-ko.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/livestats-sprite.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/nav-divider.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/news_masthead.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/personalisation-help-icon.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/programmes-iplayer-brand.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/red-masthead.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/roadicon.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/scotland-map-hover.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/scotland-map.png@v.2 delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/sprite_most_watched.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/sprite_most_watched_ko.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/story_sprite.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/subnav-divider.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/wales-map-hover.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/wales-map.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/img/world-map.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_11/cream/hi/news/skin.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/global.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/GVL3-icons-test.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/carousel-prev-next-3.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/cbl.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/cbr.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/foldout-arrow.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/gvl3-grid-2.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/gvl3-icons-0-2.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/gvl3-icons-0-2.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/gvl3-live-icon-inverted.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/icons/listen-charcoal.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/icons/play-charcoal.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/index-quote.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/live-icon-32.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/market-data-down.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/market-data-down.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/market-data-up.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/market-data-up.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/most_watched.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/search.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/select-arrow.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/services-alert.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/services-mail.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/services-mobile.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/services-podcast.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/services-rss.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/story_sprite.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/story_sprite.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/traffic_icon.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/img/transparencies/rgba-0-0-0-07.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/layout/index.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/mobile.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/print.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/view/1_4_9/cream/hi/shared/type.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/node1.bbcimg.co.uk/glow/gloader.0.1.4.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/pixel.quantserve.com/pixel/p-ccrmZLtMqYB8w.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/pixel.quantserve.com/pixel/r.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/sa.bbc.co.uk/bbc/bbc/s.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/sa.bbc.co.uk/bbc/bbc/s.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.3.2/newnav/img/search_icon.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/autosuggest_loader.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/blocks/dark.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/blocks/light.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/main_sprite.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/mast_bg.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/mast_colours.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/more_arrow.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/mothball/bg.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/mothball/i.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/nav_divider.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/panel.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/search_icon.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/suggest_sprite.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/suggest_sprite_rtl.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/img/tooltip.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/script/barlesque.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/barlesque/1.8.15/desktop/3/style/main.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/frameworks/requirejs/0.6.4/sharedmodules/require.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/wwtravel/img/ic/304-170/1300928948164652012_1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/static.bbc.co.uk/wwtravel/img/ic/304-170/130203147123329681316_1.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/www.bbc.co.uk/bbc.com/images/interstitial/arrow.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/www.bbc.co.uk/bbc.com/images/interstitial/header.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/www.bbc.co.uk/bbc.com/images/interstitial/header_travel.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/bbc.co.uk/www.bbc.co.uk/news/index.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/blst.msn.com/as/wea3/i/en-us/law/30.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/23/6B8E88315584A40B04E32D89551E.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/2F/9EFAECEC174B21FB83D10C82522D2.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/38/FAF3346E94CF4579ECAB641703868.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/5B/CC662FC6233C7449D9C7F9796801D.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/76/CAF5FAB7F245F96327F2B4C806D.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/80/82E2A652E4A790B140675E74293AD6.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/B7/EB75D45B8948F72EE451223E95A96.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/CE/19F603C3122D48B6554BBD495195.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/CF/59B3CB34EF11B221719175143187.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/D8/41FF8CA0A47CC8208E684FA1BE6D6.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/E2/37BA92E210D341BFDBF4126422A3D2.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/EA/9BECE90994978BFAE6F38561515E8.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/FF/6B3EB94D554DA0488C66DC31482D48.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/gbl/lg/csl/favicon.ico delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/css/1d/b0ebeba5ed4ca3c158e6d6059f5074.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/07/617475cf39bf6f5c0bd6ecb985335c.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/09/4ebdf19a1ce03cce12e11926256422.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/0c/c57bc2a7d38843d7c4aa8028fc9f82.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/11/999518480e3c07301320f84f4bd855.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/16/9798fea395258497f598bba500bf83.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/1a/57011fe37f98be0ee74ce87a62ba9b.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/50/f63ed0301e8b02a8a42d8590a46291.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/61/379589e51e05637f600f129f305b52.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/61/def0ebad64d00fda0702cb7b8179ea.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/62/b5797d19976f0955d6d5d5c87ec996.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/77/b23a82d78a0605243aad8f44e8c079.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/94/8b0fe9bcd1399077fdc9374e5f314d_1.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/b9/ab98403e7de9ce52839e5de99d27e5.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/c6/7980776cb684844c20339b839ac35e.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/d7/fb6441a4c45cb3a3b2f592d914a3cd.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/f8/614595fba50d96389708a4135776e4.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/fb/f017d9e8cc630c5e02659b6eaf35fa.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/ff/290e7f0b12fa8a201581c74c1ae75a.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/icons/BING_websearch_2.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/icons/adchoices_gif.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/col.stj.s-msn.com/br/sc/js/jquery/jquery-1.4.2.min.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/static.foxsports.com/content/fscom/img/2011/04/07/040711-Golf-Tiger-Woods-1120pm-PI_20110407142414593_116_175.JPG delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/udc.msn.com/c.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/www.bing.com/partner/primedns.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/msn.com/www.msn.com/index.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/images/loader.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/images/twitter_logo_header.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/javascripts/lib/jquery.tipsy.min.js@1302114648 delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/javascripts/lib/mustache.js@1302114648 delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1129087853/151aec2f-1534-4f61-9f3e-1e787cb51a8b_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1139176116/5c42a320-1e91-4d89-a034-0f140d2f23ba_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1277610502/Untitled-9_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/316019228/326994260_1117936370_0_mini.jpeg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/81990615/nightexterior-1_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/959692632/13659_1215732676789_1332990286_30703899_6344768_n_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/sticky/default_profile_images/default_profile_4_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/favicon.ico delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/icon_lock.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/reject_small.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/spinner.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/sprite-icons.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/toggle_down_dark.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/javascripts/dismissable.js@1302114648 delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/stylesheets/following.css@1302114648.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/1239180764/GlassblowerX_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/1248229613/redsugarskullnecklace4-pola_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/333032766/5600_106787006838_550741838_2009237_6385345_n_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/754757071/rawr_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/874705507/01_3_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/959721336/16869_103046893051833_100000395672538_70559_3952672_n_1__mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/ajax.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arr-inline-form.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arr2.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arrow_right_dark.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/bg-btn-blue.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/bg-btn-signup_gold.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn-bg.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_green_arrow.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_green_arrow_small.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_red_small.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-blue.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-chart.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-dark.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-green.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-mint.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-pink.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-red.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-yellow.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/checkmark.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/close_small.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/commercial/garuda-overlay.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/dialog_arrows_sprite.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divider.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divot.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy-up.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/follow_check.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_chrome_help_banner_back.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_creation_hint_arrow.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_firefox_help_banner_back.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_ie_gtb_help_banner_back.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon-mobile.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_add.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_direct_reply.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_lock.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_remove.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_reply.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_throbber.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_trash.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/inline-media.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/larry-shadowed-big.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/lock_icon_small.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/more.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/nav_search_submit.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/check.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_129px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_146px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_170px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_236px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/gradient-background.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/rays-box.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/t_170px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/petal_spinner.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/retweet/retweet-x.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/round-btn-hover.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/round-btn.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/rss.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/spinner.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/sprite-icons.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/sprite-icons.png@v3 delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tables/tablesorter-indicators.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/thumb-bird-bw.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-east.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-north.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-south.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-west.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_closed.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_dark.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_dark.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_light.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_light.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_opened.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_up_dark.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_up_dark.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toptweet-overlay.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/translator/translator.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/trendtip-pointer.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/verified/verified.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/verified/verified_small.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/warning-sign.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/javascripts/geov1.js@1302114648 delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/javascripts/twitter.js@1302215522 delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/phoenix/img/sprite-icons.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/stylesheets/geo.css@1302114648.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/stylesheets/twitter.css@1302114648.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_background_images/30261844/ICHCTwitterBG.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_images/1063331761/LOLmart_150_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_images/1124077786/batvatar_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_images/1155395599/Memebase_small_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_images/1289641028/CH_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_images/1296459376/profile_image_1301694822477_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_images/700174615/twitter_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_images/724048626/Picture_3895-1_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_images/959827428/25000_1397284054938_1317351118_31101620_485629_n_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/profile_images/959952929/ci_300x300_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/sticky/default_profile_images/default_profile_1_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/sticky/default_profile_images/default_profile_2_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/sticky/default_profile_images/default_profile_6_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/arrow_right_dark.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/buttons/bg-btn.gif delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/oauth2/check.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/oauth2/connect_129px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/oauth2/connect_146px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/oauth2/connect_170px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/oauth2/connect_236px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/oauth2/gradient-background.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/oauth2/rays-box.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/oauth2/t_170px.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/images/sprite-icons.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/javascripts/api.js@1302114648 delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/javascripts/lib/gears_init.js@1302114648 delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/a/1302214109/stylesheets/buttons_new.css@1302114648.css delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/profile_images/1092057020/eli_avatar_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/profile_images/1096286685/newpink_copy_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/profile_images/1110864280/41628_1144937489_2484_q_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/profile_images/1213876440/27539_32561485399_2579_n_bigger.jpeg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/profile_images/1260578495/191281_1758367531945_1621722394_1723810_2598069_o_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/profile_images/1299269362/10839_196974151498_693676498_3960874_1853030_n_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/profile_images/1302143328/Profile_copy_mini.jpg delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/a3.twimg.com/sticky/default_profile_images/default_profile_3_mini.png delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/twitter.com/ICHCheezburger.html delete mode 100755 mobile/android/tests/browser/chrome/tp5/twitter.com/www.google.com/jsapi delete mode 100644 mobile/android/tests/browser/chrome/video_controls.html delete mode 100644 mobile/android/tests/browser/chrome/video_discovery.html delete mode 100644 mobile/android/tests/browser/chrome/video_discovery.sjs delete mode 100644 mobile/android/tests/browser/chrome/web_channel.html delete mode 100644 mobile/android/tests/browser/junit3/AndroidManifest.xml.in delete mode 100644 mobile/android/tests/browser/junit3/Makefile.in delete mode 100644 mobile/android/tests/browser/junit3/instrumentation.ini delete mode 100644 mobile/android/tests/browser/junit3/moz.build delete mode 100644 mobile/android/tests/browser/junit3/res/drawable-hdpi/icon.png delete mode 100644 mobile/android/tests/browser/junit3/res/drawable-ldpi/icon.png delete mode 100644 mobile/android/tests/browser/junit3/res/drawable-mdpi/icon.png delete mode 100644 mobile/android/tests/browser/junit3/res/layout/main.xml delete mode 100644 mobile/android/tests/browser/junit3/res/values/strings.xml delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestDistribution.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestGeckoBackgroundThread.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestGeckoMenu.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestGeckoProfilesProvider.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestGeckoSharedPrefs.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestImageDownloader.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestJarReader.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestRawResource.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/TestSuggestedSites.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/harness/BrowserInstrumentationTestRunner.java delete mode 100644 mobile/android/tests/browser/junit3/src/org/mozilla/tests/browser/junit3/harness/BrowserTestListener.java delete mode 100644 mobile/android/tests/browser/moz.build delete mode 100644 mobile/android/tests/browser/robocop/AndroidManifest.xml.in delete mode 100644 mobile/android/tests/browser/robocop/Firefox.jpg delete mode 100644 mobile/android/tests/browser/robocop/Makefile.in delete mode 100644 mobile/android/tests/browser/robocop/README delete mode 100644 mobile/android/tests/browser/robocop/README.rst delete mode 100644 mobile/android/tests/browser/robocop/assets/README delete mode 100644 mobile/android/tests/browser/robocop/assets/browser_db_upgrade/v27.db delete mode 100644 mobile/android/tests/browser/robocop/assets/browser_db_upgrade/v28.db delete mode 100644 mobile/android/tests/browser/robocop/assets/browser_db_upgrade/v29.db delete mode 100644 mobile/android/tests/browser/robocop/assets/browser_db_upgrade/v30.db delete mode 100644 mobile/android/tests/browser/robocop/assets/browser_db_upgrade/v31.db delete mode 100644 mobile/android/tests/browser/robocop/assets/browser_db_upgrade/v32.db delete mode 100644 mobile/android/tests/browser/robocop/assets/browser_db_upgrade/v33.db delete mode 100644 mobile/android/tests/browser/robocop/assets/browser_db_upgrade/v34.db delete mode 100644 mobile/android/tests/browser/robocop/assets/browser_db_upgrade/v35.db delete mode 100644 mobile/android/tests/browser/robocop/assets/ico_decoder_favicons/golem_favicon.ico delete mode 100644 mobile/android/tests/browser/robocop/assets/ico_decoder_favicons/microsoft_favicon.ico delete mode 100644 mobile/android/tests/browser/robocop/assets/ico_decoder_favicons/nvidia_favicon.ico delete mode 100644 mobile/android/tests/browser/robocop/assets/mock-package.zip delete mode 100644 mobile/android/tests/browser/robocop/assets/reading_list_bookmarks_migration/browser.db delete mode 100644 mobile/android/tests/browser/robocop/assets/reading_list_bookmarks_migration/readercache/DWUP3U4ERC6TKJVSYXKJLHHEFY.json delete mode 100644 mobile/android/tests/browser/robocop/assets/reading_list_bookmarks_migration/readercache/KWNV7PXD3JFOJBQJVFXI3CQKNE.json delete mode 100644 mobile/android/tests/browser/robocop/assets/testcheck2-motionevents delete mode 100644 mobile/android/tests/browser/robocop/green.swf delete mode 100644 mobile/android/tests/browser/robocop/javascript_redirect.sjs delete mode 100644 mobile/android/tests/browser/robocop/libs/robotium-solo-5.5.4.jar delete mode 100644 mobile/android/tests/browser/robocop/link_discovery.html delete mode 100644 mobile/android/tests/browser/robocop/moz.build delete mode 100644 mobile/android/tests/browser/robocop/reader_mode_pages/basic_article.html delete mode 100644 mobile/android/tests/browser/robocop/reader_mode_pages/developer.mozilla.org/en/XULRunner/Build_Instructions.html delete mode 100644 mobile/android/tests/browser/robocop/reader_mode_pages/not_an_article.html delete mode 100644 mobile/android/tests/browser/robocop/res/values/strings.xml delete mode 100644 mobile/android/tests/browser/robocop/robocop.ini delete mode 100644 mobile/android/tests/browser/robocop/robocop_404.sjs delete mode 100644 mobile/android/tests/browser/robocop/robocop_adobe_flash.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_autophone.ini delete mode 100644 mobile/android/tests/browser/robocop/robocop_big_link.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_big_mailto.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_blank_01.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_blank_02.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_blank_03.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_blank_04.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_blank_05.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_boxes.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_dynamic.sjs delete mode 100644 mobile/android/tests/browser/robocop/robocop_geolocation.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_getusermedia.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_getusermedia2.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_head.js delete mode 100644 mobile/android/tests/browser/robocop/robocop_input.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_javascript.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_link_to_slow_loading.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_login_01.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_login_02.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_offline_storage.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_picture_link.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_popup.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_search.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_slow_loading.html delete mode 100644 mobile/android/tests/browser/robocop/robocop_suggestions.sjs delete mode 100644 mobile/android/tests/browser/robocop/robocop_testharness.js delete mode 100644 mobile/android/tests/browser/robocop/robocop_text_page.html delete mode 100644 mobile/android/tests/browser/robocop/roboextender/Makefile.in delete mode 100644 mobile/android/tests/browser/robocop/roboextender/base/robocop_home_banner.html delete mode 100644 mobile/android/tests/browser/robocop/roboextender/base/robocop_prompt_gridinput.html delete mode 100644 mobile/android/tests/browser/robocop/roboextender/bootstrap.js delete mode 100644 mobile/android/tests/browser/robocop/roboextender/chrome.manifest delete mode 100644 mobile/android/tests/browser/robocop/roboextender/install.rdf delete mode 100644 mobile/android/tests/browser/robocop/roboextender/moz.build delete mode 100644 mobile/android/tests/browser/robocop/simple_redirect.sjs delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Actions.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Assert.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Driver.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Element.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecInstrumentationTestRunner.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecMochitestAssert.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeActions.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeDriver.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeElement.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecTalosAssert.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/LaunchFennecWithConfigurationActivity.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/PaintedSurface.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RoboCopException.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopShare1.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopShare2.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopUtils.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/StructuredLogger.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/AboutHomeTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseRobocopTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentContextMenuTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentProviderTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/DatabaseHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptBridgeTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventReplayer.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/PixelTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/SelectionHandlerTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/SessionTest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/StringHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITestContext.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AboutHomeComponent.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AppMenuComponent.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/BaseComponent.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/GeckoViewComponent.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/TabStripComponent.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/ToolbarComponent.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/AssertionHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/DeviceHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/FrameworkHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/GeckoClickHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/GeckoHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/HelperInitializer.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/JavascriptBridge.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/JavascriptMessageParser.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/NavigationHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/RobotiumHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/WaitHelper.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testANRReporter.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomePageNavigation.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomeVisibility.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutPage.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAccessibleCarets.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testActivityStreamContextMenu.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAddSearchEngine.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAddonManager.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAdobeFlash.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAppMenuPathways.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAxisLocking.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBackButtonInEditMode.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmark.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarkFolders.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarkKeyword.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarklets.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarksPanel.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDatabaseHelperUpgrades.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDiscovery.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserProvider.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserSearchVisibility.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBug1217581.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testCheck2.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testCheck3.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDBUtils.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDistribution.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDoorHanger.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testEventDispatcher.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilePicker.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilterOpenTab.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFindInPage.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFlingCorrectness.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFormHistory.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGeckoProfile.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGeckoRequest.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGetUserMedia.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHistory.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHistoryService.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHomeBanner.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHomeListsProvider.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testICODecoder.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputConnection.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputUrlBar.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJarReader.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJavascriptBridge.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLinkContextMenu.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLoad.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLoginsProvider.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testMailToContextMenu.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNativeCrypto.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNewTab.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testOSLocale.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPanCorrectness.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordEncrypt.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordProvider.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPermissions.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPictureLinkContextMenu.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrefsObserver.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrivateBrowsing.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPromptGridInput.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReaderCacheMigration.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReaderModeTitle.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReadingListCache.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReadingListToBookmarksMigration.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testRestrictions.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testRuntimePermissionsAPI.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchHistoryProvider.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchSuggestions.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionHistory.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionOOMRestore.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionOOMSave.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testShareLink.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSnackbarAPI.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStateWhileLoading.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStumblerSetting.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testThumbnails.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testTrackingProtection.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testUITelemetry.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testUnifiedTelemetryClientId.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVideoControls.java delete mode 100644 mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVkbOverlap.java delete mode 100644 mobile/android/tests/browser/robocop/testAccessibleCarets.html delete mode 100644 mobile/android/tests/browser/robocop/testAccessibleCarets.js delete mode 100644 mobile/android/tests/browser/robocop/testAccessibleCarets2.html delete mode 100644 mobile/android/tests/browser/robocop/testBrowserDiscovery.js delete mode 100644 mobile/android/tests/browser/robocop/testEventDispatcher.js delete mode 100644 mobile/android/tests/browser/robocop/testFilePicker.js delete mode 100644 mobile/android/tests/browser/robocop/testFindInPage.js delete mode 100644 mobile/android/tests/browser/robocop/testGeckoRequest.js delete mode 100644 mobile/android/tests/browser/robocop/testHistoryService.js delete mode 100644 mobile/android/tests/browser/robocop/testJavascriptBridge.js delete mode 100644 mobile/android/tests/browser/robocop/testReaderCacheMigration.js delete mode 100644 mobile/android/tests/browser/robocop/testReadingListCache.js delete mode 100644 mobile/android/tests/browser/robocop/testRuntimePermissionsAPI.js delete mode 100644 mobile/android/tests/browser/robocop/testSnackbarAPI.js delete mode 100644 mobile/android/tests/browser/robocop/testTrackingProtection.js delete mode 100644 mobile/android/tests/browser/robocop/testUITelemetry.js delete mode 100644 mobile/android/tests/browser/robocop/testUnifiedTelemetryClientId.js delete mode 100644 mobile/android/tests/browser/robocop/testVideoControls.js delete mode 100644 mobile/android/tests/browser/robocop/test_viewport.sjs delete mode 100644 mobile/android/tests/browser/robocop/tracking_bad.html delete mode 100644 mobile/android/tests/browser/robocop/tracking_good.html delete mode 100644 mobile/android/tests/browser/robocop/video-pattern.ogg delete mode 100644 mobile/android/tests/browser/robocop/video-pattern.webm delete mode 100644 mobile/android/tests/browser/robocop/video_controls.html (limited to 'mobile/android/tests/browser') diff --git a/mobile/android/tests/browser/chrome/basic_article.html b/mobile/android/tests/browser/chrome/basic_article.html deleted file mode 100644 index f34cbece4..000000000 --- a/mobile/android/tests/browser/chrome/basic_article.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Article title - - - -
Site header
-
-

Article title

-

by Jane Doe

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.

-

Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.

-
- - diff --git a/mobile/android/tests/browser/chrome/basic_article_mobile.html b/mobile/android/tests/browser/chrome/basic_article_mobile.html deleted file mode 100644 index d89ff248d..000000000 --- a/mobile/android/tests/browser/chrome/basic_article_mobile.html +++ /dev/null @@ -1,19 +0,0 @@ - - - -Article title - - - - -
Site header
-
-

Article title

-

by Jane Doe

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.

-

Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.

-

Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.

-
- - diff --git a/mobile/android/tests/browser/chrome/chrome.ini b/mobile/android/tests/browser/chrome/chrome.ini deleted file mode 100644 index f190d6199..000000000 --- a/mobile/android/tests/browser/chrome/chrome.ini +++ /dev/null @@ -1,49 +0,0 @@ -[DEFAULT] -skip-if = os != 'android' -support-files = - basic_article.html - basic_article_mobile.html - desktopmode_user_agent.sjs - devicesearch.xml - head.js - head_search.js - session_formdata_sample.html - simpleservice.xml - video_controls.html - video_discovery.html - video_discovery.sjs - web_channel.html - tp5/** - -[test_about_logins.html] -[test_accounts.html] -[test_android_log.html] -[test_app_constants.html] -[test_awsy_lite.html] -# historically, we only run awsy on opt; gc times out on debug -skip-if = debug -[test_debugger_server.html] -[test_desktop_useragent.html] -[test_device_search_engine.html] -[test_get_last_visited.html] -[test_home_provider.html] -[test_hidden_select_option.html] -[test_identity_mode.html] -[test_java_addons.html] -[test_jni.html] -[test_migrate_ui.html] -[test_network_manager.html] -[test_offline_page.html] -skip-if = true # Bug 1241478 -[test_reader_view.html] -[test_resource_substitutions.html] -[test_restricted_profiles.html] -[test_select_disabled.html] -[test_selectoraddtab.html] -[test_session_form_data.html] -[test_session_scroll_position.html] -[test_session_zombification.html] -[test_shared_preferences.html] -[test_simple_discovery.html] -[test_video_discovery.html] -[test_web_channel.html] diff --git a/mobile/android/tests/browser/chrome/desktopmode_user_agent.sjs b/mobile/android/tests/browser/chrome/desktopmode_user_agent.sjs deleted file mode 100644 index 88cfb8f7e..000000000 --- a/mobile/android/tests/browser/chrome/desktopmode_user_agent.sjs +++ /dev/null @@ -1,11 +0,0 @@ -function handleRequest(request, response) -{ - // avoid confusing cache behaviors - response.setHeader("Cache-Control", "no-cache", false); - response.setHeader("Content-Type", "text/plain", false); - response.setHeader("Access-Control-Allow-Origin", "*", false); - - // used by mobile/desktop user agent tests - response.write(request.getHeader("User-Agent")); -} - diff --git a/mobile/android/tests/browser/chrome/devicesearch.xml b/mobile/android/tests/browser/chrome/devicesearch.xml deleted file mode 100644 index 5b472acf5..000000000 --- a/mobile/android/tests/browser/chrome/devicesearch.xml +++ /dev/null @@ -1,17 +0,0 @@ - - -Test search engine -A test search engine (based on Google search) -UTF-8 -data:image/png;base64,AAABAAEAEBAAAAEAGABoAwAAFgAAACgAAAAQAAAAIAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADs9Pt8xetPtu9FsfFNtu%2BTzvb2%2B%2Fne4dFJeBw0egA%2FfAJAfAA8ewBBegAAAAD%2B%2FPtft98Mp%2BwWsfAVsvEbs%2FQeqvF8xO7%2F%2F%2F63yqkxdgM7gwE%2FggM%2BfQA%2BegBDeQDe7PIbotgQufcMufEPtfIPsvAbs%2FQvq%2Bfz%2Bf%2F%2B%2B%2FZKhR05hgBBhQI8hgBAgAI9ewD0%2B%2Fg3pswAtO8Cxf4Kw%2FsJvvYAqupKsNv%2B%2Fv7%2F%2FP5VkSU0iQA7jQA9hgBDgQU%2BfQH%2F%2Ff%2FQ6fM4sM4KsN8AteMCruIqqdbZ7PH8%2Fv%2Fg6Nc%2Fhg05kAA8jAM9iQI%2BhQA%2BgQDQu6b97uv%2F%2F%2F7V8Pqw3eiWz97q8%2Ff%2F%2F%2F%2F7%2FPptpkkqjQE4kwA7kAA5iwI8iAA8hQCOSSKdXjiyflbAkG7u2s%2F%2B%2F%2F39%2F%2F7r8utrqEYtjQE8lgA7kwA7kwA9jwA9igA9hACiWSekVRyeSgiYSBHx6N%2F%2B%2Fv7k7OFRmiYtlAA5lwI7lwI4lAA7kgI9jwE9iwI4iQCoVhWcTxCmb0K%2BooT8%2Fv%2F7%2F%2F%2FJ2r8fdwI1mwA3mQA3mgA8lAE8lAE4jwA9iwE%2BhwGfXifWvqz%2B%2Ff%2F58u%2Fev6Dt4tr%2B%2F%2F2ZuIUsggA7mgM6mAM3lgA5lgA6kQE%2FkwBChwHt4dv%2F%2F%2F728ei1bCi7VAC5XQ7kz7n%2F%2F%2F6bsZkgcB03lQA9lgM7kwA2iQktZToPK4r9%2F%2F%2F9%2F%2F%2FSqYK5UwDKZAS9WALIkFn%2B%2F%2F3%2F%2BP8oKccGGcIRJrERILYFEMwAAuEAAdX%2F%2Ff7%2F%2FP%2B%2BfDvGXQLIZgLEWgLOjlf7%2F%2F%2F%2F%2F%2F9QU90EAPQAAf8DAP0AAfMAAOUDAtr%2F%2F%2F%2F7%2B%2Fu2bCTIYwDPZgDBWQDSr4P%2F%2Fv%2F%2F%2FP5GRuABAPkAA%2FwBAfkDAPAAAesAAN%2F%2F%2B%2Fz%2F%2F%2F64g1C5VwDMYwK8Yg7y5tz8%2Fv%2FV1PYKDOcAAP0DAf4AAf0AAfYEAOwAAuAAAAD%2F%2FPvi28ymXyChTATRrIb8%2F%2F3v8fk6P8MAAdUCAvoAAP0CAP0AAfYAAO4AAACAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQAA - - - - - - - - - -http://example.com/ - diff --git a/mobile/android/tests/browser/chrome/head.js b/mobile/android/tests/browser/chrome/head.js deleted file mode 100644 index 0ac8ed010..000000000 --- a/mobile/android/tests/browser/chrome/head.js +++ /dev/null @@ -1,72 +0,0 @@ -/* Any copyright is dedicated to the Public Domain. - http://creativecommons.org/publicdomain/zero/1.0/ */ - -function fuzzyEquals(a, b) { - return (Math.abs(a - b) < 1e-6); -} - -function promiseBrowserEvent(browser, eventType) { - return new Promise((resolve) => { - function handle(event) { - // Since we'll be redirecting, don't make assumptions about the given URL and the loaded URL - if (event.target != browser.contentDocument || event.target.location.href == "about:blank") { - info("Skipping spurious '" + eventType + "' event" + " for " + event.target.location.href); - return; - } - info("Received event " + eventType + " from browser"); - browser.removeEventListener(eventType, handle, true); - resolve(event); - } - - browser.addEventListener(eventType, handle, true); - info("Now waiting for " + eventType + " event from browser"); - }); -} - -function promiseTabEvent(container, eventType) { - return new Promise((resolve) => { - function handle(event) { - info("Received event " + eventType + " from container"); - container.removeEventListener(eventType, handle, true); - resolve(event); - } - - container.addEventListener(eventType, handle, true); - info("Now waiting for " + eventType + " event from container"); - }); -} - -function promiseNotification(topic) { - Cu.import("resource://gre/modules/Services.jsm"); - - return new Promise((resolve, reject) => { - function observe(subject, topic, data) { - info("Received " + topic + " notification from Gecko"); - Services.obs.removeObserver(observe, topic); - resolve(); - } - Services.obs.addObserver(observe, topic, false); - info("Now waiting for " + topic + " notification from Gecko"); - }); -} - -function promiseLinkVisit(url) { - Cu.import("resource://gre/modules/Services.jsm"); - - var topic = "link-visited"; - return new Promise((resolve, reject) => { - function observe(subject, topic, data) { - info("Received " + topic + " notification from Gecko"); - var uri = subject.QueryInterface(Ci.nsIURI); - if (uri.spec != url) { - info("Visited URL " + uri.spec + " is not desired URL " + url + "; ignoring."); - return; - } - info("Visited URL " + uri.spec + " is desired URL " + url); - Services.obs.removeObserver(observe, topic); - resolve(); - }; - Services.obs.addObserver(observe, topic, false); - info("Now waiting for " + topic + " notification from Gecko with URL " + url); - }); -} diff --git a/mobile/android/tests/browser/chrome/head_search.js b/mobile/android/tests/browser/chrome/head_search.js deleted file mode 100644 index b6fb94449..000000000 --- a/mobile/android/tests/browser/chrome/head_search.js +++ /dev/null @@ -1,46 +0,0 @@ -// Bits and pieces copied from toolkit/components/search/tests/xpcshell/head_search.js - -var { classes: Cc, interfaces: Ci, utils: Cu, results: Cr } = Components; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Task.jsm"); - -/** - * Adds test engines and returns a promise resolved when they are installed. - * - * The engines are added in the given order. - * - * @param aItems - * Array of objects with the following properties: - * { - * name: Engine name, used to wait for it to be loaded. - * details: Array containing the parameters of addEngineWithDetails, - * except for the engine name. Alternative to xmlFileName. - * } - */ -var addTestEngines = Task.async(function* (aItems) { - let engines = []; - - for (let item of aItems) { - yield new Promise((resolve, reject) => { - Services.obs.addObserver(function obs(subject, topic, data) { - try { - let engine = subject.QueryInterface(Ci.nsISearchEngine); - if (data != "engine-added" || engine.name != item.name) { - return; - } - - Services.obs.removeObserver(obs, "browser-search-engine-modified"); - engines.push(engine); - resolve(); - } catch (ex) { - reject(ex); - } - }, "browser-search-engine-modified", false); - - Services.search.addEngineWithDetails(item.name, ...item.details); - }); - } - - return engines; -}); diff --git a/mobile/android/tests/browser/chrome/memory_page_1.html b/mobile/android/tests/browser/chrome/memory_page_1.html deleted file mode 100644 index f34cbece4..000000000 --- a/mobile/android/tests/browser/chrome/memory_page_1.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Article title - - - -
Site header
-
-

Article title

-

by Jane Doe

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.

-

Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.

-
- - diff --git a/mobile/android/tests/browser/chrome/memory_page_2.html b/mobile/android/tests/browser/chrome/memory_page_2.html deleted file mode 100644 index f34cbece4..000000000 --- a/mobile/android/tests/browser/chrome/memory_page_2.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Article title - - - -
Site header
-
-

Article title

-

by Jane Doe

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.

-

Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.

-
- - diff --git a/mobile/android/tests/browser/chrome/memory_page_3.html b/mobile/android/tests/browser/chrome/memory_page_3.html deleted file mode 100644 index f34cbece4..000000000 --- a/mobile/android/tests/browser/chrome/memory_page_3.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Article title - - - -
Site header
-
-

Article title

-

by Jane Doe

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.

-

Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.

-
- - diff --git a/mobile/android/tests/browser/chrome/memory_page_4.html b/mobile/android/tests/browser/chrome/memory_page_4.html deleted file mode 100644 index f34cbece4..000000000 --- a/mobile/android/tests/browser/chrome/memory_page_4.html +++ /dev/null @@ -1,16 +0,0 @@ - - - -Article title - - - -
Site header
-
-

Article title

-

by Jane Doe

-

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean ut gravida lorem. Ut turpis felis, pulvinar a semper sed, adipiscing id dolor. Pellentesque auctor nisi id magna consequat sagittis. Curabitur dapibus enim sit amet elit pharetra tincidunt feugiat nisl imperdiet. Ut convallis libero in urna ultrices accumsan. Donec sed odio eros. Donec viverra mi quis quam pulvinar at malesuada arcu rhoncus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In rutrum accumsan ultricies. Mauris vitae nisi at sem facilisis semper ac in est.

-

Vivamus fermentum semper porta. Nunc diam velit, adipiscing ut tristique vitae, sagittis vel odio. Maecenas convallis ullamcorper ultricies. Curabitur ornare, ligula semper consectetur sagittis, nisi diam iaculis velit, id fringilla sem nunc vel mi. Nam dictum, odio nec pretium volutpat, arcu ante placerat erat, non tristique elit urna et turpis. Quisque mi metus, ornare sit amet fermentum et, tincidunt et orci. Fusce eget orci a orci congue vestibulum. Ut dolor diam, elementum et vestibulum eu, porttitor vel elit. Curabitur venenatis pulvinar tellus gravida ornare. Sed et erat faucibus nunc euismod ultricies ut id justo. Nullam cursus suscipit nisi, et ultrices justo sodales nec. Fusce venenatis facilisis lectus ac semper. Aliquam at massa ipsum. Quisque bibendum purus convallis nulla ultrices ultricies. Nullam aliquam, mi eu aliquam tincidunt, purus velit laoreet tortor, viverra pretium nisi quam vitae mi. Fusce vel volutpat elit. Nam sagittis nisi dui.

-
- - diff --git a/mobile/android/tests/browser/chrome/session_formdata_sample.html b/mobile/android/tests/browser/chrome/session_formdata_sample.html deleted file mode 100644 index f88e8668f..000000000 --- a/mobile/android/tests/browser/chrome/session_formdata_sample.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - session_formdata_sample.html - - - - - - - diff --git a/mobile/android/tests/browser/chrome/simpleservice.xml b/mobile/android/tests/browser/chrome/simpleservice.xml deleted file mode 100644 index f20becf1c..000000000 --- a/mobile/android/tests/browser/chrome/simpleservice.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - 1 - 0 - - http://example.com - - urn:dial-multiscreen-org:device:dial:1 - Pretend Device - Copy Cat Inc. - Eureka Dongle - uuid:5ec9ff92-e8b2-4a94-a72c-76b34e6dabb1 - - diff --git a/mobile/android/tests/browser/chrome/test_about_logins.html b/mobile/android/tests/browser/chrome/test_about_logins.html deleted file mode 100644 index 8e7b404fd..000000000 --- a/mobile/android/tests/browser/chrome/test_about_logins.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - Test for Bug 1136477 - - - - - - - - -Mozilla Bug 1136477 -
-Migrated from Robocop testAboutLogins -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_accounts.html b/mobile/android/tests/browser/chrome/test_accounts.html deleted file mode 100644 index 1f7b4469a..000000000 --- a/mobile/android/tests/browser/chrome/test_accounts.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - Test for Bug 917942 - - - - - - - -Mozilla Bug 917942 -
-Migrated from Robocop testAccounts -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_android_log.html b/mobile/android/tests/browser/chrome/test_android_log.html deleted file mode 100644 index 6048b3eb1..000000000 --- a/mobile/android/tests/browser/chrome/test_android_log.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Test for Bug 1004825 - - - - - - -Mozilla Bug 1004825 -
-Migrated from Robocop testAndroidLog -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_app_constants.html b/mobile/android/tests/browser/chrome/test_app_constants.html deleted file mode 100644 index 7989ca1b6..000000000 --- a/mobile/android/tests/browser/chrome/test_app_constants.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - Test for Bug 1130872 - - - - - - -Mozilla Bug 1130872 -
-Migrated from Robocop testAppConstants -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_awsy_lite.html b/mobile/android/tests/browser/chrome/test_awsy_lite.html deleted file mode 100644 index 066aaf2ea..000000000 --- a/mobile/android/tests/browser/chrome/test_awsy_lite.html +++ /dev/null @@ -1,258 +0,0 @@ - - - - - - Test for Bug 1233220 - - - - - - - - -Mozilla Bug 1233220 -
-

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_debugger_server.html b/mobile/android/tests/browser/chrome/test_debugger_server.html deleted file mode 100644 index a7b49ede6..000000000 --- a/mobile/android/tests/browser/chrome/test_debugger_server.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - Test for Bug 1010750 - - - - - - -Mozilla Bug 1010750 -
-Migrated from Robocop testDebuggerServer -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_desktop_useragent.html b/mobile/android/tests/browser/chrome/test_desktop_useragent.html deleted file mode 100644 index cfa82659a..000000000 --- a/mobile/android/tests/browser/chrome/test_desktop_useragent.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - Test for Bug 1157319 - - - - - - - - -Mozilla Bug 1157319 -
-Migrated from Robocop testDesktopUseragent -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_device_search_engine.html b/mobile/android/tests/browser/chrome/test_device_search_engine.html deleted file mode 100644 index bb67548cd..000000000 --- a/mobile/android/tests/browser/chrome/test_device_search_engine.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - Test for Bug 861164 - - - - - - -Mozilla Bug 861164 -
-Migrated from Robocop testDeviceSearchEngine -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_get_last_visited.html b/mobile/android/tests/browser/chrome/test_get_last_visited.html deleted file mode 100644 index da8a0fbfb..000000000 --- a/mobile/android/tests/browser/chrome/test_get_last_visited.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - Test for Bug 1214366 - - - - - - - - -Mozilla Bug 1214366 -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_hidden_select_option.html b/mobile/android/tests/browser/chrome/test_hidden_select_option.html deleted file mode 100644 index ecdfe710e..000000000 --- a/mobile/android/tests/browser/chrome/test_hidden_select_option.html +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - Test for Bug 1178722 - - - - - - - - - - -

- Mozilla Bug 1178722 - -

- -
-
- - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/test_home_provider.html b/mobile/android/tests/browser/chrome/test_home_provider.html deleted file mode 100644 index 542cd82c0..000000000 --- a/mobile/android/tests/browser/chrome/test_home_provider.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - Test for Bug 942288 - - - - - - - -Mozilla Bug 942288 -
-Migrated from Robocop testHomeProvider -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_identity_mode.html b/mobile/android/tests/browser/chrome/test_identity_mode.html deleted file mode 100644 index 5c41489a4..000000000 --- a/mobile/android/tests/browser/chrome/test_identity_mode.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - Test for getIdentityMode - - - - - - - - -Mozilla Bug 1099088 -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_java_addons.html b/mobile/android/tests/browser/chrome/test_java_addons.html deleted file mode 100644 index 7a656671a..000000000 --- a/mobile/android/tests/browser/chrome/test_java_addons.html +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Test for Bug 1168407 - - - - - - - -Mozilla Bug 1168407 -
-Migrated from Robocop testJavaAddons -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_jni.html b/mobile/android/tests/browser/chrome/test_jni.html deleted file mode 100644 index 5e0d045dc..000000000 --- a/mobile/android/tests/browser/chrome/test_jni.html +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - Test for Bug 873569 - - - - - - -Mozilla Bug 873569 -
-Migrated from Robocop testJNI -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_migrate_ui.html b/mobile/android/tests/browser/chrome/test_migrate_ui.html deleted file mode 100644 index 124b4b4f4..000000000 --- a/mobile/android/tests/browser/chrome/test_migrate_ui.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - Test for Bug 1154504 - - - - - - - -Mozilla Bug 1154504 -
-Migrated from Robocop testMigrateUI -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_network_manager.html b/mobile/android/tests/browser/chrome/test_network_manager.html deleted file mode 100644 index f21c68e72..000000000 --- a/mobile/android/tests/browser/chrome/test_network_manager.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - Test for Bug 895775 - - - - - - -Mozilla Bug 895775 -
-Migrated from Robocop testNetworkManager -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_offline_page.html b/mobile/android/tests/browser/chrome/test_offline_page.html deleted file mode 100644 index e1b723266..000000000 --- a/mobile/android/tests/browser/chrome/test_offline_page.html +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - Test for Bug 1089190 - - - - - - - - -Mozilla Bug 1089190 -
-Migrated from Robocop testOfflinePage -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_reader_view.html b/mobile/android/tests/browser/chrome/test_reader_view.html deleted file mode 100644 index 05b74e164..000000000 --- a/mobile/android/tests/browser/chrome/test_reader_view.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - Test for Bug 1158885 - - - - - - - - -Mozilla Bug 1158885 -
-Migrated from Robocop testReaderView -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_resource_substitutions.html b/mobile/android/tests/browser/chrome/test_resource_substitutions.html deleted file mode 100644 index 709ac112e..000000000 --- a/mobile/android/tests/browser/chrome/test_resource_substitutions.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - Test for Bug 948465 - - - - - - - -Mozilla Bug 948465 -
-Migrated from Robocop testResourceSubstitutions -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_restricted_profiles.html b/mobile/android/tests/browser/chrome/test_restricted_profiles.html deleted file mode 100644 index d699176b5..000000000 --- a/mobile/android/tests/browser/chrome/test_restricted_profiles.html +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - Test for Bug 1042715 - - - - - - -Mozilla Bug 1042715 -
-Migrated from Robocop testRestrictedProfiles -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_select_disabled.html b/mobile/android/tests/browser/chrome/test_select_disabled.html deleted file mode 100644 index d241f60ae..000000000 --- a/mobile/android/tests/browser/chrome/test_select_disabled.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - Test for Bug 1263589 - - - - - - - - - -

- -

- - - - - -
- -
-
- - -
- - -
- - -

- -
-
- - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/test_selectoraddtab.html b/mobile/android/tests/browser/chrome/test_selectoraddtab.html deleted file mode 100644 index b2c4ececa..000000000 --- a/mobile/android/tests/browser/chrome/test_selectoraddtab.html +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - Test for Bug 1216047 - - - - - - - - -Mozilla Bug 1216047 -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_session_form_data.html b/mobile/android/tests/browser/chrome/test_session_form_data.html deleted file mode 100644 index cf09350c7..000000000 --- a/mobile/android/tests/browser/chrome/test_session_form_data.html +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - Test for Bugs 671993, 1261225 - - - - - - - - -Mozilla Bug 671993 -Mozilla Bug 1261225 -
-Migrated from Robocop testSessionFormData -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_session_scroll_position.html b/mobile/android/tests/browser/chrome/test_session_scroll_position.html deleted file mode 100644 index cfbeb5164..000000000 --- a/mobile/android/tests/browser/chrome/test_session_scroll_position.html +++ /dev/null @@ -1,310 +0,0 @@ - - - - - - Test for Bug 810981 - - - - - - - - -Mozilla Bug 810981 -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_session_zombification.html b/mobile/android/tests/browser/chrome/test_session_zombification.html deleted file mode 100644 index eba255ff6..000000000 --- a/mobile/android/tests/browser/chrome/test_session_zombification.html +++ /dev/null @@ -1,185 +0,0 @@ - - - - - - Test for Bug 1044556 - - - - - - - - -Mozilla Bug 1044556 -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_shared_preferences.html b/mobile/android/tests/browser/chrome/test_shared_preferences.html deleted file mode 100644 index b1ed69e66..000000000 --- a/mobile/android/tests/browser/chrome/test_shared_preferences.html +++ /dev/null @@ -1,255 +0,0 @@ - - - - - - Test for Bug 866271 - - - - - - - -Mozilla Bug 866271 -
-Migrated from Robocop testSharedPreferences -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_simple_discovery.html b/mobile/android/tests/browser/chrome/test_simple_discovery.html deleted file mode 100644 index a8d84cfe5..000000000 --- a/mobile/android/tests/browser/chrome/test_simple_discovery.html +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - Test for Bug 938571 - - - - - - -Mozilla Bug 938571 -
-Migrated from Robocop testSimpleDiscovery -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_video_discovery.html b/mobile/android/tests/browser/chrome/test_video_discovery.html deleted file mode 100644 index f6fb60bbe..000000000 --- a/mobile/android/tests/browser/chrome/test_video_discovery.html +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - Test for Bug 953381 - - - - - - -Mozilla Bug 953381 -
-Migrated from Robocop testVideoDiscovery -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/test_web_channel.html b/mobile/android/tests/browser/chrome/test_web_channel.html deleted file mode 100644 index 3eeb5b527..000000000 --- a/mobile/android/tests/browser/chrome/test_web_channel.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - Test for Bug 1174458 - - - - - - - -Mozilla Bug 1174458 -
-Migrated from Robocop testWebChannel -

- -
-
- - diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/163.wrating.com/a.gif@a=&c=860010-0503010000 b/mobile/android/tests/browser/chrome/tp5/163.com/163.wrating.com/a.gif@a=&c=860010-0503010000 deleted file mode 100755 index 35d42e808..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/163.wrating.com/a.gif@a=&c=860010-0503010000 and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/163.wrating.com/a1.js b/mobile/android/tests/browser/chrome/tp5/163.com/163.wrating.com/a1.js deleted file mode 100755 index 945926770..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/163.wrating.com/a1.js +++ /dev/null @@ -1 +0,0 @@ -var vjAcc="";var wrUrl="httpdisabled://c.wrating.com/";var wrSv=0;function vjTrack(C){var B=vjValidateTrack();if(B===false){return }var A=wrUrl+"a.gif"+vjGetTrackImgUrl(C);void('
');vjSurveyCheck()}function vjEventTrack(D){var C=vjValidateTrack();if(C===false){return }var B=wrUrl+"a.gif"+vjGetTrackImgUrl(D);var A=new Image();A.src=B;A.onloaddisabled=function(){}}function vjValidateTrack(){if(document.location.protocol=="file:"){return false}if(vjAcc==""){return false}else{if(wrUrl.substr(wrUrl.length-1,1)!="/"){wrUrl+="/"}}return true}function vjGetTrackImgUrl(S){var M=0;var N="expires=Fri, 1 Jan 2038 00:00:00 GMT;";var T=document.location;var P=document.referrer.toString();var D;var H=vjGetDomainFromUrl(T);var K;var V;var Y="";var L=vjFlash();var G="";var Z="";var J="";var O=navigator.appName+" "+navigator.appVersion;var F=new Date();var X=F.getTimezoneOffset()/-60;var A=0;var U="";var R="";if(typeof (H[1])!="undefined"){V=H[1]}else{if(typeof (H[0])!="undefined"){V=H[0]}}if(P!=""){Y=vjGetKeyword(P)}else{if((O.indexOf("MSIE")>=0)&&(parseInt(O.substr(O.indexOf("MSIE")+5),4)>=5)&&(O.indexOf("Mac")==-1)&&(navigator.userAgent.indexOf("Opera")==-1)){try{document.documentElement.addBehavior("#default#homePage");if(document.documentElement.isHomePage(location.href)){P="ishomepage"}}catch(W){}}}if(navigator.cookieEnabled){M=1}if(self.screen){G=screen.width+"x"+screen.height+"x"+screen.colorDepth}else{if(self.java){var Q=java.awt.Toolkit.getDefaultToolkit().getScreenSize();G=Q.width+"x"+Q.height+"x0"}}if(navigator.language){Z=navigator.language.toLowerCase()}else{if(navigator.browserLanguage){Z=navigator.browserLanguage.toLowerCase()}else{Z="-"}}if(navigator.javaEnabled()){A=1}if(M==1){D=document.cookie;if(D.indexOf("vjuids=")<0){K=vjVisitorID();document.cookie="vjuids="+escape(K)+";"+N+";domain="+V+";path=/;"}else{K=vjGetCookie("vjuids")}if(D.indexOf("vjlast=")<0){U="30";var E=vjGetTimestamp(F.getTime()).toString();R=E+"."+E+".30"}else{var a=vjGetCookie("vjlast");var C=a.split(".");var B="";if(typeof (C[0])!="undefined"){R=C[0].toString()}else{R=vjGetTimestamp(F.getTime()).toString()}if(typeof (C[1])!="undefined"){var I=new Date(parseInt(C[1])*1000);if(I.toDateString()!=F.toDateString()){R+="."+vjGetTimestamp(F.getTime()).toString();if(parseInt(vjGetTimestamp(F.getTime())-parseInt(C[1]))/86400>30){U="2"}else{U="1"}if(typeof (C[2])!="undefined"){U+=C[2].substr(0,1)}else{U+="0"}}else{R+="."+C[1].toString();if(typeof (C[2])!="undefined"){U+=C[2]}else{U="10"}}}else{R+="."+vjGetTimestamp(F.getTime()).toString();if(typeof (C[2])!="undefined"){U+=C[2]}else{U="10"}}R+="."+U}document.cookie="vjlast="+R+";"+N+";domain="+V+";path=/;"}J="?a="+F.getTime().toString(16)+"&t=&i="+escape(K);J+="&b="+escape(T)+"&c="+vjAcc;J+="&s="+G+"&l="+Z;J+="&z="+X+"&j="+A+"&f="+escape(L);if(P!=""){J+="&r="+escape(P)+"&kw="+Y}J+="&ut="+U+"&n=";if(typeof (S)=="undefined"){J+="&js="}else{J+="&js="+escape(S)}J+="&ck="+M;return J}function vjGetTimestamp(A){return Math.round(A/1000)}function vjGetKeyword(C){var A=[["baidu","wd"],["baidu","q1"],["google","q"],["google","as_q"],["yahoo","p"],["msn","q"],["live","q"],["sogou","query"],["youdao","q"],["soso","w"],["zhongsou","w"],["zhongsou","w1"]];var B=vjGetDomainFromUrl(C.toString().toLowerCase());var D=-1;var E="";if(typeof (B[0])=="undefined"){return""}for(i=0;i=0){D=-1;D=C.indexOf("&"+A[i][1]+"=");if(D<0){D=C.indexOf("?"+A[i][1]+"=")}if(D>=0){E=C.substr(D+A[i][1].length+2,C.length-(D+A[i][1].length+2));D=E.indexOf("&");if(D>=0){E=E.substr(0,D)}if(E==""){return""}else{return A[i][0]+"|"+E}}}}return""}function vjGetDomainFromUrl(E){if(E==""){return false}E=E.toString().toLowerCase();var F=[];var C=E.indexOf("//")+2;var B=E.substr(C,E.length-C);var A=B.indexOf("/");if(A>=0){F[0]=B.substr(0,A)}else{F[0]=B}var D=F[0].match(/[^.]+\.(com.cn|net.cn|gov.cn|cn|com|net|org|gov|cc|biz|info)+$/);if(D){if(typeof (D[0])!="undefined"){F[1]=D[0]}}return F}function vjVisitorID(){var A=vjHash(document.location+document.cookie+document.referrer).toString(16);var B=new Date();return A+"."+B.getTime().toString(16)+"."+Math.random().toString(16)}function vjHash(C){if(!C||C==""){return 0}var B=0;for(var A=C.length-1;A>=0;A--){var D=parseInt(C.charCodeAt(A));B=(B<<5)+B+D}return B}function vjGetCookie(D){var B=D+"=";var F=B.length;var A=document.cookie.length;var E=0;while(E=2;ii--){try{var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");if(fl){_flashVer=ii+".0";break}}catch(e){}}}}return _flashVer}function vjSurveyCheck(){if(wrSv<=0){return }var C=new Date();var A=C.getTime();var D=Math.random(A);if(D<=parseFloat(1/wrSv)){var B=document.createElement("script");B.type="text/javascript";B.id="wratingSuevey";B.src="httpdisabled://tongji.wrating.com/survey/check.php?c="+vjAcc;document.getElementsByTagName("head")[0].appendChild(B)}}; \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/adgeo.163.com/ad_cookies b/mobile/android/tests/browser/chrome/tp5/163.com/adgeo.163.com/ad_cookies deleted file mode 100755 index e69de29bb..000000000 diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/analytics.163.com/ntes.js b/mobile/android/tests/browser/chrome/tp5/163.com/analytics.163.com/ntes.js deleted file mode 100755 index 2654147af..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/analytics.163.com/ntes.js +++ /dev/null @@ -1 +0,0 @@ -var _ntes_nacc,_ntes_nvid="VISITOR_CLIENT_NO_COOKIE_SUPPORT",_ntes_nvtm=0,_ntes_nvfi=0,_ntes_nvsf=0,_ntes_nstm=0,_ntes_nurl="",_ntes_ntit="",_ntes_nref="",_ntes_nres="",_ntes_nlag="",_ntes_nscd="",_ntes_nlmf=0,_ntes_flsh="",_ntes_nssn="",_ntes_surv=0;function _ntes_void(){}var _ntes_domain_array=['163.com','188.com','netease.com','126.com','126.net','nease.net','yeah.net','gz2010.cn','co188.com','warcraftchina.com','youdao.com','leihuo.net','gzapg2010.cn'],_ntes_cdmn=ntes_get_domain(),_ntes_src_addr="//analytics.163.com";function neteaseTracker(){_ntes_nurl=escape(document.location);_ntes_ntit=escape(document.title);_ntes_nref=escape(document.referrer);_ntes_flsh=ntes_get_flashver();var now=(new Date()).getTime();document.cookie="__ntes__test__cookies="+now;var _ntes_cookie_enabled=(ntes_get_cookie("__ntes__test__cookies")==now)?true:false;if(_ntes_nacc=="undefined"||!_ntes_nacc)return;if(_ntes_nurl.indexOf("httpdisabled")!=0)return;var run_flag=0;for(i=0;i<_ntes_domain_array.length;i++){if(_ntes_cdmn=="."+_ntes_domain_array[i]){run_flag=1;break}}if(run_flag==1){var _ck_str=ntes_get_cookie("_ntes_nnid");if(_ck_str==-1){if(_ntes_cookie_enabled){_ntes_nvid=fetch_visitor_hash();_ntes_nvfi=1;ntes_set_cookie_long("_ntes_nnid",_ntes_nvid+",0")}}else{var _id_pos=_ck_str.indexOf(","),_suv_pos=_ck_str.indexOf("|");if(_suv_pos==-1)_suv_pos=_ck_str.length;_ntes_nvid=_ck_str.substr(0,_id_pos);_ntes_surv=_ck_str.substr(_id_pos+1,_suv_pos-_id_pos-1);if(_ntes_surv==''||(_ntes_surv!=0&&(now-_ntes_surv)>365*86400)){_ntes_surv=0}ntes_set_cookie_long("_ntes_nnid",_ntes_nvid+","+_ntes_surv)}_ntes_nssn=ntes_get_cookie("P_INFO");if(_ntes_nssn==-1){_ntes_nssn=""}else{_ntes_nssn=_ntes_nssn.substr(0,_ntes_nssn.indexOf("|"))}ntes_get_navigation_info();var _ntes_q="_nacc="+_ntes_nacc;_ntes_q+="&_nvid="+_ntes_nvid+"&_nvtm="+_ntes_nvtm;_ntes_q+="&_nvsf="+_ntes_nvsf+"&_nvfi="+_ntes_nvfi;_ntes_q+="&_nlag="+_ntes_nlag+"&_nlmf="+_ntes_nlmf;_ntes_q+="&_nres="+_ntes_nres+"&_nscd="+_ntes_nscd;_ntes_q+="&_nstm="+_ntes_nstm;_ntes_q+="&_nurl="+_ntes_nurl+"&_ntit="+_ntes_ntit;_ntes_q+="&_nref="+_ntes_nref+"&_nfla="+_ntes_flsh;_ntes_q+="&_nssn="+_ntes_nssn;_ntes_q+="&_nxkey="+(Number(new Date())+''+Math.random()).substring(6,20)+"&_end1";var _img=new Image();_img.src=_ntes_src_addr+"/ntes?"+_ntes_q;_img.onloaddisabled=function(){_ntes_void()};if(1){if(_ntes_nacc!="analytics"&&_ntes_nacc!="research"&&_ntes_nurl.indexOf("httpdisabledsdisabled")!=0){ntes_survey_popup()}}}}function ntes_survey_popup(){if(_ntes_surv==0){if(typeof(_ntes_nvid)=="undefined"||_ntes_nvid.length!=32||_ntes_nvid.substr(30,2)!="23")return;var _ntes_survey_url="//research.163.com/survey/";_ntes_survey_url=_ntes_survey_url+"?_nacc="+_ntes_nacc+"&_nvid="+_ntes_nvid;void(_ntes_survey_url,'','width=680,height=450,top=100,left=120,scrollbars=yes');ntes_set_cookie_long("_ntes_nnid",_ntes_nvid+","+(new Date).getTime())}}function ntes_get_navigation_info(){_ntes_nres="-";_ntes_nscd="-";_ntes_nlag="-";if(self.screen){_ntes_nres=screen.width+"x"+screen.height;_ntes_nscd=screen.colorDepth+"-bit"}else if(self.java){var j=java.awt.Toolkit.getDefaultToolkit(),s=j.getScreenSize();_ntes_nres=s.width+"x"+s.height}if(navigator.language){_ntes_nlag=navigator.language.toLowerCase()}else if(navigator.browserLanguage){_ntes_nlag=navigator.browserLanguage.toLowerCase()}var d=new Date(document.lastModified);_ntes_nlmf=d.getTime()/1000}function fetch_visitor_hash(){var d=new Date(),xy=document.body.clientWidth+":"+document.body.clientHeight,s=str_to_ent(d.getTime()+Math.random()+document.location+document.referrer+screen.width+screen.height+navigator.userAgent+document.cookie+xy);return ntes_hex_md5(s)}function ntes_get_domain(){var domain_name=document.domain,arr_domain_name=domain_name.split("."),domain_name_length=arr_domain_name.length,pattern=/^\d+$/g;if(pattern.test(arr_domain_name[domain_name_length-1])){return domain_name}if(arr_domain_name.length<3){return "."+domain_name}var domain_suffixes=['com','net','org','gov','co'],i,suffix_found=false;for(i=0;i=2;ii--){try{var fl=eval("new ActiveXObject('ShockwaveFlash.ShockwaveFlash."+ii+"');");if(fl){f=ii+'.0';break}}catch(e){}}}return f}var _ntes_hexcase=0,_ntes_chrsz=8;function ntes_hex_md5(s){return binl2hex(ntes_core_md5(str2binl(s),s.length*_ntes_chrsz))}function ntes_core_md5(x,len){x[len>>5]|=0x80<<((len)%32);x[(((len+64)>>>9)<<4)+14]=len;var a=1732584193,b=-271733879,c=-1732584194,d=271733878;for(var i=0;i>16)+(y>>16)+(lsw>>16);return(msw<<16)|(lsw&0xFFFF)}function bit_rol(num,cnt){return(num<>>(32-cnt))}function str2binl(str){var bin=new Array(),mask=(1<<_ntes_chrsz)-1;for(var i=0;i>5]|=(str.charCodeAt(i/_ntes_chrsz)&mask)<<(i%32);return bin}function binl2hex(binarray){var hex_tab=_ntes_hexcase?"0123456789ABCDEF":"0123456789abcdef",str="";for(var i=0;i>2]>>((i%4)*8+4))&0xF)+hex_tab.charAt((binarray[i>>2]>>((i%4)*8))&0xF)}return str}function str_to_ent(str){var result='',i;for(i=0;i255){while(c>=1){tmp="0123456789".charAt(c%10)+tmp;c=c/10}if(tmp==''){tmp="0"}tmp="#"+tmp;tmp="&"+tmp;tmp=tmp+";";result+=tmp}else{result+=str.charAt(i)}}return result}function ntes_page_click_stat(obj){var _ntes_a_h=escape(this.href),_ntes_a_t=escape(this.innerHTML),_ntes_p_url=escape(document.location),_ncw=0,_nmx=0,_nmy=0;if(document.documentElement&&document.documentElement.clientWidth){_ncw=document.documentElement.clientWidth}var evt=obj||window.event;if(evt.clientX&&document.documentElement){_nmx=evt.clientX+document.documentElement.scrollLeft;_nmy=evt.clientY+document.documentElement.scrollTop}var _ntes_p_q="_nacc="+_ntes_nacc+"&_npurl="+_ntes_p_url;_ntes_p_q+="&_nah="+_ntes_a_h+"&_nat="+_ntes_a_t;_ntes_p_q+="&_ncw="+_ncw+"&_nmx="+_nmx+"&_nmy="+_nmy;_ntes_p_q+="&_end";var i=new Image();i.src=_ntes_src_addr+"/ntes_p?"+_ntes_p_q;i.onloaddisabled=function(){_ntes_void()};return true}function neteaseClickStat(){if(typeof(_ntes_nacc)=="undefined"||!_ntes_nacc){return}var _ntes_r=Math.random();_ntes_r=Math.round(_ntes_r*30);if(_ntes_r!=15)return;if(document.all&&navigator.userAgent.match(/msie/gi)){var _ntes_a_tag_array=document.getElementsByTagName('a');for(i in _ntes_a_tag_array){if(_ntes_a_tag_array[i].onclick==null){_ntes_a_tag_array[i].onclick=ntes_page_click_stat}}}}function recordAction(aName,vAddr,vName,p1,p2){var _q="";_q+="s="+_ntes_nacc;_q+="&u="+_ntes_nvid;_q+="&a="+escape(aName);_q+="&v="+escape(vAddr);_q+="&n="+escape(vName);_q+="&p1="+p1;if(p2!=undefined)_q+="&p2="+p2;_q+="&r="+_ntes_nurl;_q+="&_nxkey="+(Number(new Date())+''+Math.random()).substring(6,20)+"&_end1";var _img=new Image();_img.src=_ntes_src_addr+"/ntesv?"+_q;_img.onloaddisabled=function(){_ntes_void()}} \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/jr@site=netease&affiliate=homepage&cat=homepage&type=adend&location=1 b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/jr@site=netease&affiliate=homepage&cat=homepage&type=adend&location=1 deleted file mode 100755 index 8b0c6b763..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/jr@site=netease&affiliate=homepage&cat=homepage&type=adend&location=1 +++ /dev/null @@ -1 +0,0 @@ -var adrichend; \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/jr@site=netease&affiliate=homepage&cat=homepage&type=popup&location=1 b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/jr@site=netease&affiliate=homepage&cat=homepage&type=popup&location=1 deleted file mode 100755 index 166293021..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/jr@site=netease&affiliate=homepage&cat=homepage&type=popup&location=1 +++ /dev/null @@ -1 +0,0 @@ -a=1; \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=banner360x65&location=1.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=banner360x65&location=1.html deleted file mode 100755 index b6042af08..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=banner360x65&location=1.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=banner360x65&location=2.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=banner360x65&location=2.html deleted file mode 100755 index fbcd8872a..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=banner360x65&location=2.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=1.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=1.html deleted file mode 100755 index 8425685c3..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=1.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=2.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=2.html deleted file mode 100755 index 26926d408..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=2.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33867&FlightID=747&Values=1741461550&Redirect=http://cps.mbaobao.com/cps/25892" target="_blank"><IMG SRC="../img1.126.net/channel5/008995/mbb360100_110406.swf" WIDTH=360 HEIGHT=100 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=3.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=3.html deleted file mode 100755 index 995a54032..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=3.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33925&FlightID=764&Values=3275702516&Redirect=http://a814.oadz.com/link/C/814/88700/Is4Y9DtmCqUv0pLFAc-xPJ0f8ts_/a/108/http://www.m18.com/market/front.aspx?pno=wan-gm-hp-00zty&url=/im" target="_blank"><IMG SRC="../img1.126.net/channel5/008969/mai360100_110401.swf" WIDTH=360 HEIGHT=100 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=5.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=5.html deleted file mode 100755 index e6a047938..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=5.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33914&FlightID=749&Values=1855147922&Redirect=http://a1419.oadz.com/link/C/1419/33/T3dnBK9qi69zlngdBjwKaRYj-ms_/a/2/http://www.topshoes.cn/" target="_blank"><IMG SRC="../img1.126.net/channel5/008995/bl360100_110402.swf" WIDTH=360 HEIGHT=100 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=6.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=6.html deleted file mode 100755 index e1723fc0f..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column360x100&location=6.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33816&FlightID=766&Values=68259114&Redirect=http://click.moonbasa.com/transfer.aspx?cn=1699&type=0&adsiteid=10000007&url=http://www.moonbasa.com/?oid=4" target="_blank"><IMG SRC="../img1.126.net/channel5/008984/liangxie360100_110402.swf" WIDTH=360 HEIGHT=100 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=1.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=1.html deleted file mode 100755 index adb1ca8dc..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=1.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=2.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=2.html deleted file mode 100755 index a49ab1078..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=2.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=3.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=3.html deleted file mode 100755 index 29e09983c..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=3.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33814&FlightID=763&Values=3968994465&Redirect=http://click.moonbasa.com/transfer.aspx?cn=1698&type=0&adsiteid=10000007&url=http://www.moonbasa.com/?oid=3" target="_blank"><IMG SRC="../img1.126.net/channel5/008984/xizhuang390100_110402.swf" WIDTH=390 HEIGHT=100 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=4.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=4.html deleted file mode 100755 index 898bf062c..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=4.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=34196&FlightID=745&Values=3301780629&Redirect=http://a1052.oadz.com/link/C/1052/39/TNCPMVEIYp-TRrZLJ27yq2NMhXs_/p032/6/http://www.olomo.com/position/?u=1894274&ompz=4454" target="_blank"><IMG SRC="../img1.126.net/channel5/008995/ou390100_110408.swf" WIDTH=390 HEIGHT=100 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=5.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=5.html deleted file mode 100755 index 5edb8dfa4..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=5.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33871&FlightID=746&Values=478684510&Redirect=http://mso.allyes.com/main/c?db=mso&bid=63394,31657,2624&cid=62875,2992,149&sid=63319&show=ignore&url=http://www.vancl.com/?source=wy230703syzt5" target="_blank"><IMG SRC="../img1.126.net/channel5/008977/5v390100_110406.swf" WIDTH=390 HEIGHT=100 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=6.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=6.html deleted file mode 100755 index 44952eaec..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column390x100&location=6.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33888&FlightID=765&Values=2426328330&Redirect=http://a777.oadz.com/link/C/777/2972/Z6nbl6URgyAsEQVVzZ5skDUHOQ0_/a/126/http://www.fuocoo.com" target="_blank"><IMG SRC="../img1.126.net/channel5/008995/fk390100_110331.swf" WIDTH=390 HEIGHT=100 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column600x80&location=1.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column600x80&location=1.html deleted file mode 100755 index b0e6dcf26..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=column600x80&location=1.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x100&location=1.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x100&location=1.html deleted file mode 100755 index b99570776..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x100&location=1.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x100&location=2.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x100&location=2.html deleted file mode 100755 index e6f26ed54..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x100&location=2.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33896&FlightID=751&Values=2829007648&Redirect=http://www.k121.com/?from=163w2" target="_blank"><IMG SRC="../img1.126.net/channel5/008981/kyd2_190100_110402.swf" WIDTH=190 HEIGHT=100 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=1.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=1.html deleted file mode 100755 index fccb481ca..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=1.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33829&FlightID=752&Values=2077038183&Redirect=http://nimafa7.allyes.com/main/c?db=nimafa7&bid=17117,7729,378&cid=6808,162,1&sid=17997&show=ignore&url=http://minisite.163.com/2011/0214/tries/" target="_blank"><IMG SRC="../img1.126.net/channel5/009400/caizi190180_110408.swf" WIDTH=190 HEIGHT=180 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=2.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=2.html deleted file mode 100755 index 69fcd3866..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=2.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=3.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=3.html deleted file mode 100755 index 308fbd44a..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=3.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33920&FlightID=754&Values=743829921&Redirect=http://www.voidg.com/voidg2/lp/voidg/voidg.php?CID=CN_DIS_121_3_1_700" target="_blank"><IMG SRC="../img1.126.net/channel5/008995/voidg190180_110407.swf" WIDTH=190 HEIGHT=180 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=4.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=4.html deleted file mode 100755 index 0dfc0433b..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x180&location=4.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x300&location=1.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x300&location=1.html deleted file mode 100755 index 7dfda0802..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x300&location=1.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - -<A HREF="httpdisabled://g.163.com/c?AID=33876&FlightID=756&Values=3536047884&Redirect=http://a814.oadz.com/link/C/814/88637/UoFr9DZA7GBQz2OagEiruxYJZCc_/a/108/http://www.m18.com/market/front.aspx?pno=wan-hp-s1&url=/im" target="_blank"><IMG SRC="../img1.126.net/channel5/008981/190300a_110406.swf" WIDTH=190 HEIGHT=300 BORDER=0></A> - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x300&location=2.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x300&location=2.html deleted file mode 100755 index 30e84fdd6..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=logo190x300&location=2.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=textlinkhouse&location=1.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=textlinkhouse&location=1.html deleted file mode 100755 index 3ab2840d4..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=textlinkhouse&location=1.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=textlinkhouse&location=2.html b/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=textlinkhouse&location=2.html deleted file mode 100755 index 9f7a6d7fc..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/g.163.com/r@site=netease&affiliate=homepage&cat=homepage&type=textlinkhouse&location=2.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel1/55x20_bai.gif b/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel1/55x20_bai.gif deleted file mode 100755 index 456c1ace4..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel1/55x20_bai.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel1/55x20_lan.gif b/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel1/55x20_lan.gif deleted file mode 100755 index 8ec96875f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel1/55x20_lan.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel5/008976/bolon_110302.png b/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel5/008976/bolon_110302.png deleted file mode 100755 index 895a9cdfc..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel5/008976/bolon_110302.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel5/360/360100_110318.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel5/360/360100_110318.jpg deleted file mode 100755 index db9b316ca..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.126.net/channel5/360/360100_110318.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/6/20110406182512d4541.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/6/20110406182512d4541.jpg deleted file mode 100755 index 07620cc2f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/6/20110406182512d4541.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408075741e084c.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408075741e084c.jpg deleted file mode 100755 index 2ddd7ddf1..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408075741e084c.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040808080199ae7.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040808080199ae7.jpg deleted file mode 100755 index f6845bd03..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040808080199ae7.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080835397174e.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080835397174e.jpg deleted file mode 100755 index 12a505972..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080835397174e.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080847137e997.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080847137e997.jpg deleted file mode 100755 index 39a395822..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080847137e997.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408085323b9296.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408085323b9296.jpg deleted file mode 100755 index 53386b1e8..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408085323b9296.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408092834ed61d.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408092834ed61d.jpg deleted file mode 100755 index 738834c3d..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408092834ed61d.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080930016f866.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080930016f866.jpg deleted file mode 100755 index d1905964f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080930016f866.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080934433598e.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080934433598e.jpg deleted file mode 100755 index b3581ab92..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104080934433598e.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040809550649773.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040809550649773.jpg deleted file mode 100755 index 9d23f2ddb..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040809550649773.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408104255a47ce.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408104255a47ce.jpg deleted file mode 100755 index 3df984301..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/20110408104255a47ce.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104081119113f37f.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104081119113f37f.jpg deleted file mode 100755 index da1e5d887..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/201104081119113f37f.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040811445023471.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040811445023471.jpg deleted file mode 100755 index ddf8cc047..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040811445023471.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040814544385564.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040814544385564.jpg deleted file mode 100755 index 3e770a2c8..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040814544385564.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040815090608fd9.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040815090608fd9.jpg deleted file mode 100755 index 5f01a91e0..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/8/2011040815090608fd9.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/9/20110409022720f974c.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/9/20110409022720f974c.jpg deleted file mode 100755 index 9e06a8f0c..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/2011/4/9/20110409022720f974c.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/netease/wzdzbs.gif b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/netease/wzdzbs.gif deleted file mode 100755 index b224d7532..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/cnews/netease/wzdzbs.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/digi/linzj/1102/03/191.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/digi/linzj/1102/03/191.jpg deleted file mode 100755 index b8ac59042..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/digi/linzj/1102/03/191.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/img09/icon/icon.png b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/img09/icon/icon.png deleted file mode 100755 index 6c53687d5..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/img09/icon/icon.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/attr.png b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/attr.png deleted file mode 100755 index f4e5da8d4..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/attr.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/icon_product_listv0.0.3.png b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/icon_product_listv0.0.3.png deleted file mode 100755 index 96302b004..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/icon_product_listv0.0.3.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/iconv0.0.7.png b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/iconv0.0.7.png deleted file mode 100755 index 1c194a320..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/iconv0.0.7.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/neteasy_mallv0.0.1.png b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/neteasy_mallv0.0.1.png deleted file mode 100755 index b3ca15626..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/neteasy_mallv0.0.1.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/theme_blue.png b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/theme_blue.png deleted file mode 100755 index ee56407d7..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/theme_blue.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/yodao_bg_blue.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/yodao_bg_blue.jpg deleted file mode 100755 index 5a0b12ac5..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img1.cache.netease.com/www/v2011/img/yodao_bg_blue.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/game/20110216/ql/x/390x100.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/game/20110216/ql/x/390x100.jpg deleted file mode 100755 index 4d66e1bcb..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/game/20110216/ql/x/390x100.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/game/20110216/ql/x/600x80.gif b/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/game/20110216/ql/x/600x80.gif deleted file mode 100755 index 9a4b4d09f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/game/20110216/ql/x/600x80.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/hr/20110216/hz/360x100.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/hr/20110216/hz/360x100.jpg deleted file mode 100755 index 6a0790453..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/hr/20110216/hz/360x100.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/03/ly/390x100.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/03/ly/390x100.jpg deleted file mode 100755 index 69dca1a0d..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/03/ly/390x100.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/hy/190x100.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/hy/190x100.jpg deleted file mode 100755 index 42b7b5088..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/hy/190x100.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/wb/360x65.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/wb/360x65.jpg deleted file mode 100755 index 9fcb0fbd9..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/wb/360x65.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/yd/190x180.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/yd/190x180.jpg deleted file mode 100755 index 738bf4f52..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.126.net/xoimages/sales/2011/04/yd/190x180.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/7/20110407093718ef414.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/7/20110407093718ef414.jpg deleted file mode 100755 index 7305d4c89..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/7/20110407093718ef414.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/7/20110407202028db993.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/7/20110407202028db993.jpg deleted file mode 100755 index d2b333d6f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/7/20110407202028db993.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104080728304dcb2.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104080728304dcb2.jpg deleted file mode 100755 index cf3d891a5..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104080728304dcb2.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408082635b6897.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408082635b6897.jpg deleted file mode 100755 index a388b07ff..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408082635b6897.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104080828458908d.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104080828458908d.jpg deleted file mode 100755 index 61d31fdd9..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104080828458908d.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040808393075049.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040808393075049.jpg deleted file mode 100755 index d58ddb9f1..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040808393075049.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040809433960d68.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040809433960d68.jpg deleted file mode 100755 index 7c4ff5447..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040809433960d68.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408100357df2b1.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408100357df2b1.jpg deleted file mode 100755 index 80d2d32da..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408100357df2b1.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408115631ad273.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408115631ad273.jpg deleted file mode 100755 index abb727cf2..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408115631ad273.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408120203d0f08.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408120203d0f08.jpg deleted file mode 100755 index 1370087a3..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408120203d0f08.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104081242198a4ba.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104081242198a4ba.jpg deleted file mode 100755 index 0308b659c..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104081242198a4ba.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040812525484a8f.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040812525484a8f.jpg deleted file mode 100755 index 86e9a6af2..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040812525484a8f.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408125931e0a79.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408125931e0a79.jpg deleted file mode 100755 index 2208ff048..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408125931e0a79.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408140704d246b.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408140704d246b.jpg deleted file mode 100755 index 86e50ca7f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408140704d246b.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408144428d419d.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408144428d419d.jpg deleted file mode 100755 index 0f0cd9d38..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/20110408144428d419d.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040814452013ef7.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040814452013ef7.jpg deleted file mode 100755 index b45184d5a..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040814452013ef7.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040814525199c07.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040814525199c07.jpg deleted file mode 100755 index d17750711..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/2011040814525199c07.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104082245192ae96.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104082245192ae96.jpg deleted file mode 100755 index 7af2c4000..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/cnews/2011/4/8/201104082245192ae96.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/www/v2011/css/theme_blue1227.css b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/www/v2011/css/theme_blue1227.css deleted file mode 100755 index 6605aff4a..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/www/v2011/css/theme_blue1227.css +++ /dev/null @@ -1 +0,0 @@ -/* theme blue */ .mod .hd,.wgt-yodao-search .ui-btn-submit,.weather-location,.search-category-more,.yodao-search-category .current,.search-category-item a:hover,.yodao-dialog .ui-btn-submit,.yodao-dialog-close,.mod .hd,.tab-hd,.mod-function,.function-close,.product-list li {background:url("../../../../img1.cache.netease.com/www/v2011/img/theme_blue.png") no-repeat;} /* mod color */ .jstxlan,.c-entry,a.c-entry:visited,.c-entry a,.c-entry a:visited,.hd,.hd a,.hd a:visited,.tab-hd,.tab-hd a,.tab-hd a:visited,.search-category-item a {color:#1E50A2;} a.c-entry:hover,.c-entry a:hover,.hd a:hover,.jstxlan:hover{color:#ba2636;} .mod .bd,.mod .hd,.mod-function,.aboutNetease,.ntes-yodao {border:1px solid #B1C8D7;} .mod .bd {border-top:none;} .tab-hd {border-left:1px solid #B1C8D7;} .tab-hd .tab-u {border-top:1px solid #B1C8D7; border-right:1px solid #B1C8D7;} .area-sub .bd,.tab-u-5 .current,.product-tab .current,.aboutNetease {background-color:#F5F8FC;} .mod .hd,.tab-hd,.mod-function,.tab-hd-gg-left li,.tab-hd-gg-right li {background-color:#E6EEF7;} .tab-hd-gg-left .current,.tab-hd-gg-right .current {background-color:#D4E6F5;} /* yodao color */ .ntes-yodao {background:url("../../../../img1.cache.netease.com/www/v2011/img/yodao_bg_blue.jpg") left top no-repeat #D4E6F5;} .wgt-yodao-search .ui-btn-submit {color:#fff; background-color:#3981BD;} .yodao-search-category .current,.search-category-item a:hover {font-weight:bold; color:#fff;} .search-category-item a:hover {color:#fff;} .yodao-dialog {border:1px solid #B1C8D7; background:#fff;} .yodao-dialog .hd {background:#D4E6F5;} .yodao-dialog .bd {background:#E6EEF7;} .category-more-list {border:1px solid #B1C8D7; background:#fff;} .category-more-list a:hover {color:#fff; background:#1E50A2;} .aa_highlight {color:#fff;background:#1E50A2;} \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/www/v2011/img/tg_news.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/www/v2011/img/tg_news.jpg deleted file mode 100755 index e4cd6bf2b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img2.cache.netease.com/www/v2011/img/tg_news.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/163homepage/biaoshi.gif b/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/163homepage/biaoshi.gif deleted file mode 100755 index b8be1daef..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/163homepage/biaoshi.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/163homepage/bj110.gif b/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/163homepage/bj110.gif deleted file mode 100755 index 2c9b488ee..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/163homepage/bj110.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/rpic/fld3/fld_homepage.js b/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/rpic/fld3/fld_homepage.js deleted file mode 100755 index 45a11363b..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/rpic/fld3/fld_homepage.js +++ /dev/null @@ -1,987 +0,0 @@ - -var quanguo=new section( - -'³ɽ', -'http://g.163.com/a?CID=1631&Values=979604783&Redirect=http://jn.house.163.com/topic/hz/lxcmsxs/index.shtml', - -'ȥ', -'http://g.163.com/a?CID=1632&Values=481254470&Redirect=http://wx.house.163.com/topic/hz/wxteh/', - -'رļֵͶ', -'http://g.163.com/a?CID=1633&Values=3231158258&Redirect=http://wx.house.163.com/topic/hz/wxhd/', - -'ɽַ', -'http://g.163.com/a?CID=1634&Values=3016013117&Redirect=http://www.tangshanwanda.com/', - -'һιΨѡ', -'http://g.163.com/a?CID=1635&Values=1850202326&Redirect=http://wh.vanke.com/Decoration/Index.aspx', - -'Ⱥרע', -'http://g.163.com/a?CID=1636&Values=2652887900&Redirect=http://www.daxiangqun.com/', - -'籭Ӯ', -'http://g.163.com/a?CID=1637&Values=1890633164&Redirect=http://beijing.chineseoffice.com.cn', - -'ʱշʼ', -'http://dxyy.mail.163.com/smspack/userconf/dxtz.do', - -'ϴԲм', -'http://g.163.com/a?CID=1639&Values=2962722568&Redirect=http://www.foloda.com', - -'Ⱥ רע', -'http://g.163.com/a?CID=1640&Values=1297729454&Redirect=http://www.daxiangqun.com/' - -); - -var anhui=new section( - -'׷ϷʳƸ', -'http://g.163.com/a?CID=1431&Values=140707824&Redirect=http://hf.house.163.com/news2/101019/15/715993-1.shtml', - -'ȫ', -'http://g.163.com/a?CID=1432&Values=3444093944&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'լ ҫϷ', -'http://g.163.com/a?CID=1433&Values=3930620465&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'ҵزͶ', -'http://g.163.com/a?CID=1434&Values=3400740464&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'', -'http://g.163.com/a?CID=1435&Values=3330699301&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'׸15װ޷', -'http://g.163.com/a?CID=1436&Values=2716708116&Redirect=http://wh.vanke.com/indexad.asp?Title=0221163wzl&UrlTo=/house/goldencity/register.asp', - -'ԼӰ', -'http://g.163.com/a?CID=1437&Values=665590924&Redirect=http://hf.house.163.com/news2/110303/1/770167-1.shtml', - -'׼ַ', -'http://g.163.com/a?CID=1438&Values=2211550380&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'Ľ', -'http://g.163.com/a?CID=1439&Values=305957742&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1440&Values=528917216&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm' - -); - -var chongqing=new section( - -'֮棡', -'http://g.163.com/a?CID=1501&Values=1183866730&Redirect=http://wh.vanke.com/indexad.asp?Title=wangyiyouxiang&UrlTo=/house/usonian/register.asp', - -'ءorϷ', -'http://g.163.com/a?CID=1502&Values=2836950569&Redirect=http://cq.house.163.com/topic/cq/tk/index.html', - -'ɽ2ڽĻ', -'http://g.163.com/a?CID=1503&Values=1431490966&Redirect=http://cq.house.163.com/topic/cq/bshf110401/index.html', - -'ı¥', -'http://g.163.com/a?CID=1504&Values=936064134&Redirect=http://cq.house.163.com/topic/cq/qggbsh/index.html', - -'׷ɶƸ', -'http://g.163.com/a?CID=1505&Values=4093663140&Redirect=http://cq.house.163.com/news2/101019/8/715995-1.shtml', - -'޹籩ǿϮ', -'http://g.163.com/a?CID=1506&Values=3046797410&Redirect=http://cq.house.163.com/topic/cq/xgl/index.html', - -'ƽ彫', -'http://g.163.com/a?CID=1507&Values=2696576883&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'´ԭ', -'http://g.163.com/a?CID=1508&Values=2037757007&Redirect=http://cq.house.163.com/topic/cq/zybly110314/index.html', - -'׷վƸ', -'http://g.163.com/a?CID=1509&Values=3615659065&Redirect=http://cq.house.163.com/topic/cq/cqzp/index.html', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1510&Values=3155480230&Redirect=http://www.foloda.com' - -); - -var fujian=new section( - -'׷ݳƸ', -'http://g.163.com/a?CID=1391&Values=440153523&Redirect=http://fz.house.163.com/news2/110106/8/749421-1.shtml', - -'ȫ', -'http://g.163.com/a?CID=1392&Values=875135822&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'ʢ ', -'http://g.163.com/a?CID=1393&Values=1352019128&Redirect=http://xm.house.163.com/topic/xm/zhangzhouwdgcdianji/zhangzhouwdgcdianji/index.html', - -'йլ', -'http://g.163.com/a?CID=1394&Values=3905919256&Redirect=http://xm.house.163.com/topic/xm/ydzzyj/ydzz.htm', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1395&Values=3761932044&Redirect=http://www.chineseoffice.com.cn/', - -'׷ųƸ', -'http://g.163.com/a?CID=1396&Values=1528249410&Redirect=http://xm.house.163.com/news2/110215/8/762587-1.shtml', - -'Ȫ㳡', -'http://g.163.com/a?CID=1397&Values=168539782&Redirect=http://xm.house.163.com/topic/xm/qzpxwdgc/', - -'Ǿ ҫ', -'http://g.163.com/a?CID=1398&Values=942518717&Redirect=http://xm.house.163.com/topic/xm/wdzc/', - -'ݷԴ һ', -'http://g.163.com/a?CID=1399&Values=658166132&Redirect=http://zhangzhou.house.163.com', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1400&Values=2760702008&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm' - -); - -var gansu=new section( - -'׷ݳƸ', -'http://g.163.com/a?CID=1591&Values=696978067&Redirect=http://lz.house.163.com/news2/101020/3/716104-1.shtml', - -'ȫ', -'http://g.163.com/a?CID=1592&Values=339419003&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'״ʳα', -'http://g.163.com/a?CID=1593&Values=3649096630&Redirect=http://km.house.163.com/topic/xa/scgjcba/', - -'ҵزͶ', -'http://g.163.com/a?CID=1594&Values=1495066886&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1595&Values=3004257764&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'ƽ彫', -'http://g.163.com/a?CID=1596&Values=3723417916&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'', -'http://g.163.com/a?CID=1597&Values=3731340378&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1598&Values=1663707362&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1599&Values=621830313&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1600&Values=1511589405&Redirect=http://www.foloda.com' - -); - -var guangxi=new section( - -'׷Ƹ', -'http://g.163.com/a?CID=1531&Values=1077111064&Redirect=http://nn.house.163.com/news2/101019/15/716001-1.shtml', - -'Ľ', -'http://g.163.com/a?CID=1532&Values=2705180565&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'ҵزͶ', -'http://g.163.com/a?CID=1533&Values=972094116&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'콭', -'http://g.163.com/a?CID=1534&Values=1337672369&Redirect=http://www.v9666.com', - -'ɽ2ڽĻ', -'http://g.163.com/a?CID=1535&Values=440431970&Redirect=http://cq.house.163.com/topic/cq/bshf110401/index.html', - -'֮棡', -'http://g.163.com/a?CID=1536&Values=554921589&Redirect=http://wh.vanke.com/indexad.asp?Title=wangyiyouxiang&UrlTo=/house/usonian/register.asp', - -'ƽ彫', -'http://g.163.com/a?CID=1537&Values=1603859496&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'´ԭ', -'http://g.163.com/a?CID=1538&Values=4242251342&Redirect=http://cq.house.163.com/topic/cq/zybly110314/index.html', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1539&Values=974017740&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1540&Values=722714999&Redirect=http://www.foloda.com' - -); - -var guizhou=new section( - -'׷Ƹ', -'http://g.163.com/a?CID=1511&Values=1125427351&Redirect=http://gy.house.163.com/news2/101019/15/715994-1.shtml', - -'Ľ', -'http://g.163.com/a?CID=1512&Values=2565614707&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'ҵزͶ', -'http://g.163.com/a?CID=1513&Values=2983829438&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'콭', -'http://g.163.com/a?CID=1514&Values=1065898650&Redirect=http://www.v9666.com', - -'ɽ2ڽĻ', -'http://g.163.com/a?CID=1515&Values=4068513241&Redirect=http://cq.house.163.com/topic/cq/bshf110401/index.html', - -'֮棡', -'http://g.163.com/a?CID=1516&Values=917345527&Redirect=http://wh.vanke.com/indexad.asp?Title=wangyiyouxiang&UrlTo=/house/usonian/register.asp', - -'ƽ彫', -'http://g.163.com/a?CID=1517&Values=3140966748&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'´ԭ', -'http://g.163.com/a?CID=1518&Values=2970839809&Redirect=http://cq.house.163.com/topic/cq/zybly110314/index.html', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1519&Values=1000416879&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1520&Values=3039296944&Redirect=http://www.foloda.com' - -); - -var hebei=new section( - -'Ⱥרעز', -'http://g.163.com/a?CID=1481&Values=3857846246&Redirect=http://www.daxiangqun.com/', - -'ҵزͶ', -'http://g.163.com/a?CID=1482&Values=3641079257&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1483&Values=2276506178&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'ȫ', -'http://g.163.com/a?CID=1484&Values=1308762028&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'ȥϴ ٺ', -'http://g.163.com/a?CID=1485&Values=674631556&Redirect=http://qhd.house.163.com/topic/hz/lhtt0331/', - -'׸15װ޷', -'http://g.163.com/a?CID=1486&Values=185257524&Redirect=http://wh.vanke.com/indexad.asp?Title=0221163wzl&UrlTo=/house/goldencity/register.asp', - -'', -'http://g.163.com/a?CID=1487&Values=2245822886&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1488&Values=2492828518&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1489&Values=709633319&Redirect=http://beijing.chineseoffice.com.cn', - -'ƽ彫', -'http://g.163.com/a?CID=1490&Values=1922383439&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp' - -); - -var heilongjiang=new section( - -'﹫ լ䷶', -'http://g.163.com/a?CID=1561&Values=3878478489&Redirect=http://www.wandamansion.com', - -'ȫ', -'http://g.163.com/a?CID=1562&Values=3205384429&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'״ʳα', -'http://g.163.com/a?CID=1563&Values=2478625523&Redirect=http://km.house.163.com/topic/xa/scgjcba/', - -'ԶʱƷ', -'http://g.163.com/a?CID=1564&Values=119944109&Redirect=http://www.yysdc.com/', - -'׼ַ', -'http://g.163.com/a?CID=1565&Values=34746919&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'Ⱥרעز', -'http://g.163.com/a?CID=1566&Values=3771046252&Redirect=http://www.daxiangqun.com/', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1567&Values=3020440879&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm', - -'լ ҫϷ', -'http://g.163.com/a?CID=1568&Values=1549320734&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'ȥϴ ٺ', -'http://g.163.com/a?CID=1569&Values=117217106&Redirect=http://qhd.house.163.com/topic/hz/lhtt0331/', - -'ƽ彫', -'http://g.163.com/a?CID=1570&Values=1423017304&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp' - -); - -var henan=new section( - -'׷֣վƸ', -'http://g.163.com/a?CID=1471&Values=2531271616&Redirect=http://zz.house.163.com/news2/101020/1/716068-1.shtml', - -'ȫ', -'http://g.163.com/a?CID=1472&Values=2927214491&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'ᆱװSOHOϳ', -'http://g.163.com/a?CID=1473&Values=303570349&Redirect=http://zz.house.163.com/topic/hz/zywanda/', - -'ҵزͶ', -'http://g.163.com/a?CID=1474&Values=2822872691&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'֣򷿣װæ', -'http://g.163.com/a?CID=1475&Values=846902695&Redirect=http://zz.house.163.com/topic/hz/zzhx/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1476&Values=3992464607&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'', -'http://g.163.com/a?CID=1477&Values=2041088546&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'׼ַ', -'http://g.163.com/a?CID=1478&Values=95266873&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'Ľ', -'http://g.163.com/a?CID=1479&Values=1720943188&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'ƽ彫', -'http://g.163.com/a?CID=1480&Values=4032443472&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp' - -); - -var hubei=new section( - -'ƽ彫', -'http://g.163.com/a?CID=1371&Values=1761110635&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1372&Values=1606976687&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm', - -'֮棡', -'http://g.163.com/a?CID=1373&Values=1784622907&Redirect=http://wh.vanke.com/indexad.asp?Title=wangyiyouxiang&UrlTo=/house/usonian/register.asp', - -'2011һ򷿰', -'http://g.163.com/a?CID=1374&Values=3122894164&Redirect=http://wh.house.163.com/topic/wh/wankezh0317/index.htm', - -'ɽ2ڽĻ', -'http://g.163.com/a?CID=1375&Values=767698364&Redirect=http://cq.house.163.com/topic/cq/bshf110401/index.html', - -'´ԭ326տ', -'http://g.163.com/a?CID=1376&Values=3250660165&Redirect=http://cq.house.163.com/topic/cq/zybly110314/index.html', - -'ȫ', -'http://g.163.com/a?CID=1377&Values=3657120673&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'׷人վƸ', -'http://g.163.com/a?CID=1378&Values=1352200508&Redirect=http://wh.house.163.com/topic/hz/whzp/index.html', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1379&Values=3241571470&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1380&Values=2788700399&Redirect=http://www.foloda.com' - -); - -var hunan=new section( - -'׷Ƹ', -'http://g.163.com/a?CID=1491&Values=172820044&Redirect=http://cs.house.163.com/news2/101207/13/737830-1.shtml', - -' Ʒҫ', -'http://g.163.com/a?CID=1492&Values=3746216837&Redirect=http://ad.foloda.com/11dy/cshd/', - -'ɳ Ʒ', -'http://g.163.com/a?CID=1493&Values=3517398304&Redirect=http://ad.foloda.com/10dy/cswkc', - -'ɳ ϯլ', -'http://g.163.com/a?CID=1494&Values=1457375266&Redirect=http://www.cswdgg.com/', - -'زɫ껪', -'http://g.163.com/a?CID=1495&Values=3615474435&Redirect=http://cs.house.163.com/news2/110323/4/779240-1.shtml', - -'´ԭ326տ', -'http://g.163.com/a?CID=1496&Values=524253096&Redirect=http://cq.house.163.com/topic/cq/zybly110314/index.html', - -'潭ͳǻ԰լ', -'http://g.163.com/a?CID=1497&Values=599632246&Redirect=http://ad.foloda.com/11dy/xjsjc/', - -'΢ӮIPAD', -'http://g.163.com/a?CID=1498&Values=133994750&Redirect=http://cs.house.163.com/news2/110321/4/777990-1.shtml', - -'Ľ', -'http://g.163.com/a?CID=1499&Values=2128022708&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'ƽ彫', -'http://g.163.com/a?CID=1500&Values=728830475&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp' - -); - -var jiangsu=new section( - -'׷ճƸ', -'http://g.163.com/a?CID=1421&Values=1720134227&Redirect=http://nj.house.163.com/news2/101019/15/715992-1.shtml', - -'Ͼ', -'http://g.163.com/a?CID=1422&Values=909788656&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'Ľ', -'http://g.163.com/a?CID=1423&Values=3971362695&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1424&Values=336124741&Redirect=http://www.chineseoffice.com.cn/', - -'¥Ϣһ', -'http://g.163.com/a?CID=1425&Values=1954580977&Redirect=http://xf.house.163.com/suzhou/search!xfs.action', - -'Ⱥרעز', -'http://g.163.com/a?CID=1426&Values=1687166304&Redirect=http://www.daxiangqun.com/', - -'ͶʾҪӳ׿ʼ', -'http://g.163.com/a?CID=1427&Values=723479546&Redirect=http://suzhou.house.163.com/topic/suzhou/ganglongcaizhi/index.html', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1428&Values=199811649&Redirect=http://www.foloda.com', - -'լ ҫϷ', -'http://g.163.com/a?CID=1429&Values=4148656357&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'·Ѷ', -'http://g.163.com/a?CID=1430&Values=1245676825&Redirect=http://suzhou.house.163.com/' - -); - -var jiangxi=new section( - -'׷ϲƸ', -'http://g.163.com/a?CID=1401&Values=650836040&Redirect=http://nc.house.163.com/news2/101020/8/716061-1.shtml', - -'ȫ', -'http://g.163.com/a?CID=1402&Values=2175178201&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'Ľ', -'http://g.163.com/a?CID=1403&Values=2501733054&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'ҵزͶ', -'http://g.163.com/a?CID=1404&Values=3569609227&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1405&Values=1627759603&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'׸15װ޷', -'http://g.163.com/a?CID=1406&Values=2762263709&Redirect=http://wh.vanke.com/indexad.asp?Title=0221163wzl&UrlTo=/house/goldencity/register.asp', - -'', -'http://g.163.com/a?CID=1407&Values=658658995&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1408&Values=2474916214&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'ƽ彫', -'http://g.163.com/a?CID=1409&Values=3955873125&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1410&Values=1856220854&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm' - -); - -var jilin=new section( - -'׷Ƹ', -'http://g.163.com/a?CID=1551&Values=1375398756&Redirect=http://cc.house.163.com/news2/101019/13/716002-1.shtml', - -'ȫ', -'http://g.163.com/a?CID=1552&Values=1562763119&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'﹫ լ䷶', -'http://g.163.com/a?CID=1553&Values=3787022975&Redirect=http://www.wandamansion.com', - -'ԶʱƷ', -'http://g.163.com/a?CID=1554&Values=1814382010&Redirect=http://www.yysdc.com/', - -'׼ַ', -'http://g.163.com/a?CID=1555&Values=2362854501&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'Ⱥרעز', -'http://g.163.com/a?CID=1556&Values=326828771&Redirect=http://www.daxiangqun.com/', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1557&Values=1762785357&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm', - -'լ ҫϷ', -'http://g.163.com/a?CID=1558&Values=3876685191&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'ȥϴ ٺ', -'http://g.163.com/a?CID=1559&Values=2864408708&Redirect=http://qhd.house.163.com/topic/hz/lhtt0331/', - -'ƽ彫', -'http://g.163.com/a?CID=1560&Values=2519885896&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp' - -); - -var liaoning=new section( - -'﹫ լ䷶', -'http://g.163.com/a?CID=1541&Values=2048003453&Redirect=http://www.wandamansion.com', - -'ԶʱƷ', -'http://g.163.com/a?CID=1542&Values=540544072&Redirect=http://www.yysdc.com/', - -'׷ƸӢ', -'http://g.163.com/a?CID=1543&Values=2504234005&Redirect=http://sy.house.163.com/news2/110325/13/780322-1.shtml', - -'Ļ', -'http://g.163.com/a?CID=1544&Values=4239144350&Redirect=http://xf.house.163.com/sy/0KNQ.html', - -'ҵزͶ', -'http://g.163.com/a?CID=1545&Values=3531852737&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'ȫ', -'http://g.163.com/a?CID=1546&Values=432142392&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1547&Values=3758417274&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm', - -'լ ҫϷ', -'http://g.163.com/a?CID=1548&Values=1006342877&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'ȥϴ ٺ', -'http://g.163.com/a?CID=1549&Values=1969115744&Redirect=http://qhd.house.163.com/topic/hz/lhtt0331/', - -'ƽ彫', -'http://g.163.com/a?CID=1550&Values=3058321033&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp' - -); - -var neimenggu=new section( - -'﹫ լ䷶', -'http://g.163.com/a?CID=1571&Values=4261276105&Redirect=http://www.wandamansion.com', - -'ȫ', -'http://g.163.com/a?CID=1572&Values=3151751761&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'״ʳα', -'http://g.163.com/a?CID=1573&Values=2511114005&Redirect=http://km.house.163.com/topic/xa/scgjcba/', - -'ҵزͶ', -'http://g.163.com/a?CID=1574&Values=627933417&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1575&Values=1216993560&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'ƽ彫', -'http://g.163.com/a?CID=1576&Values=553663321&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'', -'http://g.163.com/a?CID=1577&Values=357376222&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1578&Values=759167894&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1579&Values=1481138169&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1580&Values=4211744630&Redirect=http://www.foloda.com' - -); - -var ningxia=new section( - -'﹫ լ䷶', -'http://g.163.com/a?CID=1601&Values=600487394&Redirect=http://www.wandamansion.com', - -'ȫ', -'http://g.163.com/a?CID=1602&Values=4056996756&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'״ʳα', -'http://g.163.com/a?CID=1603&Values=3107658362&Redirect=http://km.house.163.com/topic/xa/scgjcba/', - -'ҵزͶ', -'http://g.163.com/a?CID=1604&Values=21683722&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1605&Values=152826465&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'ƽ彫', -'http://g.163.com/a?CID=1606&Values=2002593813&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'', -'http://g.163.com/a?CID=1607&Values=1061836462&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1608&Values=1151735200&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1609&Values=2910377874&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1610&Values=3427746272&Redirect=http://www.foloda.com' - -); - -var qinghai=new section( - -'﹫ լ䷶', -'http://g.163.com/a?CID=1611&Values=1125876318&Redirect=http://www.wandamansion.com', - -'ȫ', -'http://g.163.com/a?CID=1612&Values=422600227&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'״ʳα', -'http://g.163.com/a?CID=1613&Values=2302037667&Redirect=http://km.house.163.com/topic/xa/scgjcba/', - -'ҵزͶ', -'http://g.163.com/a?CID=1614&Values=3372736983&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1615&Values=1038548139&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'ƽ彫', -'http://g.163.com/a?CID=1616&Values=2301270961&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'', -'http://g.163.com/a?CID=1617&Values=2904508348&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1618&Values=410602887&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1619&Values=4248627044&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1620&Values=1258697523&Redirect=http://www.foloda.com' - -); - -var qita=new section( - -'΢ֻͻ˷', -'http://t.163.com/mobile', - -'ֻʱշʼ', -'http://mail.blog.163.com/blog/static/822094242010829103528389/', - -'2010ղ߻', -'http://news.163.com/special/2010ending/', - -'13Լר', -'http://mail.blog.163.com/blog/static/822094242010112823415891/', - -'163/126iPhone', -'http://help.163.com/special/007525G0/163mail_guide.html?id=2716', - -'۰ﺢ', -'http://gongyi.163.com/love365?mailsignresult=-1', - -'˫', -'http://quan.123.163.com/?from=163wenzilian', - -'ֻƱÿͣ', -'http://help.3g.163.com/stock/', - -'°ֻ', -'http://m.123.163.com/?sjysc1108', - -'ر', -'http://bafang.163.com/' - -); - -var shan3xi=new section( - -'״ʳα', -'http://g.163.com/a?CID=1461&Values=2136197145&Redirect=http://km.house.163.com/topic/xa/scgjcba/', - -'׷Ƹ', -'http://g.163.com/a?CID=1462&Values=3316917425&Redirect=http://xa.house.163.com/topic/hz/xazp/', - -'', -'http://g.163.com/a?CID=1463&Values=149345275&Redirect=http://km.house.163.com/topic/xa/scgjcba/', - -'2011ס', -'http://g.163.com/a?CID=1464&Values=3712988329&Redirect=http://xa.house.163.com/news2/110118/8/753783-1.shtml', - -'ȵʱ', -'http://g.163.com/a?CID=1465&Values=697392130&Redirect=http://xa.house.163.com/topic/xa/gxzt/', - -'Ⱥרעز', -'http://g.163.com/a?CID=1466&Values=238246322&Redirect=http://www.daxiangqun.com/', - -'', -'http://g.163.com/a?CID=1467&Values=3040981522&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1468&Values=3374925437&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'Ľ', -'http://g.163.com/a?CID=1469&Values=169976250&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'ˮʫ', -'http://g.163.com/a?CID=1470&Values=793011485&Redirect=http://xa.house.163.com/topic/hz/zsej/' - -); - -var shandong=new section( - -'򸻺', -'http://g.163.com/a?CID=1441&Values=1689407094&Redirect=http://house.qingdaonews.com/content/2011-03/23/content_8710368.htm', - -'Ϋѿ', -'http://g.163.com/a?CID=1442&Values=988792884&Redirect=http://house.weifang.hiao.com/content/2011-03/03/content_8685275.htm', - -'', -'http://g.163.com/a?CID=1443&Values=2706386599&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'ҵزͶ', -'http://g.163.com/a?CID=1444&Values=3392035014&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'ɹӮǧԪ', -'http://g.163.com/a?CID=1445&Values=2614083527&Redirect=http://i.hiao.com/hd/index190.html', - -'ȫ', -'http://g.163.com/a?CID=1446&Values=436911461&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'׼ַ', -'http://g.163.com/a?CID=1447&Values=1215367967&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'ൺ¥315', -'http://g.163.com/a?CID=1448&Values=112924560&Redirect=http://house.qingdaonews.com/node/node_42308.htm', - -'йۺ', -'http://g.163.com/a?CID=1449&Values=2667970567&Redirect=http://house.qingdaonews.com/gb/content/2011-03/15/content_8699694.htm', - -'ѿ', -'http://g.163.com/a?CID=1450&Values=1035911948&Redirect=http://house.weihai.hiao.com/node/node_39337.htm' - -); - -var shanghai=new section( - -'ڻԼ8-10', -'http://g.163.com/a?CID=1381&Values=3418458884&Redirect=http://163.foloda.com/topic/sh/ycgg100913/', - -' ɽ', -'http://g.163.com/a?CID=1382&Values=1445599854&Redirect=http://163.foloda.com/topic/sh/zsssly1231/', - -'ӥɭ־Ƶ깫Ԣ', -'http://g.163.com/a?CID=1383&Values=1157074672&Redirect=http://163.foloda.com/topic/sh/hsl/', - -'¹콢', -'http://g.163.com/a?CID=1384&Values=1190500672&Redirect=http://163.foloda.com/topic/sh/xygj313/', - -'ƷԷ', -'http://g.163.com/a?CID=1385&Values=2729506797&Redirect=http://myforest-lcy.com/', - -'лƾװ78', -'http://g.163.com/a?CID=1386&Values=1105865289&Redirect=http://163.foloda.com/topic/sh/yzlj1129/', - -'סլ Ȼ', -'http://g.163.com/a?CID=1387&Values=2851867226&Redirect=http://kunshan.house.163.com/news2/110407/3/785623-1.shtml', - -'Ľ', -'http://g.163.com/a?CID=1388&Values=1103941632&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'ɽǶɽ', -'http://g.163.com/a?CID=1389&Values=2072858580&Redirect=http://163.foloda.com/topic/sh/longhu323/', - -'̰14800Ԫ/O', -'http://g.163.com/a?CID=1390&Values=2853946711&Redirect=http://163.foloda.com/topic/sh/bswd316/' - -); - -var shanxi=new section( - -'׷̫ԭƸ', -'http://g.163.com/a?CID=1451&Values=2703525003&Redirect=http://ty.house.163.com/news2/101019/1/715996-1.shtml', - -'ȫ', -'http://g.163.com/a?CID=1452&Values=1268981401&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'׼ַ', -'http://g.163.com/a?CID=1453&Values=1884424223&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'ҵزͶ', -'http://g.163.com/a?CID=1454&Values=2833138962&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'', -'http://g.163.com/a?CID=1455&Values=258898259&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'׸15װ޷', -'http://g.163.com/a?CID=1456&Values=4253558500&Redirect=http://wh.vanke.com/indexad.asp?Title=0221163wzl&UrlTo=/house/goldencity/register.asp', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1457&Values=4069211149&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm', - -'լ ҫϷ', -'http://g.163.com/a?CID=1458&Values=2510006128&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1459&Values=1167961316&Redirect=http://www.chineseoffice.com.cn/', - -'ƽ彫', -'http://g.163.com/a?CID=1460&Values=1466984727&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp' - -); - -var tianjin=new section( - -'վƸ', -'http://g.163.com/a?CID=1361&Values=2929173111&Redirect=http://tj.house.163.com/news2/101019/1/715997-1.shtml', - -'Ľ', -'http://g.163.com/a?CID=1362&Values=3777304491&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'׸15װ޷', -'http://g.163.com/a?CID=1363&Values=3440031390&Redirect=http://wh.vanke.com/indexad.asp?Title=0221163wzl&UrlTo=/house/goldencity/register.asp', - -'ҵزͶ', -'http://g.163.com/a?CID=1364&Values=929124833&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1365&Values=90205709&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1366&Values=3689197257&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'', -'http://g.163.com/a?CID=1367&Values=1968599507&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1368&Values=810850245&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1369&Values=1611213978&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1370&Values=860811041&Redirect=http://www.foloda.com' - -); - -var xinjiang=new section( - -'﹫ լ䷶', -'http://g.163.com/a?CID=1581&Values=3365491210&Redirect=http://www.wandamansion.com', - -'ȫ', -'http://g.163.com/a?CID=1582&Values=336470330&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'״ʳα', -'http://g.163.com/a?CID=1583&Values=3472861197&Redirect=http://km.house.163.com/topic/xa/scgjcba/', - -'ҵزͶ', -'http://g.163.com/a?CID=1584&Values=1804131147&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1585&Values=3609375102&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'ƽ彫', -'http://g.163.com/a?CID=1586&Values=993300697&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'', -'http://g.163.com/a?CID=1587&Values=460987308&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1588&Values=1431906569&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1589&Values=956197227&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1590&Values=4241274752&Redirect=http://www.foloda.com' - -); - -var xizang=new section( - -'﹫ լ䷶', -'http://g.163.com/a?CID=1621&Values=1130191017&Redirect=http://www.wandamansion.com', - -'ȫ', -'http://g.163.com/a?CID=1622&Values=1292665924&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'״ʳα', -'http://g.163.com/a?CID=1623&Values=2757938531&Redirect=http://km.house.163.com/topic/xa/scgjcba/', - -'ҵزͶ', -'http://g.163.com/a?CID=1624&Values=1197009682&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1625&Values=3326422532&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'ƽ彫', -'http://g.163.com/a?CID=1626&Values=2856965099&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'', -'http://g.163.com/a?CID=1627&Values=3569650124&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1628&Values=2300324860&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1629&Values=3612030918&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1630&Values=3299402376&Redirect=http://www.foloda.com' - -); - -var yunnan=new section( - -'׷Ƹ', -'http://g.163.com/a?CID=1521&Values=631016055&Redirect=http://km.house.163.com/news2/101019/15/716000-1.shtml', - -'Ľ', -'http://g.163.com/a?CID=1522&Values=1485880991&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'ҵزͶ', -'http://g.163.com/a?CID=1523&Values=2669915245&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'콭', -'http://g.163.com/a?CID=1524&Values=2351486230&Redirect=http://www.v9666.com', - -'ɽ2ڽĻ', -'http://g.163.com/a?CID=1525&Values=1629509434&Redirect=http://cq.house.163.com/topic/cq/bshf110401/index.html', - -'֮棡', -'http://g.163.com/a?CID=1526&Values=497803574&Redirect=http://wh.vanke.com/indexad.asp?Title=wangyiyouxiang&UrlTo=/house/usonian/register.asp', - -'ƽ彫', -'http://g.163.com/a?CID=1527&Values=3247905635&Redirect=http://wh.vanke.com/indexad.asp?Title=163sywzl0321&UrlTo=/house/paradiso/register.asp', - -'´ԭ', -'http://g.163.com/a?CID=1528&Values=1569929022&Redirect=http://cq.house.163.com/topic/cq/zybly110314/index.html', - -'פ´ѡַȫ', -'http://g.163.com/a?CID=1529&Values=533233735&Redirect=http://beijing.chineseoffice.com.cn', - -'ַⷿ--ϴ', -'http://g.163.com/a?CID=1530&Values=2870090898&Redirect=http://www.foloda.com' - -); - -var zhejiang=new section( - -'̲ƸԤ', -'http://g.163.com/a?CID=1411&Values=3567176511&Redirect=http://hz.house.163.com/topic/nb/morect/index.html', - -'ȫ', -'http://g.163.com/a?CID=1412&Values=1748498680&Redirect=http://xm.house.163.com/topic/hz/xmwd/index.html', - -'ӮIPHONE4', -'http://g.163.com/a?CID=1413&Values=3953215278&Redirect=http://www.xici.net/d143476647.htm', - -'ҵزͶ', -'http://g.163.com/a?CID=1414&Values=958729281&Redirect=http://ts.house.163.com//topic/hz/tswd001/index1.html', - -'׼ַ', -'http://g.163.com/a?CID=1415&Values=2306815090&Redirect=http://jn.house.163.com/topic/hz/lnzygy/', - -'Ľ', -'http://g.163.com/a?CID=1416&Values=3583016750&Redirect=http://wx.house.163.com/topic/hz/jywd/', - -'', -'http://g.163.com/a?CID=1417&Values=1066762875&Redirect=http://nj.house.163.com/topic/hz/njwd/', - -'լ ҫϷ', -'http://g.163.com/a?CID=1418&Values=3834533750&Redirect=http://hf.house.163.com/topic/hz/hfwdgg2/', - -'ݹųǺĽ', -'http://g.163.com/a?CID=1419&Values=2659532313&Redirect=http://suzhou.house.163.com/topic/suzhou/xintiandidd/index.htm', - -'״ʳα', -'http://g.163.com/a?CID=1420&Values=3110216503&Redirect=http://km.house.163.com/topic/xa/scgjcba/' - -); - diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/rpic/fld3/flsclasses.js b/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/rpic/fld3/flsclasses.js deleted file mode 100755 index e3e5d8082..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/rpic/fld3/flsclasses.js +++ /dev/null @@ -1,30 +0,0 @@ -//ģ -function section(a1,a2,b1,b2,c1,c2,d1,d2,e1,e2,f1,f2,g1,g2,h1,h2,k1,k2,p1,p2){ - this.string0=a1; this.link0=a2; - this.string1=b1; this.link1=b2; - this.string2=c1; this.link2=c2; - this.string3=d1; this.link3=d2; - this.string4=e1; this.link4=e2; - this.string5=f1; this.link5=f2; - this.string6=g1; this.link6=g2; - this.string7=h1; this.link7=h2; - this.string8=k1; this.link8=k2; - this.string9=p1; this.link9=p2; -} -// -function echoa(clicks){ - // - void('' + prov.string0 + ''); - void('' + prov.string1 + ''); - void('' + prov.string2 + ''); - void('' + prov.string3 + ''); - void('' + prov.string4 + ''); -} -function echob(clicks){ - // - void('' + prov.string5 + ''); - void('' + prov.string6 + ''); - void('' + prov.string7 + ''); - void('' + prov.string8 + ''); - void('' + prov.string9 + ''); -} \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/techpro/shangpin/20110331/36-65.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/techpro/shangpin/20110331/36-65.jpg deleted file mode 100755 index 5e63909a8..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/techpro/shangpin/20110331/36-65.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/techpro/tuangou/20110218/170-80.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/techpro/tuangou/20110218/170-80.jpg deleted file mode 100755 index b5e7492cf..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/techpro/tuangou/20110218/170-80.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/yodaoimages/pack.r091221/scripts/autocomplete.163.165290.js b/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/yodaoimages/pack.r091221/scripts/autocomplete.163.165290.js deleted file mode 100755 index 69ad0da6f..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/img3.126.net/yodaoimages/pack.r091221/scripts/autocomplete.163.165290.js +++ /dev/null @@ -1 +0,0 @@ -var SC={create:function(){return function(){this.initialize.apply(this,arguments)}}};function $S(){var _=[],$;for(var A=0;A0)this.kf=$;else this.kf=$+this.KEYFROM_POST},getSearchUrl:function($){return encodeURI(this.searchServ+this.searchParamName+"="+$+"&keyfrom="+this.kf+this.searchMoreParams)},getSugQueryUrl:function(_,A,$){return encodeURI(this.sugServ+this.S_QUERY_URL_POST+_+"&o="+this.oN+"&count="+$+"&keyfrom="+this.kf+this.sugMoreParams+this.time())},log:function(D,C,B,_,$){var A="";if(C)A+=C;if(B)A+=B;if(_)A+=_;if($)A+=$;var E=new Image();E.src=encodeURI(this.logServ+this.S_LOG_URL_POST+D+A+this.time());return true},setSugIcon:function(C){var B=this.oN+"_icon";if(document.getElementById(B))document.body.removeChild(document.getElementById(B));this.icon=document.createElement("img");this.icon.id=B;this.icon.src=C;this.icon.style.position="absolute";this.icon.style.zIndex="99";this.icon.style.width="13px";this.icon.style.height="10px";this.icon.style.cursor="pointer";var $=this.frameBox,A=SP.cumOffset($),_=0;this.icon.style.left=(A[0]+_+$.offsetWidth-13*1.5)+"px";this.icon.style.top=(A[1]+($.offsetHeight-10)/2)+"px";this.icon.style.display="";document.body.appendChild(this.icon);SEvent.observe(this.icon,"click",this.pressPoint.sbAEListener(this));SEvent.observe(this.icon,"mouseover",this.onmouseover2.sbAEListener(this));SEvent.observe(this.icon,"mouseout",this.onmouseout2.sbAEListener(this))},dblClick:function(){if(this.box.createTextRange){var $=this.box.createTextRange();$.moveStart("character",0);$.select()}else if(this.box.setSelectionRange)this.box.setSelectionRange(0,this.box.value.length);if(this.sugFlag){if(this.box.value!=""){if(this.lq==this.box.value){if(this.sdiv.childNodes.length>0)if(!this.vis)this.show();else this.hide();return}this.doReq()}}else if(this.box.value!="")this.insertSugHint()},winResize:function(){if(this.vis)this.show();if(!this.hI)this.setSugIcon(this.iconUrl)},storeOldValue:function(){if(this.oldValForCtrlZNum0){this.box.value=this.oldValForCtrlZ[--this.oldValForCtrlZNum];if(this.box.value!="")this.ctrlZFlag=true;else this.oldVal="";this.upDownTag=false}if(this.IE)_.returnValue=false;else _.preventDefault();return false}return true}switch(_.keyCode){case SK.PAGE_UP:case SK.PAGE_DOWN:case SK.END:case SK.HOME:case SK.INSERT:case SK.CTRL:case SK.ALT:case SK.LEFT:case SK.RIGHT:case SK.SHIFT:case SK.TAB:return true;case SK.ESC:this.hide();return false;case SK.UP:if(this.vis&&this.sugFlag){this.upDownTag=true;this.up()}else{if(this.sdiv.childNodes.length>1)if(this.lq==this.box.value)if(this.sugFlag){this.show();return false}if(this.box.value!="")this.doReq()}if(this.IE)_.returnValue=false;else _.preventDefault();return false;case SK.DOWN:if(this.vis&&this.sugFlag){this.upDownTag=true;this.down()}else{if(this.sdiv.childNodes.length>1)if(this.lq==this.box.value)if(this.sugFlag){this.show();return false}if(this.box.value!="")this.doReq()}if(this.IE)_.returnValue=false;else _.preventDefault();return false;case SK.RETURN:if(this.vis&&this.curNodeIdx>-1)if(!this.select()){if(this.IE)_.returnValue=false;else _.preventDefault();return false}return true;case SK.BACKSPACE:if(this.box.value.length==1){this.storeOldValue();this.oldVal=""}default:this.upDownTag=false;return true}},sugReq:function(){if(this.box.value!=""&&this.box.value!=this.initVal){this.initVal="";if(this.lq!=this.box.value)if(!this.upDownTag)if(typeof(isYdDefault)!=undefined){if(!isYdDefault())this.doReq()}else this.doReq()}else if(this.lq!=""){this.lq="";if(this.vis){this.hide();this.clean()}}if(this.timeoutId!=0)clearTimeout(this.timeoutId);this.timeoutId=setTimeout(this.sugReq.sbind(this),this.REQUEST_TIMEOUT)},getSiteResult:function(B){var D=new RegExp("<[s][p][a][n].*>.*");m=D.exec(B);if(m==null){D=new RegExp("<[aA].*>.*");m=D.exec(B)}if(m==null){var F=B.indexOf("HREF=\"");if(F!=-1){var E=B.indexOf("\"",F+6),_=B.substring(F+6,E);return _}return null}else{var $=new RegExp("[hH][rR][eE][fF]=.*><[fF][oO][nN][tT]"),C=$.exec(m);if(C[0].length<=13)return null;var A=C[0].split(" "),_;if(A.length>1)_=A[0].substr(6,A[0].length-7);else _=A[0].substr(6,A[0].length-13);return _}},getSelValue:function($){return $.replace(/this.txtBox.value=/,"").replace(/\'/g,"")},select:function($){if($){if(this.getCurNode()){var _=this.getCurNode().innerHTML,A=this.getSiteResult(_);if(A!=null){this.log(this.LOG_MOUSE_SELECT,"&q="+this.oldVal,"&index=0","&select="+A,"&direct=true");this.hide();void(A,"_blank")}else{try{var D=this.getCurNode().getAttribute(this.ITEM_SEL_ATTR_NAME),C=this.getSelValue(D);if(this.oldVal!=C)this.storeOldValue();this.log(this.LOG_MOUSE_SELECT,"&q="+this.oldVal,"&index="+this.curNodeIdx,"&select="+C);this.oldVal=C;this.hide();if(this.scb!=null)this.scb(C,this);else{this.clearOldValue();var B=this.getSearchUrl(C);void(B,"_blank")}}catch($){}}}}else if(this.getCurNode()){_=this.getCurNode().innerHTML,A=this.getSiteResult(_);if(A!=null){this.log(this.LOG_KEY_SELECT,"&q="+this.oldVal,"&index=0","&select="+A,"&direct=true");this.hide();void(A,"_blank")}else{try{D=this.getCurNode().getAttribute(this.ITEM_SEL_ATTR_NAME),C=this.getSelValue(D);if(this.oldVal!=C)this.storeOldValue();if(this.box.value!=C)return true;else this.log(this.LOG_KEY_SELECT,"&q="+this.oldVal,"&index="+this.curNodeIdx,"&select="+C);this.oldVal=C;this.hide();if(this.scb!=null)this.scb(this.box.value,this);else{this.clearOldValue();B=this.getSearchUrl(C);void(B,"_blank")}}catch($){}}}return false},doReq:function($){if(!this.sugFlag)return;if($=="undefined"||$==null){if(this.oldVal!=this.box.value&&!this.ctrlZFlag)this.storeOldValue();this.oldVal=this.box.value;this.ctrlZFlag=false;this.lq=this.box.value;var $=this.box.value}this.count++;var A=encodeURIComponent(document.URL),_=this.getSugQueryUrl($,A,this.count);this.excuteCall(_)},clean:function(){this.size=0;this.curNodeIdx=-1;this.sdiv.innerHTML="";this.bdiv.innerHTML=""},onComplete:function(){setTimeout(this.updateContent.sbind(this,arguments[0]),5)},cleanScript:function(){while(this.sptDiv.childNodes.length>0)this.sptDiv.removeChild(this.sptDiv.firstChild)},isValidNode:function($){return($.nodeType==1)&&($.getAttribute(this.ITEM_SEL_ATTR_NAME))},getReqStr:function($){if($&&$.getElementsByTagName("div").length>0)return $.getElementsByTagName("div")[0].getAttribute("id");return null},updateContent:function(){this.cleanScript();var C=this.box.value;if(this.bdiv.innerHTML=="")if(this.sdiv.innerHTML!=""&&this.getReqStr(this.sdiv)==C)return;else{this.hide();this.clean();return}if(this.getReqStr(this.bdiv)!=C)if(this.sdiv.innerHTML!=""&&this.getReqStr(this.sdiv)==C)return;else{this.hide();return}var A,_=false,B=(((this.bdiv.getElementsByTagName("table"))[1]).getElementsByTagName("tr"));for(var D=0;D=3)this.bindATagWithMouseEvent($[2],false);this.show();this.mouseTag=false}else{this.hide();this.clean()}},showContent:function(){var $=this.frameBox,A=SP.cumOffset($),B=0;this.sdiv.style.top=A[1]+($.offsetHeight+B)+"px";var _=0;if(this.bName=="IE");else _=1;this.sdiv.style.left=A[0]+_+"px";this.sdiv.style.cursor="default";this.sdiv.style.width=$.offsetWidth+"px";SElement.show(this.sdiv);this.vis=true;this.curNodeIdx=-1},show:function(){if(this.sdiv.childNodes.length<1)return;if(this.sugFlag)if(this.getReqStr(this.sdiv)!=this.box.value)return;this.showContent()},hide:function(){this.hlOff();SElement.hide(this.sdiv);this.curNodeIdx=-1;this.vis=false},hide2:function(){if(this.clickEnabled){this.hide();this.clickEnabled=false;setTimeout(this.enableClick.sbind(this),60)}},onblur:function(){this.hide();var $=true;if(this.IE)if(this.blurCount==0){$=false;this.blurCount++}if(typeof(ydInputBlur)!=undefined&&$)ydInputBlur(this.box)},enableClick:function(){this.clickEnabled=true},onmousemove:function($){this.mouseTag=true;this.onmouseover($)},onmouseover:function(_){this.box.onblur=null;if(!this.mouseTag){this.mouseTag=true;return}var A=SEvent.element(_);while(A.parentNode&&(!A.tagName||(A.getAttribute(this.ITEM_INDEX_ATTR_NAME)==null)))A=A.parentNode;var $=(A.tagName)?A.getAttribute(this.ITEM_INDEX_ATTR_NAME):-1;if($==-1||$==this.curNodeIdx)return;this.hlOff();this.curNodeIdx=Number($);this.hlOn(false)},onmouseout:function(){this.hlOff();this.curNodeIdx=-1;this.box.onblur=this.onblur.sbAEListener(this)},getNode:function($){if(this.childs&&($>=0&&$0){this.hlOff();this.curNodeIdx=$-1;this.hlOn(true)}else if(this.curNodeIdx==0){this.hlOff();this.curNodeIdx=$-1;this.box.value=this.oldVal}else{this.curNodeIdx=this.size-1;this.hlOn(true)}},down:function(){var $=this.curNodeIdx;if(this.curNodeIdx<0){this.curNodeIdx=$+1;this.hlOn(true)}else if(this.curNodeIdx<(this.size-1)){this.hlOff();this.curNodeIdx=$+1;this.hlOn(true)}else{this.hlOff();this.curNodeIdx=-1;this.box.value=this.oldVal}},excuteCall:function(_){var $=document.createElement("script");$.src=_;this.sptDiv.appendChild($)},updateCall:function($){$=unescape($);$=$.replace(/</g,"<").replace(/>/g,">").replace(/"/g,"\"").replace(/&/g,"&").replace(/'/g,"'");this.bdiv.innerHTML=$;if(this.bdiv.childNodes.length<2)this.bdiv.innerHTML="";this.onComplete()},closeSuggest:function($){this.sugFlag=false},focusBox:function(){this.box.focus();if(this.box.createTextRange){var $=this.box.createTextRange();$.moveStart("character",this.box.value.length);$.select()}else if(this.box.setSelectionRange)this.box.setSelectionRange(this.box.value.length,this.box.value.length)},pressPoint:function($){if(this.clickEnabled){this.clickEnabled=false;setTimeout(this.enableClick.sbind(this),20);this.log(this.LOG_ICON_PRESS,"&q="+this.box.value,"&visible="+this.vis);this.focusBox();if(!this.vis){if(this.sugFlag){if(this.box.value=="")this.insertInputHint();else{if(typeof(ydInputFocus)!=undefined)if(ydInputFocus(this.box))return;if(this.lq!=this.box.value){this.doReq();setTimeout(this.showNoSug.sbind(this),200)}else if(this.sdiv.innerHTML==""){this.doReq();setTimeout(this.showNoSug.sbind(this),200)}else if(this.sdiv.childNodes.length<2)this.insertNoSugHint();else this.show()}}else this.insertSugHint()}else this.hide()}},showNoSug:function(){if(this.sdiv.childNodes.length<1)this.insertNoSugHint()},showSugHint:function(){if(this.sdiv.childNodes.length<1)return;this.showContent()},onCompleteHint:function(){setTimeout(this.showSugHint.sbind(this,arguments[0]),5)},onmouseover2:function($){this.box.onblur=null},onmouseout2:function(){this.box.onblur=this.onblur.sbAEListener(this)},bindATagWithMouseEvent:function(C,_){try{if(this.hC)if(C.parentNode){C.parentNode.removeChild(C);return}}catch(A){}var $=C.getElementsByTagName("A");if($.length==0)$=C.getElementsByTagName("a");var B=$[0];if(_)SEvent.observe(B,"click",this.turnOnSuggest.sbAEListener(this));else SEvent.observe(B,"click",this.turnOffSuggest.sbAEListener(this));SEvent.observe(B,"mouseover",this.onmouseover2.sbAEListener(this));SEvent.observe(B,"mouseout",this.onmouseout2.sbAEListener(this))},insertSugHint:function(){this.insertHint("\u63d0\u793a\u529f\u80fd\u5df2\u5173\u95ed","\u6253\u5f00\u63d0\u793a\u529f\u80fd",true)},insertInputHint:function(){this.insertHint("\u5728\u641c\u7d22\u6846\u4e2d\u8f93\u5165\u5173\u952e\u5b57\uff0c\u5373\u4f1a\u5728\u8fd9\u91cc\u51fa\u73b0\u63d0\u793a","\u5173\u95ed\u63d0\u793a\u529f\u80fd",false)},insertNoSugHint:function(){this.insertHint("\u6ca1\u6709\u53ef\u7528\u7684\u63d0\u793a","\u5173\u95ed\u63d0\u793a\u529f\u80fd",false)},insertHint:function(_,A,$){this.sdiv.innerHTML=this.hintCode1+_+this.hintCode2+A+this.hintCode3;var B=this.sdiv.getElementsByTagName("table")[2];this.bindATagWithMouseEvent(B,$);this.onCompleteHint()},turnOnSuggest:function(){var $=this.sugServ+this.S_PREF_URL_POST+"suggest=suggest"+"&o="+this.oN+this.time(),_=new Image();_.src=encodeURI($);this.sugFlag=true;this.lq="";this.initVal=this.box.value;this.oldVal=this.initVal;this.upDownTag=false;if(this.vis)this.hide();this.clean();return false},turnOffSuggest:function(){var $=this.sugServ+this.S_PREF_URL_POST+"&o="+this.oN+this.time(),_=new Image();_.src=encodeURI($);if(this.vis)this.hide();this.clean();this.sugFlag=false;return false},time:function(){return"&time="+new Date()},browserInfo:function(){this.bName="";this.bVer="";var _=navigator.userAgent,A=/MS(IE)\s([^.]+)/i,$=_.match(A);if($==null){A=/(Firefox)\/([^.]+)/i;$=_.match(A);if($==null)return}this.bName=$[1];this.bVer=$[2]},LOG_MOUSE_SELECT:"mouseSelect",LOG_KEY_SELECT:"keySelect",LOG_ICON_PRESS:"iconPress",hintCode1:"
",hintCode2:"
",hintCode3:"
",REQUEST_TIMEOUT:7,ITEM_INDEX_ATTR_NAME:"s_index",ITEM_HIGHLIGHT_STYLE:"aa_highlight",ITEM_SEL_ATTR_NAME:"onSelect",CZNUM:10,KEYFROM_POST:".suggest",S_QUERY_URL_POST:"/suggest/suggest.s?query=",S_LOG_URL_POST:"/suggest/clog.s?type=",S_PREF_URL_POST:"/suggest/setpref.s?",defSugServ:"httpdisabled://"+document.domain,defSearchServ:"httpdisabled://"+document.domain+"/search?",defSearchParamName:"q",defKeyfrom:document.domain.replace(/.youdao.com/,""),defSugName:"aa",defSugIconUrl:"httpdisabled://shared.youdao.com/images/downarrow.gif"};function turnOffSuggest(){return true}function closeSuggest($){if($==null||$=="undefined")$=AutoComplete.defSugName;if(typeof $!="object")return;$.closeSuggest();return true} \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/auto/2011/3/30/20110330215354a8c7a.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/auto/2011/3/30/20110330215354a8c7a.jpg deleted file mode 100755 index d02a1b83e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/auto/2011/3/30/20110330215354a8c7a.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/7/201104071025387042e.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/7/201104071025387042e.jpg deleted file mode 100755 index 10c4d2750..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/7/201104071025387042e.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/7/20110407103153df111.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/7/20110407103153df111.jpg deleted file mode 100755 index 0ddd02375..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/7/20110407103153df111.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/8/20110408105903d5d53.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/8/20110408105903d5d53.jpg deleted file mode 100755 index 58ddf9f21..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/8/20110408105903d5d53.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/8/20110408110145beb70.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/8/20110408110145beb70.jpg deleted file mode 100755 index 07dff8fea..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/book/2011/4/8/20110408110145beb70.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/cnews/js/ntes_jslib_1.x.js b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/cnews/js/ntes_jslib_1.x.js deleted file mode 100755 index a5616b342..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/cnews/js/ntes_jslib_1.x.js +++ /dev/null @@ -1,14 +0,0 @@ -/* - * NetEase Javascript Library v1.2.5 - * - * Modified from - * jRaiser Javascript Library - * http://code.google.com/p/jraiser/ - * Copyright 2008-2010 Heero.Luo (http://heeroluo.net/) - * - * licensed under MIT license - * - * Creation date: 2008/2/6 - * Modified date: 2010/8/4 - */ -(function(R,f){var b="1.2.5 Build 201008041550",_="NTES";if(R[_]&&R[_].version>=b)return;var A=R.$,c=R.document,T=R[_]=R.$=function($,_){if(!$)return $;"string"===typeof $&&($=L($,_));return M($)};T.one=function($,_){return M(L($,_,1))};T.all=function($,_){return M(L($,_,0))};function L(_,B,$){var A=s.exec(_,B||c);if($!==f)if(A){var C=T.util.isArray(A);if(1===$&&C)return A[0];else if(0===$&&!C)return[A]}else if(0===$)return[];return A}function M(A){if(A&&!A[_])if(A.nodeType){if("unknown"!==typeof A.getAttribute)for(var $ in T.element)f===A[$]&&(A[$]=T.element[$])}else A=T.util.extend(T.util.toArray(A),T.element);return A}T.version=b;T.resume=function(){A=R.$;R.$=R[_]=T;return T};T.retire=function(){R.$=A;return A};var O=c.createElement("div");O.innerHTML="

";var s={SPACE:/\s*([\s>~+,])\s*/g,ISSIMPLE:/^#?[\w\u00c0-\uFFFF_-]+$/,IMPLIEDALL:/([>\s~\+,]|^)([#\.\[:])/g,ATTRVALUES:/=(["'])([^'"]*)\1]/g,ATTR:/\[\s*([\w\u00c0-\uFFFF_-]+)\s*(?:(\S?\=)\s*(.*?))?\s*\]/g,PSEUDOSEQ:/\(([^\(\)]*)\)$/g,BEGINIDAPART:/^(?:\*#([\w\u00c0-\uFFFF_-]+))/,STANDARD:/^[>\s~\+:]/,STREAM:/[#\.>\s\[\]:~\+]+|[^#\.>\s\[\]:~\+]+/g,ISINT:/^\d+$/,enableQuerySelector:O.querySelectorAll&&O.querySelectorAll(".TEST").length>0,tempAttrValues:[],tempAttrs:[],idName:_+"UniqueId",id:0,exec:function($,I){var _,G,E,C,B,J,K,F,H,L,D=this;$=$.trim();if(""===$)return;if(D.ISSIMPLE.test($))if(0===$.indexOf("#")&&typeof I.getElementById!=="undefined")return D.getElemById(I,$.substr(1));else if(typeof I.getElementsByTagName!=="undefined")return T.util.toArray(I.getElementsByTagName($));if(D.enableQuerySelector&&I.nodeType){try{return T.util.toArray(I.querySelectorAll($))}catch(A){}}I=I.nodeType?[I]:T.util.toArray(I);G=$.replace(D.SPACE,"$1").replace(D.ATTRVALUES,D.analyzeAttrValues).replace(D.ATTR,D.analyzeAttrs).replace(D.IMPLIEDALL,"$1*$2").split(",");E=G.length;C=-1;_=[];while(++C1?D.unique(_):_},analyzeAttrs:function(_,B,A,$){return"[]"+(s.tempAttrs.push([B,A,$])-1)},analyzeAttrValues:function($,A,_){return"="+(s.tempAttrValues.push(_)-1)+"]"},generateId:function(_){var B=this.idName,$;try{$=_[B]=_[B]||new Number(++this.id)}catch(A){$=_.getAttribute(B);if(!$){$=new Number(++this.id);_.setAttribute(B,$)}}return $.valueOf()},unique:function(C){var A=[],D=0,B={},_,$;while(_=C[D++])if(1===_.nodeType){$=this.generateId(_);if(!B[$]){B[$]=true;A.push(_)}}return A},attrMap:{"class":"className","for":"htmlFor"},getAttribute:function($,A){var _=this.attrMap[A]||A,B=$[_];if("string"!==typeof B)if("undefined"!==typeof $.getAttributeNode){B=$.getAttributeNode(A);B=f==B?B:B.value}else if($.attributes)B=String($.attributes[A]);return null==B?"":B},getElemById:function(A,$){var _=A.getElementById($);if(_&&_.id!==$&&A.all){_=A.all[$];if(_){_.nodeType&&(_=[_]);for(var B=0;B<_.length;B++)if(this.getAttribute(_[B],"id")===$)return _[B]}}else return _},getElemsByTagName:function(F,H,E,D,_){var A=[],I=-1,G=F.length,$,C,B;D!=="*"&&(B=D.toUpperCase());while(++I=0&&D":function(_,$){return s.getElemsByTagName(_,"firstChild","nextSibling",$)},"+":function(_,$){return s.getElemsByTagName(_,"nextSibling","nextSibling",$,1)},"~":function(_,$){return s.getElemsByTagName(_,"nextSibling","nextSibling",$)},"[]":function($,_){_=s.tempAttrs[_];if(_){if(s.ISINT.test(_[2]))_[2]=s.tempAttrValues[_[2]];return s.getElemsByAttribute($,_)}else return $},":":function(_,A){var $;if(s.PSEUDOSEQ.test(A)){$=parseInt(RegExp.$1);A=RegExp.leftContext}return s.pseOperators[A]?s.pseOperators[A](_,$):[]}},attrOperators:{"":function($){return $!==""},"=":function(_,$){return $===_},"~=":function(_,$){return(" "+_+" ").indexOf($)>=0},"!=":function(_,$){return $!==_},"^=":function(_,$){return _.indexOf($)===0},"$=":function(_,$){return _.substr(_.length-$.length)===$},"*=":function(_,$){return _.indexOf($)>=0}},pseOperators:{"first-child":function($){return s.checkElemPosition($,1,"firstChild","nextSibling")},"nth-child":function(_,$){return s.checkElemPosition(_,$,"firstChild","nextSibling")},"last-child":function($){return s.checkElemPosition($,1,"lastChild","previousSibling")},"nth-last-child":function(_,$){return s.checkElemPosition(_,$,"lastChild","previousSibling")},"odd":function($){return s.getElemsByPosition($,0,2)},"even":function($){return s.getElemsByPosition($,1,2)},"lt":function(_,$){return s.getElemsByPosition(_,$-1,-1)},"gt":function(_,$){return s.getElemsByPosition(_,$+1,1)}}};T.element={get:function($){return this.nodeType===f?this[$]:(0==$?this:f)},$:function($){return T("number"===typeof $?this.get($):$,this)},hasClass:function($){return T.style.hasClass(this,$)},addCss:function($){return T.style.addCss(this,$)},removeCss:function($){return T.style.removeCss(this,$)},addEvent:function(_,A,$){return T.event.addEvent(this,_,A,$)},removeEvent:function($,_){return T.event.removeEvent(this,$,_)},attr:function(A,B){var _=this;A=s.attrMap[A]||A;if(B!==f)return T.dom.eachNode(_,function($,_){this[$]=T.util.isFunction(_)?_.call(this):_},arguments);else{var $=this.get(0);return $?$[A]:f}},each:function($){return T.dom.eachNode(this,$)}};T.element[_]=T.element.$;R.addEvent=c.addEvent=T.element.addEvent;R.removeEvent=c.removeEvent=T.element.removeEvent;var W={},r=Array.prototype.slice,S=Object.prototype.toString;T.util={isArray:function($){return S.call($)==="[object Array]"},isFunction:function($){return S.call($)==="[object Function]"},toArray:function($){if(T.util.isArray($))return $;var A;try{A=r.call($)}catch(_){A=[];var B=$.length;while(B)A[--B]=$[B]}return A},merge:function(_,$){var B=$.length,A=_.length;while(--B>=0)_[A+B]=$[B];return _},parseTpl:function(A,$,_){if(null==A)return;if(null==$)return A;var B=W[A];if(!B){B=new Function("obj","var _=[];with(obj){_.push('"+A.replace(/[\r\t\n]/g," ").replace(/'(?=[^#]*#>)/g,"\t").split("'").join("\\'").split("\t").join("'").replace(/<#=(.+?)#>/g,"',$1,'").split("<#").join("');").split("#>").join("_.push('")+"');}return _.join('');");_!==false&&(W[A]=B)}return B($)},extend:function($,A){for(var _ in A)$[_]=A[_];return $},each:function(A,_,$){var D=-1,B=A.length,C=B===f||T.util.isFunction(A);if($){if(C){for(D in A)if(false===_.apply(A[D],$))break}else while(++D0){$=" "+$+" ";while(--A>=0)if((" "+_[A].className+" ").indexOf($)>=0)return true}return false},parse:function(C){if("string"===typeof C){var B=C.indexOf(";")>=0,_=C.indexOf(":")>=0,$;if(B||_){$={};C=C.trim().replace(k,"$1").replace(_?a:J,T.style.fixStyleName).match(J);var A=C.length,D=0;if(_){if(A%2!==0)throw"invalid inline style";while(D=0)T.dom.eachNode(_,n,[A[B],C,$]);return _},removeEvent:function($,_,B){_=_.split(H);var A=_.length;while(--A>=0)T.dom.eachNode($,g,[_[A],B]);return $},delegate:function(_,E,G,C){var A=T.event,B=_[A.eventSpace]=_[A.eventSpace]||{},$=G[A.idName]=G[A.idName]||++D;B[E]=B[E]||{};var F=B[E][$];if(!F){F=function($){$=A.fix($);var B=G.call(_,$,C);false===B&&$.preventDefault();return B};B[E][$]=F}return F},getDelegate:function($,B,C){var A=T.event;try{return $[A.eventSpace][B][C[A.idName]]}catch(_){}return C},fix:function(_){!_.target&&(_.target=_.srcElement||c);3==_.target.nodeType&&(_.target=_.target.parentNode);null==_.timeStamp&&(_.timeStamp=Date.now());_.preventDefault=_.preventDefault||function(){this.returnValue=false};_.stopPropagation=_.stopPropagation||function(){this.cancelBubble=true};if(f===_.pageX&&f!==_.clientX){var A=c.documentElement,$=c.body;_.pageX=_.clientX+(A.scrollLeft||$.scrollLeft||0)-(A.clientLeft||0);_.pageY=_.clientY+(A.scrollTop||$.scrollTop||0)-(A.clientTop||0)}if(!_.which&&((_.charCode||_.charCode===0)?_.charCode:_.keyCode))_.which=_.charCode||_.keyCode;if(!_.which&&_.button!==f)_.which=(_.button&1?1:(_.button&2?3:(_.button&4?2:0)));return _}};var q=R.navigator.userAgent.toLowerCase(),i=/(webkit)[ \/]([\w.]+)/.exec(q)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(q)||/(msie) ([\w.]+)/.exec(q)||!/compatible/.test(q)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(R.navigator.userAgent.toLowerCase());T.browser={};if(i){T.browser[i[1]||""]=true;T.browser.version=i[2]||"0"}T.ajax={createXhr:function(){var _;try{_=R.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest()}catch($){}if(!_)throw"failed to create XMLHttpRequest object";return _},send:function(G,C,B,H,A){A=A||T.ajax.createXhr();var E;"string"===typeof C&&(C=C.toUpperCase());C=C!=="GET"&&C!=="POST"?"GET":C;H=H||{};H.async="boolean"===typeof H.async?H.async:true;var _;if(B){_=[];for(var $ in B)B[$]!=null&&_.push($+"="+encodeURIComponent(B[$]));_=_.join("&").replace(/%20/g,"+");if("GET"===C){G+=("?"+_);_=f}}H.async&&!isNaN(H.timeout)&&H.timeout>0&&setTimeout(function(){if(!E){A.abort();H.onTimeout&&H.onTimeout(A)}},H.timeout);A.onreadystatechange=function(){if(4==A.readyState){E=true;var $=200==A.status?"onSuccess":"onError";H[$]&&H[$](A)}};void(C,G,H.async,H.username,H.password);var D=[];"POST"===C&&D.push("application/x-www-form-urlencoded");A.setRequestHeader("X-Requested-With","XMLHttpRequest");if(H.headers)for(var F in H.headers)if("content-type"===F.toLowerCase())D.push(H.headers[F]);else A.setRequestHeader(F,H.headers[F]);D.length&&A.setRequestHeader("Content-Type",D.join(";").replace(/;+/g,";").replace(/;$/,""));A.send(_);return A},importJs:function(C,$,A,_){_=_||c;var B=_.createElement("script");B.language="javascript";B.type="text/javascript";A&&(B.charset=A);B.onloaddisabled=B.onreadystatechange=function(){if(!B.readyState||"loaddisableded"==B.readyState||"complete"==B.readyState){$&&$();B.onloaddisabled=B.onreadystatechange=null;B.parentNode.removeChild(B)}};B.src=C;T.one("head",_).appendChild(B)}};var v=/[smhdMy]$/,K={s:1,m:60,h:60*60,d:24*60*60,M:30*24*60*60,y:365*24*60*60};T.cookie={encoder:R.encodeURIComponent,decoder:R.decodeURIComponent,get:function(B,D){var _=T.cookie;B=_.encoder(B)+"=";var $=c.cookie,A=$.indexOf(B),C;if(-1===A)return D?f:"";A+=B.length;C=$.indexOf(";",A);if(C===-1)C=$.length;return _.decoder($.substring(A,C))},set:function(C,G,A,F,E,D){var _=T.cookie,B=[_.encoder(C)+"="+_.encoder(G)];if(A){var H,$;if("[object Date]"===S.call(A))H=A;else{if("string"===typeof A&&v.test(A)){A=A.substring(0,A.length-1);$=RegExp.lastMatch}if(!isNaN(A)){H=new Date();H.setTime(H.getTime()+A*K[$||"m"]*1000)}}H&&B.push("expires="+H.toUTCString())}E&&B.push("path="+E);F&&B.push("domain="+F);D&&B.push("secure");c.cookie=B.join(";")},del:function($,A,_){c.cookie=T.cookie.encoder($)+"="+(_?";path="+_:"")+(A?";domain="+A:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}};var N=/^\s+|\s+$/g;!String.prototype.trim&&(String.prototype.trim=function(){return this.replace(N,"")});String.prototype.left=function($){return this.substr(0,$)};String.prototype.right=function($){return this.slice(-$)};String.format=function($){var _=arguments,A=new RegExp("%([1-"+_.length+"])","g");return String($).replace(A,function(A,$){return _[$]})};Function.prototype.bind=function(){if(!arguments.length)return this;var _=this,$=r.call(arguments),A=$.shift();return function(){return _.apply(A,$.concat(r.call(arguments)))}};!Array.prototype.indexOf&&(Array.prototype.indexOf=function(A,_){var $=this.length,_=Number(_)||0;_=_<0?Math.ceil(_):Math.floor(_);_<0&&(_+=$);for(;_<$;_++)if(this[_]===A)return _;return-1});Array.prototype.remove=function($){$>=0&&this.splice($,1);return this};function B($){return $<10?"0"+$:$}var U,F,p,P,Y,G;function l($){switch($){case"yyyy":return U;case"yy":return U.toString().slice(-2);case"MM":return B(F);case"M":return F;case"dd":return B(p);case"d":return p;case"HH":return B(P);case"H":return P;case"hh":return B(P>12?P-12:P);case"h":return P>12?P-12:P;case"mm":return B(Y);case"m":return Y;case"ss":return B(G);case"s":return G;default:return $}}Date.now=Date.now||function(){return+new Date};Date.prototype.format=function($){U=this.getFullYear();F=this.getMonth()+1;p=this.getDate();P=this.getHours();Y=this.getMinutes();G=this.getSeconds();return $.replace(/y+|m+|d+|h+|s+|H+|M+/g,l)};O=null;T.ui={};function e(_,$){return(_+1)%$}function I(_,$){return _<=0?$-1:(_-1)%$}T.ui.Slide=function(_,B,G,E,A,F){if(!arguments.length)return;var $=this;$.total=B.length;if(_&&$.total!==_.length)throw"can not match ctrls("+_.length+") and contents("+$.total+")";$.constructor=arguments.callee;$._curIndex=-1;$._ctrls=_;$._contents=B;$._css=G;$._eventName=E;$.interval=A;$.playMode=e;$.rollbackMode=I;$.delay=F;if($._ctrls&&$._ctrls.length&&$._eventName){var D,C;if(F){D=function(_,$){!this._delayTimer&&(this._delayTimer=setTimeout(this.show.bind(this,$),this.delay));_.preventDefault()}.bind($);C=function(){if(this._delayTimer){clearTimeout(this._delayTimer);delete this._delayTimer}}.bind($)}else D=function(_,$){this.show($);_.preventDefault()}.bind($);for(var H=$.total-1;H>=0;H--){T.event.addEvent($._ctrls[H],E,D,new Number(H));C&&T.event.addEvent($._ctrls[H],"mouseout",C)}}$.interval&&$.play()};T.ui.Slide.prototype={show:function(_){var A=this;_=_<0?0:_>=A.total?A.total-1:_;var B=A._ctrls?A._ctrls[_]:null,$=A._contents[_];if(-1===A._curIndex)A._curIndex=0;T.style.removeCss(A._ctrls,A._css);T.style.removeCss(A._contents,A._css);T.style.addCss(B,A._css);T.style.addCss($,A._css);A.onShow&&A.onShow(_,B,$);A._curIndex=_},showNext:function(){this.show(this.playMode(this._curIndex,this.total))},showPrevious:function(){this.show(this.rollbackMode(this._curIndex,this.total))},play:function(A){var _=this;if(!isNaN(A))_.interval=parseInt(A);if(!_._playTimer){if(!_._hasEvent){var $=_.pause.bind(_),B=_.play.bind(_);T.event.addEvent(_._ctrls,"mouseover",$);T.event.addEvent(_._ctrls,"mouseout",B);T.event.addEvent(_._contents,"mouseover",$);T.event.addEvent(_._contents,"mouseout",B);_._hasEvent=1}_._playTimer=setInterval(_.showNext.bind(_),_.interval)}},pause:function(){var _=this;if(_._playTimer){clearInterval(_._playTimer);delete _._playTimer;if(_.onStop){var $=_._curIndex;_.onStop($,_._ctrls[$],_._contents[$])}}}}})(window) \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/edu/2011/4/6/20110406220601277f0.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/edu/2011/4/6/20110406220601277f0.jpg deleted file mode 100755 index 5b5196e03..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/edu/2011/4/6/20110406220601277f0.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/edu/2011/4/9/20110409001451f646c.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/edu/2011/4/9/20110409001451f646c.jpg deleted file mode 100755 index 70ed0e1d4..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/edu/2011/4/9/20110409001451f646c.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/ent/2011/4/8/20110408183341f6142.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/ent/2011/4/8/20110408183341f6142.jpg deleted file mode 100755 index dea0d8151..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/ent/2011/4/8/20110408183341f6142.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/20110408091923ca1d8.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/20110408091923ca1d8.jpg deleted file mode 100755 index 96ffed42f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/20110408091923ca1d8.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/20110408100456977e5.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/20110408100456977e5.jpg deleted file mode 100755 index 4cc85bb49..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/20110408100456977e5.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/2011040810253254779.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/2011040810253254779.jpg deleted file mode 100755 index bca502e55..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/game/2011/4/8/2011040810253254779.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/house/2011/4/7/201104070846149dec5.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/house/2011/4/7/201104070846149dec5.jpg deleted file mode 100755 index 055085914..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/house/2011/4/7/201104070846149dec5.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/house/2011/4/8/20110408094024dfb90.gif b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/house/2011/4/8/20110408094024dfb90.gif deleted file mode 100755 index 99437cf5c..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/house/2011/4/8/20110408094024dfb90.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/lady/2011/4/7/20110407235235eb565.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/lady/2011/4/7/20110407235235eb565.jpg deleted file mode 100755 index f713b42e5..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/lady/2011/4/7/20110407235235eb565.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/lady/2011/4/8/20110408082553b8653.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/lady/2011/4/8/20110408082553b8653.jpg deleted file mode 100755 index 9c0c5c07f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/lady/2011/4/8/20110408082553b8653.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/2/24/20110224214610e49c1.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/2/24/20110224214610e49c1.jpg deleted file mode 100755 index 9bc68eb6d..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/2/24/20110224214610e49c1.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/1/20110401105148c65f3.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/1/20110401105148c65f3.jpg deleted file mode 100755 index 801b96f5a..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/1/20110401105148c65f3.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/6/20110406140048c8dea.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/6/20110406140048c8dea.jpg deleted file mode 100755 index d7f80b1b7..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/6/20110406140048c8dea.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/6/201104061402503e782.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/6/201104061402503e782.jpg deleted file mode 100755 index 8aec592cb..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/6/201104061402503e782.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/8/20110408175702d86a7.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/8/20110408175702d86a7.jpg deleted file mode 100755 index 96f759352..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/life/2011/4/8/20110408175702d86a7.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/mobile/2011/4/8/201104080904537def0.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/mobile/2011/4/8/201104080904537def0.jpg deleted file mode 100755 index b39226233..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/mobile/2011/4/8/201104080904537def0.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408164530e0dfd.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408164530e0dfd.jpg deleted file mode 100755 index 63bdc7ec5..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408164530e0dfd.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408224146ca253.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408224146ca253.jpg deleted file mode 100755 index 2490e0049..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408224146ca253.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408234759dabf8.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408234759dabf8.jpg deleted file mode 100755 index 1e5070f86..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/sports/2011/4/8/20110408234759dabf8.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/travel/2011/4/7/2011040719553034b7b.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/travel/2011/4/7/2011040719553034b7b.jpg deleted file mode 100755 index 96d79968b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/travel/2011/4/7/2011040719553034b7b.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/video/2011/4/8/20110408143144afad3.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/video/2011/4/8/20110408143144afad3.jpg deleted file mode 100755 index ca696080d..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/video/2011/4/8/20110408143144afad3.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/www/logo/logo_png.png b/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/www/logo/logo_png.png deleted file mode 100755 index ab64111bd..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img3.cache.netease.com/www/logo/logo_png.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/auto/2011/4/8/20110408091859b1da7.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/auto/2011/4/8/20110408091859b1da7.jpg deleted file mode 100755 index 859793089..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/auto/2011/4/8/20110408091859b1da7.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/auto/2011/4/8/201104080930543aaa8.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/auto/2011/4/8/201104080930543aaa8.jpg deleted file mode 100755 index 117db6400..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/auto/2011/4/8/201104080930543aaa8.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/book/2011/4/8/20110408102221db369.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/book/2011/4/8/20110408102221db369.jpg deleted file mode 100755 index 56d8aa80d..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/book/2011/4/8/20110408102221db369.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/digi/2011/4/8/20110408144717d8da9.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/digi/2011/4/8/20110408144717d8da9.jpg deleted file mode 100755 index 3fcd833e8..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/digi/2011/4/8/20110408144717d8da9.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/20110408074407aed87.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/20110408074407aed87.jpg deleted file mode 100755 index 70e4f432f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/20110408074407aed87.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/201104080804383b8a7.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/201104080804383b8a7.jpg deleted file mode 100755 index e69632d7e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/201104080804383b8a7.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/2011040809044637924.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/2011040809044637924.jpg deleted file mode 100755 index 48d1cbeec..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/ent/2011/4/8/2011040809044637924.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/5/2011040502293054a8f.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/5/2011040502293054a8f.jpg deleted file mode 100755 index 22ea2359b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/5/2011040502293054a8f.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/201104081007164a116.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/201104081007164a116.jpg deleted file mode 100755 index 1bc323fb7..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/201104081007164a116.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/201104081009084803f.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/201104081009084803f.jpg deleted file mode 100755 index 469cd947f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/201104081009084803f.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/2011040811265683661.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/2011040811265683661.jpg deleted file mode 100755 index 8ade4a76e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/game/2011/4/8/2011040811265683661.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/home/2011/4/7/20110407131936bb4ec.png b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/home/2011/4/7/20110407131936bb4ec.png deleted file mode 100755 index 67dc83f75..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/home/2011/4/7/20110407131936bb4ec.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/house/2011/4/8/201104080927161a54f.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/house/2011/4/8/201104080927161a54f.jpg deleted file mode 100755 index bad3e99ca..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/house/2011/4/8/201104080927161a54f.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/7/2011040711484089cba.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/7/2011040711484089cba.jpg deleted file mode 100755 index c9af6f553..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/7/2011040711484089cba.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/8/20110408014720d3fc0.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/8/20110408014720d3fc0.jpg deleted file mode 100755 index 095fa915f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/8/20110408014720d3fc0.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/8/20110408224817711dd.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/8/20110408224817711dd.jpg deleted file mode 100755 index 01aa86757..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/lady/2011/4/8/20110408224817711dd.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/life/2011/3/7/20110307134125752e1.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/life/2011/3/7/20110307134125752e1.jpg deleted file mode 100755 index c2fb3a188..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/life/2011/3/7/20110307134125752e1.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/mobile/2011/4/8/2011040809135520264.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/mobile/2011/4/8/2011040809135520264.jpg deleted file mode 100755 index 071c5b508..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/mobile/2011/4/8/2011040809135520264.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/photo/0008/2010-01-30/120x90_5U980MMS294H0008.JPG b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/photo/0008/2010-01-30/120x90_5U980MMS294H0008.JPG deleted file mode 100755 index c423c7d24..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/photo/0008/2010-01-30/120x90_5U980MMS294H0008.JPG and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/sports/2011/4/8/20110408211535eae49.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/sports/2011/4/8/20110408211535eae49.jpg deleted file mode 100755 index 49c8d3d8f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/sports/2011/4/8/20110408211535eae49.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/3/1/201103010846298829b.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/3/1/201103010846298829b.jpg deleted file mode 100755 index 3dd6b7429..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/3/1/201103010846298829b.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/201104080929109dd6d.png b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/201104080929109dd6d.png deleted file mode 100755 index be9ceb616..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/201104080929109dd6d.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/20110408121505602ea.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/20110408121505602ea.jpg deleted file mode 100755 index 6f965185f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/20110408121505602ea.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/20110408183832fdfa0.png b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/20110408183832fdfa0.png deleted file mode 100755 index 0594e7eaa..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/stock/2011/4/8/20110408183832fdfa0.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/7/20110407105038a01d2.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/7/20110407105038a01d2.jpg deleted file mode 100755 index d74033eff..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/7/20110407105038a01d2.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/7/2011040715531564880.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/7/2011040715531564880.jpg deleted file mode 100755 index 82ba96528..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/7/2011040715531564880.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/8/2011040809594909a0a.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/8/2011040809594909a0a.jpg deleted file mode 100755 index 777b26f58..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/img4.cache.netease.com/video/2011/4/8/2011040809594909a0a.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/40YCPhfL6uaLg3xA4ISWew==/4227754150194064440.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/40YCPhfL6uaLg3xA4ISWew==/4227754150194064440.jpg deleted file mode 100755 index cd8aab98e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/40YCPhfL6uaLg3xA4ISWew==/4227754150194064440.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/F4Oc-9fe_HYFRsSk0SRMmA==/4223532025543403580.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/F4Oc-9fe_HYFRsSk0SRMmA==/4223532025543403580.jpg deleted file mode 100755 index 670faae54..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/F4Oc-9fe_HYFRsSk0SRMmA==/4223532025543403580.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/VfPeCwJ6ufovjjY9ueyUxA==/4224939400426958880.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/VfPeCwJ6ufovjjY9ueyUxA==/4224939400426958880.jpg deleted file mode 100755 index e38c1a9cb..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/VfPeCwJ6ufovjjY9ueyUxA==/4224939400426958880.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/chRhUK9Mxz9gdCzkEUzn5w==/4226346775310512150.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/chRhUK9Mxz9gdCzkEUzn5w==/4226346775310512150.jpg deleted file mode 100755 index 7810ff872..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/chRhUK9Mxz9gdCzkEUzn5w==/4226346775310512150.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/nSvNUs-5vbkySqbYp-lnLw==/4226628250287222807.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/nSvNUs-5vbkySqbYp-lnLw==/4226628250287222807.jpg deleted file mode 100755 index f4688f176..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/imgrc.ph.126.net/nSvNUs-5vbkySqbYp-lnLw==/4226628250287222807.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/oimagea4.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2FPjU3g b/mobile/android/tests/browser/chrome/tp5/163.com/oimagea4.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2FPjU3g deleted file mode 100755 index f74d4c71b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/oimagea4.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2FPjU3g and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F2WEnFW b/mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F2WEnFW deleted file mode 100755 index 6f53696ad..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F2WEnFW and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F2x2iAO b/mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F2x2iAO deleted file mode 100755 index a9ab30ed2..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F2x2iAO and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F40hcYl b/mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F40hcYl deleted file mode 100755 index e4a9ce855..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/oimagea8.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F40hcYl and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/oimageb2.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F46NVMe b/mobile/android/tests/browser/chrome/tp5/163.com/oimageb2.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F46NVMe deleted file mode 100755 index f54b9dfbc..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/oimageb2.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F46NVMe and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/oimageb3.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2FTyjFq b/mobile/android/tests/browser/chrome/tp5/163.com/oimageb3.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2FTyjFq deleted file mode 100755 index 48677fe17..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/oimageb3.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2FTyjFq and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/oimagec1.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F3SWBUh b/mobile/android/tests/browser/chrome/tp5/163.com/oimagec1.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F3SWBUh deleted file mode 100755 index eedfe0d68..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/oimagec1.ydstatic.com/image@w=80&h=80&url=http%3A%2F%2F126.fm%2F3SWBUh and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/oimagec7.ydstatic.com/image@w=128&h=128&url=http%3A%2F%2F126.fm%2F3cAjJD b/mobile/android/tests/browser/chrome/tp5/163.com/oimagec7.ydstatic.com/image@w=128&h=128&url=http%3A%2F%2F126.fm%2F3cAjJD deleted file mode 100755 index 834f897ac..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/oimagec7.ydstatic.com/image@w=128&h=128&url=http%3A%2F%2F126.fm%2F3cAjJD and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/img/mail1.gif b/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/img/mail1.gif deleted file mode 100755 index 9d43acd77..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/img/mail1.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/img/mail2.gif b/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/img/mail2.gif deleted file mode 100755 index 8336f8bb9..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/img/mail2.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/ntes_mail_info_www_1222.js b/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/ntes_mail_info_www_1222.js deleted file mode 100755 index 6d0e40559..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/ntes_mail_info_www_1222.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * ͨʾʼ,ӵ163µҳ - */ -function NtesMailInfo(){ - // ʾͬ - // ʾʺ - this.showAccount = true; - // ʾʼ - this.showMsgCount = true; - // ʾ˳|¼ - this.showLoginout = true; - // ʾʺź׺ - this.showAccountSuffix = true; - // ʾʺij - this.maxAccountLength = 7; - - this.getCookie = function (sName){ - var sSearch = sName + "="; - if(document.cookie.length > 0) { - var sOffset = document.cookie.indexOf(sSearch); - if(sOffset != -1) { - sOffset += sSearch.length; - sEnd = document.cookie.indexOf(";", sOffset); - if(sEnd == -1) sEnd = document.cookie.length; - return unescape(document.cookie.substring(sOffset, sEnd)); - } - else return ""; - } - }; - // ʼ - this.init = function (){ - if(this.P_INFO){ // cookiepinfo,ȡʺ - var arr = this.P_INFO.split("|"); - this.username = arr[0]; - if(this.username.indexOf("@126.com") > -1){ - this.domain = "126.com"; - } - if(this.username.indexOf("@yeah.net") > -1){ - this.domain = "yeah.net"; - } - if(this.username.indexOf("@163.com") > -1){ - this.domain = "163.com"; - } - /*if(this.username.indexOf("@188.com") > -1){ - this.domain = "188.com"; - } - if(this.username.indexOf("@vip.163.com") > -1){ - this.domain = "vip.163.com"; - }*/ - if(arr[2] == 1){ - this.isLogin = true; - } - }else{// 򷵻 - return; - } - if(this.cm_newmsg){// ʼĿcookie,ʺźpinfoһ,hasnewΪtrue - var arr = this.cm_newmsg.split("&"); - if(arr[0]){ - var sUserName = arr[0].substr(5); - if(sUserName == this.username){ - this.hasnew = true; - if(arr[1]){ - this.newCount = arr[1].substr(4); - } - } - } - } - }; - // html - this.render = function (){ - if(this.domain == "") return; - if(this.hasnew){ - var sUserName = this.username; - if(sUserName.indexOf("@") > -1){ - sUserName = sUserName.split("@")[0]; - } - if(sUserName.length > this.maxAccountLength){ - sUserName = sUserName.substring(0, this.maxAccountLength) + ".."; - } - this.$("dvNewMsg").style.display = ""; // ʾ - - this.$("imgNewMsg").title = ""+ this.newCount +"δʼ"; - this.$("lnkNewMsg").innerHTML = this.newCount > 999 ? "999+" : this.newCount; // ʼĿ - if(this.newCount == 0){ // ʼΪ0ߴ0ʾͬͼ - this.$("imgNoNewMsg").style.display = ""; - this.$("imgNewMsg").style.display = "none"; - }else{ - this.$("imgNoNewMsg").style.display = "none"; - this.$("imgNewMsg").style.display = ""; - } - - this.$("lnkNewMsg").href = this.$("lnkMsgImg").href = this.getLoginUrl(); // ʼ - }else{ - if(this.domain != "163.com" && location.hostname.indexOf("163.com") > -1){ - location.href = this.getShowNewMsgUrl(); - }else{ - if(!window.gGetNewCount){ - window.gGetNewCount = true; - void(''); - this.$("ifrmNtesMailInfo").src = this.getNewCountUrl(); - } - } - } - }; - this.redirect = function (bType){ - if(this.redirected) return; - this.redirected = true; - if(bType == "iframe"){ - this.$("ifrmNtesMailInfo").src = this.getShowNewMsgUrl(); - }else{ - location.href = this.getShowNewMsgUrl(); - } - }; - this.$ = function (sId){ - return document.getElementById(sId); - }; - this.P_INFO = this.getCookie("P_INFO"); // ȡpinfocookie - this.cm_newmsg = this.getCookie("cm_newmsg"); // ȡʼĿcookie - this.isLogin = this.getCookie("S_INFO") ? true : false; // ǰǷ¼urs - this.username = ""; // ʺ - this.hasnew = false; // cookieǷʼĿ - this.domain = ""; // - this.newCount = 0; // ʼĿ - this.redirected = false; // Ƿredirect - this.isHomePage = location.hostname == "www.163.com" ? true : false; - // ,show:ʾĿҳ, crossdomain:תҳ, init:js163Ƶҳ - this.type = (location.href.indexOf("/mailinfo/shownewmsg_0225.htm") > -1 ? "show" : (location.href.indexOf("/mailinfo/crossdomain_0225.htm") > -1 ? "crossdomain" : "init")); - - this.getShowNewMsgUrl = function (){// ʾʼĿϢҳ - return "httpdisabled://p.mail."+ this.domain +"/mailinfo/shownewmsg_www_1222.htm"; - }; - - this.getNewCountUrl = function (){ // ȡʼӿurl - return "httpdisabled://msg.mail."+ this.domain +"/cgi/mc?funcid=getusrnewmsgcnt&fid=1&addSubFdrs=1&language=0&style=0&template=newmsgres_setcookie.htm&username=" + this.username; - }; - this.getLoginUrl = function (){ // ȡ¼url - var oEntryUrl = { - "163.com" : "httpdisabled://entry.mail.163.com/coremail/fcg/ntesdoor2?lightweight=1&verifycookie=1&language=-1&style=-1&from=newmsg_www", - "126.com" : "httpdisabled://entry.mail.126.com/cgi/ntesdoor?lightweight=1&verifycookie=1&language=-1&style=-1&from=newmsg_www", - "yeah.net" : "httpdisabled://entry.mail.yeah.net/cgi/ntesdoor?lightweight=1&verifycookie=1&language=-1&style=-1&from=newmsg_www" - }; - if(!this.isLogin){ - oEntryUrl = { - "163.com" : "httpdisabled://email.163.com/?from=newmsg#163", - "126.com" : "httpdisabled://email.163.com/?from=newmsg#126", - "yeah.net" : "httpdisabled://email.163.com/?from=newmsg#yeah" - } - } - return oEntryUrl[this.domain]; - }; - - // if(!this.isLogin) return; // ûе¼ֱӷ - this.init(); // ʼ - this.render();// html -} -var gNtesMailInfo = new NtesMailInfo(); \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/shownewmsg_www_1222.htm.html b/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/shownewmsg_www_1222.htm.html deleted file mode 100755 index 242b68253..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/p.mail.163.com/mailinfo/shownewmsg_www_1222.htm.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/pro.163.com/js.ng/site=netease&affiliate=homepage&cat=homepage&type=flash&location=1 b/mobile/android/tests/browser/chrome/tp5/163.com/pro.163.com/js.ng/site=netease&affiliate=homepage&cat=homepage&type=flash&location=1 deleted file mode 100755 index 5cd6aafc7..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/pro.163.com/js.ng/site=netease&affiliate=homepage&cat=homepage&type=flash&location=1 +++ /dev/null @@ -1 +0,0 @@ - void('\n \n'); void(''); void('\n \n'); \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/qn.163.com/images/qnyh20110411.jpg b/mobile/android/tests/browser/chrome/tp5/163.com/qn.163.com/images/qnyh20110411.jpg deleted file mode 100755 index 9fcba1373..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/163.com/qn.163.com/images/qnyh20110411.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/show.mediav.com/s@type=1&db=mediav&pub=118_2620_36413&cus=0_0_0_0_0&wh=360x100&btype=1&js=1.html b/mobile/android/tests/browser/chrome/tp5/163.com/show.mediav.com/s@type=1&db=mediav&pub=118_2620_36413&cus=0_0_0_0_0&wh=360x100&btype=1&js=1.html deleted file mode 100755 index efee43154..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/show.mediav.com/s@type=1&db=mediav&pub=118_2620_36413&cus=0_0_0_0_0&wh=360x100&btype=1&js=1.html +++ /dev/null @@ -1,8 +0,0 @@ -void(" - - - - -
-
- -
- rss VIP | һֵͨ Ϊҳ -
-
-
- -
-

- -
-
- ͼƬ - NBA CBA Ӣ - Ӱ -
-
- - ƾ Ʊ ҵ - Ƶ ȵ ʵ - Ů ʱ - -
-
- - Ƽ ۹ - ֻ 3G ֻ - ҵ ʼDZ - -
-
- - ѳ - ̽ Ʊ - Ҿ - -
-
- - ̳ Ӱ - - Ϸ ҳ - -
-
- - ΢ ȵ - - Ӧ ̳ ý - -
-
- -
-
- -
- -
-
- - еҳ » - -

-
-
- - - - - -
-
-
-
-
-
-
- -
-
-
- ѡ - X -
-
- - - -
-
-
-
-
-
-
-
-
- -
- -
-
- - -
-
-
-

- Ƽ -

-
-
-
-
- - VIP ҵ ͻ -
-
- Ϸ - λ ΢ · 3 ħ ս ·ɷ ˫ ٻŮĻ -
-
- - λ ͬԼ -
- -
-
-
- - ֤ͨ» -
-
-
-
-
- Ѷ - - Ƽ - Ʒ -
-
- -
-
-
-
-
-
-
-
- -
-
- -
-
-
-
-
-
-
-
- - -
-
- - -
-
-
-
- -
-
- - -
-
-
-
-

׹˾

-
- -
-
-
-
- - -
-
- - -
-
- - -
-
- - -
-
-
-
-
-
- Ѷ - - Ƽ - Ʒ -
-
- -
-
-
-
-
-
-
-
- -
-
-
- - -
-
-
- - -
-
- - -
-
-
- -
-
-
-

Ϸ

- λ 󻰢 · -
-
-
- ٻŮĻ꡷ -

ٻŮĻ꡷

-

ʱθ[ϸ]

-
- -

- ңͷ | С
- ̳ս | · -

-
-
-
-
- -
-
-
-
-
-
-
-
-
-
- -
- -
-
- - - -
- - -
-
- -
-
-
- -
-
-
-
-
-
-
- -
-
-
- - -
-
- - -
-
-
- -
-
-
- -
- - - -
- - - - - - - - - - - - - - - - - - - - - - - diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/www.163.com/mediav.gif b/mobile/android/tests/browser/chrome/tp5/163.com/www.163.com/mediav.gif deleted file mode 100755 index 0f6336351..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/www.163.com/mediav.gif +++ /dev/null @@ -1,8 +0,0 @@ - - - - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/163.com/zjs.ipinyou.com/2011032517331513260_2342_190180.js b/mobile/android/tests/browser/chrome/tp5/163.com/zjs.ipinyou.com/2011032517331513260_2342_190180.js deleted file mode 100755 index 7526f6978..000000000 --- a/mobile/android/tests/browser/chrome/tp5/163.com/zjs.ipinyou.com/2011032517331513260_2342_190180.js +++ /dev/null @@ -1 +0,0 @@ -window.onerror=function(){return true};var toprefer="m_ZJSTAT";var parentlocation="";var parentrefer="m_ZJSTAT";var selflocation=window.location;var selfrefer=document.referrer;var realrefer="";var reallocation="";var hourvisitnum=1;var realvisitnum=1;var nowdate=new Date();var clientcolor="";if (navigator.appName=="Netscape"){clientcolor=screen.pixelDepth;}else {clientcolor=screen.colorDepth;}hourvisitnum=document.cookie.match(new RegExp("(^| )m_ZJSTAT_PAGES=([^;]*)(;|$)"));hourvisitnum=(hourvisitnum==null)?1: (parseInt(unescape((hourvisitnum)[2]))+1);var currentdate =new Date();currentdate.setTime(currentdate.getTime()+60*60*1000);document.cookie="m_ZJSTAT_PAGES="+hourvisitnum+ ";path=/;expires="+currentdate.toGMTString();realvisitnum=document.cookie.match(new RegExp("(^| )m_ZJSTAT_TIMES=([^;]*)(;|$)"));if(realvisitnum==null){realvisitnum=1;}else{ realvisitnum=parseInt(unescape((realvisitnum)[2])); realvisitnum=(hourvisitnum==1)?(realvisitnum+1):(realvisitnum);}currentdate.setTime(currentdate.getTime()+365*24*60*60*1000);document.cookie="m_ZJSTAT_TIMES="+realvisitnum+";path=/;expires="+currentdate.toGMTString();realrefer=selfrefer;if(parentrefer!=="m_ZJSTAT"){realrefer=parentrefer;}if(toprefer!=="m_ZJSTAT"){realrefer=toprefer;} reallocation=parentlocation;try{lainframe}catch(e){reallocation=selflocation;}void(''); \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/README b/mobile/android/tests/browser/chrome/tp5/README deleted file mode 100644 index c733fb4c0..000000000 --- a/mobile/android/tests/browser/chrome/tp5/README +++ /dev/null @@ -1 +0,0 @@ -This directory contains pages and other resources downloaded from the web for the purpose of testing against pages from the real world. Pages are copied from the Talos tp5 data -- see https://wiki.mozilla.org/Buildbot/Talos/Tests#tp5. These files are not made available under an open source license. diff --git a/mobile/android/tests/browser/chrome/tp5/baidu.com/c.baidu.com/c.gif@t=0&q=mozilla&p=0&pn=1.html b/mobile/android/tests/browser/chrome/tp5/baidu.com/c.baidu.com/c.gif@t=0&q=mozilla&p=0&pn=1.html deleted file mode 100755 index e69de29bb..000000000 diff --git a/mobile/android/tests/browser/chrome/tp5/baidu.com/open.baidu.com/stat/image/Icon_Aladdin.gif b/mobile/android/tests/browser/chrome/tp5/baidu.com/open.baidu.com/stat/image/Icon_Aladdin.gif deleted file mode 100755 index 6e1d27f89..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/baidu.com/open.baidu.com/stat/image/Icon_Aladdin.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/aladdin/img/table/bg.gif b/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/aladdin/img/table/bg.gif deleted file mode 100755 index dd7f76048..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/aladdin/img/table/bg.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/arr.gif b/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/arr.gif deleted file mode 100755 index c466d496b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/arr.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/baidu_jgylogo1.gif b/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/baidu_jgylogo1.gif deleted file mode 100755 index e1d5d3714..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/baidu_jgylogo1.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/i2.png b/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/i2.png deleted file mode 100755 index 85b8e9683..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/img/i2.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/js/bdsug.js@v=1.0.3.0 b/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/js/bdsug.js@v=1.0.3.0 deleted file mode 100755 index dab5c2a40..000000000 --- a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/js/bdsug.js@v=1.0.3.0 +++ /dev/null @@ -1 +0,0 @@ -(function(){var M=navigator.userAgent.indexOf("MSIE")!=-1&&!window.opera;var V=(document.compatMode=="BackCompat");function I(C){return document.getElementById(C)}function K(C){return document.createElement(C)}function S(C){return String(C).replace(new RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)","g"),"")}function U(C){return String(C).replace(new RegExp("[\\s\\t\\xa0\\u3000]","g"),"")}function P(G,X,C){if(M){G.attachEvent("on"+X,(function(Y){return function(){C.call(Y)}})(G))}else{G.addEventListener(X,C,false)}}function N(C){if(M){C.returnValue=false}else{C.preventDefault()}}function R(X){if(M){var G=document.createStyleSheet();G.cssText=X}else{var C=document.createElement("style");C.type="text/css";C.appendChild(document.createTextNode(X));document.getElementsByTagName("HEAD")[0].appendChild(C)}}function H(G){var X=document.forms[0];for(var Y in G){if(G[Y]==undefined){if(I("bdsug_ipt_"+Y)){X.removeChild(I("bdsug_ipt_"+Y))}}else{if(!O(Y)){X.appendChild(C(Y,G[Y]))}else{O(Y).value=G[Y]}}}function C(Z,b){var a=K("INPUT");a.type="hidden";a.name=Z;a.id="bdsug_ipt_"+Z;a.value=b;return a}}function O(Y){var X=document.forms[0];var G=false;var C=X.getElementsByTagName("INPUT");for(var Z=0;Z";var u=s.length;var r=""+q.substring(u)+"";return(t+r)}function j(){l=K("TABLE");l.id="st";l.cellSpacing=0;l.cellPadding=2;var s=K("tbody");l.appendChild(s);for(var t=0,u=C.length;t0){Z=3}X=Z;break}}})})();bdsug.sug=function(C){bdsug.dm({type:"response_data",data:C})};bdsug.initSug=function(){bdsug.dm({type:"init"})};J.ini(bdsug);var E=(function(){function C(){if(navigator.cookieEnabled){document.cookie="su=0; domain=www.baidu.com"}}function G(){var X=(navigator.cookieEnabled&&/sug=(\d)/.test(document.cookie)?RegExp.$1:3);E.dm({type:"give_cookie",sug:X})}return J.ini({rm:function(X){switch(X.type){case"close":C();break;case"need_cookie":G();break}}})})();var D=(function(){var Z=I("kw");var C;var c=document.forms[0];var Y;function a(){if(C.offsetWidth!=0&&Z.offsetWidth!=C.offsetWidth){D.dm({type:"need_resize"})}}function d(){C=K("DIV");C.id="sd_"+new Date().getTime();C.style.display="none";c.appendChild(C);if(M){Y=K("IFRAME");Y.style.display="none";Y.style.position="absolute";C.parentNode.insertBefore(Y,C)}}function b(e){e=e||window.event;var f=e.target||e.srcElement;if(f==Z){return }while(f=f.parentNode){if(f==C){return }}D.dm({type:"mousedown_other"})}function X(){D.dm({type:"window_blur"})}function G(){var f="#"+C.id;var e=[];D.dm({type:"div_ready",sdiv:C,frm:Y});setInterval(a,100);P(document,"mousedown",b);P(window,"blur",X);e.push(f+"{border:1px solid #817F82;position:absolute;top:28px;left:0}");e.push(f+" table{width:100%;background:#fff;cursor:default}");e.push(f+" td{font:14px verdana;line-height:20px;text-indent:6px}");e.push(f+" td b{color:#333}");e.push(f+" .mo{background-color:#E2EAFF}");e.push(f+" .ml{background-color:#fff}");R(e.join(""))}bdsug.sug.initial=G;return J.ini({rm:function(e){switch(e.type){case"start":G();break;case"init":d();break}}})})();F.on("need_data",B);F.on("close_div",W);F.on("key_enter",W);F.on("key_up",W);F.on("key_down",W);F.on("hide_div",W);F.on("start",D);B.on("request_data",Q);B.on("give_data",W);bdsug.on("response_data",B);bdsug.on("init",D);W.on("clk_submit",F,T);W.on("ent_submit",F,T);W.on("submit",T);W.on("key_select",F);W.on("close",F,E);W.on("mousedown_tr",F);D.on("mousedown_other",W);D.on("need_resize",W);D.on("div_ready",F,W);D.on("window_blur",W);Q.on("need_cookie",E);E.on("give_cookie",Q);window.bdsug.initSug()})(); \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/s@wd=mozilla.html b/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/s@wd=mozilla.html deleted file mode 100755 index 1c0734368..000000000 --- a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/s@wd=mozilla.html +++ /dev/null @@ -1,123 +0,0 @@ - - - -ٶ_mozilla - - - - - -
-

 | ¼

-
- - -
-
- - - - - - - -
- - - -
-
-
- - - - - - - - - - - - - - - - - - - - - -

mozilla_ٶȰٿ

MozillaMozilla(дMFMoFoͼΪMozilla עʶ)Ϊֺ֧쵼ԴMozillaĿһӪ֯֯ƶ...19α༭
չʷ - - ͼԴ - ڳɾ
baike.baidu.com/view/393243.htm 2010-12-26

-

ı磬йΨһٷվ | Mozilla, Firefox, and ...

[10-13] Mozilla³жδƽ̨ [09-26] ƿԴȳ [09-08] ȸַW3Helpվ ٽW3C...
www.mozilla.org/products/firefox/ 2010-12-18 - ٶȿ

-
mozilla_Ϣ123_ٶ
СԴ
Mozilla Firefox 4.0 11.85 M ԰
Mozilla Thunderbird 2.0.0.23 İ 6.34 M վ
Mozilla Firefox 4 ʽ 11.85 M ̫ƽ
Mozilla Firefox Plus(FoxPlus) V3.0.2.1 ... 9.96 M վ
Mozilla SeaMonkey v2.0.13 for Windows 10.15 M Ƿվ
soft.baidu.com/softwaresearch/s?tn=software&r... 2011-4-9

ı磬йΨһٷվ | Mozilla, Firefox, and ...

[10-13] Mozilla³жδƽ̨ [09-26] ... [01-22] Firefox3.6ʽƵԣ [01-06] ...
www.mozilla.com/firefox/ 2010-12-26 - ٶȿ

-

ı йΨһٷվ | Mozilla, Firefox, and C...

ı繫˾Ϊûı粻Ǵͳϵ˾ڹɡŻƷȫΪȫµ...
www.mozilla.com/ 2011-4-6 - ٶȿ

-

ı йΨһٷվ | Mozilla, Firefox, and C...

ı繫˾Ϊûı粻Ǵͳϵ˾ڹɡŻƷȫΪȫµ...
www.mozilla.org.cn/ 2011-4-7 - ٶȿ

-

ı йΨһٷվ | Mozilla, Firefox, and C...

Mozilla Firefox screenshot Firefox firefox 4.0 Windows >>ϵͳ/԰汾 >>Ѷ >>...
www.mozilla.org/firefox/ 2011-3-24 - ٶȿ

-

ҡлʹfirefoxԸ

addons.mozilla.org/ 2011-4-6 - ٶȿ

- -
mozilla

mozilla·ͼع!5/6է Ѷ 13Сʱǰ
Mozilla˾ǰһųFirefoxϵƷĿģ͡Ѿй¶ĻƷ·ͼ,ڻ4֮Ļ5Ԥƽ201...

mozilla:firefox 5621յ 汾6818 cnBeta 21Сʱǰ
!mozillaǽල Ѷ 


Mozilla Firefox 4.0 Beta 12 - ԰ - 繤...

Mozilla Firefox 4.0 Beta 12 [صַ] 𣺹/ҳ ȨѰ лWinxp/vista/win7/2000/2003 ʱ䣺2011-2-26...
www.newhua.com/soft/1349.htm 2011-2-26 - ٶȿ

- - - - - - - - - - - -
- -

1 [2] [3] [4] [5] [6] [7] [8] [9] [10] һҳ ҵؽԼ11,900,000

- - - - - - - - - - - - - - -
- - - - - - - - - \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/user/js/u.js b/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/user/js/u.js deleted file mode 100755 index 8c9ae6086..000000000 --- a/mobile/android/tests/browser/chrome/tp5/baidu.com/www.baidu.com/user/js/u.js +++ /dev/null @@ -1 +0,0 @@ -function user_c(F){var G=encodeURIComponent(window.document.location.href),E="",D="",A="",B="",C=window["BD_PS_C"+(new Date()).getTime()]=new Image();for(v in F){switch(v){case"title":A=encodeURIComponent(F[v].replace(/<[^<>]+>/g,""));break;case"url":A=encodeURIComponent(F[v]);break;default:A=F[v]}E+=v+"="+A+"&"}B="&mu="+G;C.src="httpdisabled://nsclick.baidu.com/v.gif?pid=201&pj=psuser&"+E+"path="+G+"&wd="+D+"&t="+new Date().getTime();return true}var const_callback_list="login_success";var bdu=(function(){var I="passport.baidu.com";var D=navigator.userAgent.indexOf("MSIE")!=-1&&!window.opera;if(!window[const_callback_list]){window[const_callback_list]=[]}function O(C){return document.getElementById(C)}function A(Q,C,P){var G=document.createElement(Q);if(C){G.id=C}if(P){G.className=P}return G}function H(P,G,C,Q){if(D){P.attachEvent("on"+G,C)}else{P.addEventListener(G,C,!Q)}}function M(P,G,C){if(D){P.detachEvent("on"+G,C)}else{P.removeEventListener(G,C,true)}}function N(C){C=C||window.event;C.stopPropagation?C.stopPropagation():(C.cancelBubble=true)}function B(P,Q,C){if(C!=undefined){P.style[Q]=C}else{if(P.style[Q]){return P.style[Q]}else{if(P.currentStyle){return P.currentStyle[Q]}else{if(document.defaultView&&document.defaultView.getComputedStyle){Q=Q.replace(/([A-Z])/g,"-\u00241").toLowerCase();var G=document.defaultView.getComputedStyle(P,"");return G&&G.getPropertyValue(Q)||""}}}}}function F(G){if(D){var P=document.createStyleSheet();P.cssText=G}else{var C=document.createElement("style");C.type="text/css";C.appendChild(document.createTextNode(G));document.getElementsByTagName("HEAD")[0].appendChild(C)}}(function(){try{var G=[".bd_dialog{border:2px solid #a8b9eb;background:#dae4ff;color:#333;overflow:hidden}",".bd_dialog_handle{width:100%;height:30px;overflow:hidden;background:url(/user/img/bg1.gif) repeat-x;cursor:move;-moz-user-select:none}",".bd_dialog_title{line-height:24px;font-size:14px;font-weight:bold;float:left;overflow:hidden;margin:3px 10px}",".bd_dialog_close{width:19px;height:19px;float:right;background:url(/user/img/close.gif);overflow:hidden;margin:6px;cursor:pointer}",".bd_dialog_main{width:auto;height:auto;margin:5px;border:1px solid #c3cff2;overflow:hidden;background:#FFF}",".bd_tab{margin:20px 20px 10px 20px}",".bd_tab_btns{overflow:hidden;height:28px;padding-left:10px;background:url(/user/img/p.gif) repeat-x bottom;text-align:center}",".bd_tab_conts{margin-top:15px}",".bd_tab_btn{overflow:hidden;float:left;cursor:pointer;font-size:14px;font-weight:bold;width:76px;margin-left:6px;line-height:28px;background:url(/user/img/bb.gif);color:#00c;text-decoration:underline}",".bd_tab_btn_s{overflow:hidden;float:left;cursor:pointer;font-size:14px;font-weight:bold;width:76px;margin-left:6px;line-height:28px;background:url(/user/img/bs.gif)}",".bd_tab_cont{display:none;height:auto}",".bd_tab_cont_s{display:block}","#login_div{font-size:14px}","#login_div u{text-decoration:none;font-size:13px;color:#f00;display:inline-block;height:auto}","#login_msg_div{overflow:hidden;height:18px}","#login_cap{margin-left:20px}","#login_msg_div{margin-left:20px}","#login_tb_div{margin-left:20px}","#login_tb td{padding:4px 4px 4px 0;vertical-align:middle;font-size:14px;line-height:normal}","#login_tb td.lb{width:60px}","#login_tb input.lt{padding:1px;line-height:18px;height:24px;*height:18px;width:170px}","#login_tb input.v{padding:1px;line-height:18px;height:24px;*height:18px}","#login_tb label{font-size:13px}","#login_tb .c9{font-size:13px;color:#999}","#login_check{line-height:130%}","#login_v_tr{display:none}","#login_v_img{border:1px solid #000}","#login_tb a.la{font-size:13px;*margin-bottom:4px;color:#03c;display:inline-block;line-height:30px;vertical-align:middle}","#login_submit{width:78px;height:28px;font-size:14px}","#login_line{background:#d9e1f7;overflow:hidden;height:1px;width:auto;margin:20px 0}","#login_sug{width:100%;line-height:40px;font-weight:bold;text-align:center}","#login_u_msg{width:40px}","#login_p_msg{width:40px}"];F(G.join(""))}catch(C){}})();function L(){var R=O("u");var G=O("lb");var C=[{text:"",url:"httpdisabled://www.baidu.com/gaoji/preferences.html",tab:"setting"},{text:"ҵӦ",url:"httpdisabled://app.baidu.com/store/mine",tab:"myapp"}];var Q=0;if(R&&G){H(G,"click",function(){switch(Q){case 0:break;case 1:bdlogin.box.show();break}})}function P(){Q=1;T()}function S(U,V){R.innerHTML=""+U+" |  | ˳";setTimeout(function(){T()},10)}function T(){var X=O("u_m");if(X){var Y=A("div","u_m_tip");var W=[];for(var V=0,U=C.length;V"+Z.text+"")}Y.innerHTML=W.join("");document.body.appendChild(Y);H(Y,"click",N,true);H(X,"click",function(a){Y.style.display="block";N(a)},true);H(document,"click",function(){Y.style.display="none"},true)}}return{login:S,notifyReady:P}}function E(P){var U=A("div");var V=[];var R=[];var C=0;function W(){Q()}function Q(){var d=P.cssPrefix;var f=P.tabs;var a=P.selectIndex;C=a;U.innerHTML="";U.className=d;V=[];R=[];var e=A("div");e.className=d+"_btns";var Y=A("div");Y.className=d+"_conts";for(var Z=0,b=f.length;Zb?b:d}return d>=AB?d:AB}function Y(d){var AB=Math.max(z.scrollHeight,x.scrollHeight);var b=Math.max(z.scrollWidth,x.scrollWidth);if(x&&x.clientWidth){AB=Math.max(x.clientHeight,AB);b=Math.max(x.clientWidth,b)}else{AB=Math.max(z.clientHeight,AB);b=Math.max(z.clientWidth,b)}return{h:AB,w:b}}function k(){var b,d;if(x&&x.clientWidth){b=x.clientWidth;d=x.clientHeight}else{b=z.clientWidth;d=z.clientHeight}return{w:b,h:d,t:Math.max(z.scrollTop,x.scrollTop),l:Math.max(z.scrollLeft,x.scrollLeft)}}function m(b){if(V.dlg){V.dlg.caption(b)}}function h(b){P=b}s();return{resize:X,setCloseCallback:h,caption:m,ready:S,show:g,close:q,domNode:V}}function J(Q){var AG="httpdisabledsdisabled://"+I+"/";var n=Q.prefix||"login";var AI=Q.callbackName||"baiduLoginReply";var a=Q.jump||"";var Y=Q.showVerifyCode;var k=Q.hideVerifyCode;var R=Q.success;var g=null;var d=false;var X=false;var AB=A("div",n+"_div");var p,j,w,h,b,AD,q,AH,T,r,m,U,z,y,o;var G={0:"¼ɹ",1:"ûʽ",2:"û",3:"",4:"¼",5:"յ¼ࡣ",6:"֤벻ƥ",7:"¼ʱδ֪µ¼",8:"¼ʱδ֪µ¼",16:"Բ޷¼",20:"ʺѵ¼ࡣ",256:"",257:"֤","default":"¼ʱδ֪µ¼"};function P(){AB.innerHTML=Z()}function Z(){var AJ="
"+Q.caption+"
û
ܡ룺
֤룺

ڹõѡ
"+Q.footer+"
";return AJ}function x(){P()}function f(){p=O(n+"_msg");j=O(n+"_u_msg");w=O(n+"_p_msg");h=O(n+"_u");AD=O(n+"_p");q=O(n+"_v");T=O(n+"_v_img");AH=O(n+"_v_tr");loginValiRe=O(n+"_v_re");b=O(n+"_mem");r=O(n+"_getpass");m=O(n+"_submit");U=O(n+"_fm");z=O(n+"_token");y=O(n+"_tpl");o=O(n+"_time");H(U,"submit",(function(){return function(AJ){if(!AC()){AE(AJ);return false}else{m.disabled=true;return true}}})());H(loginValiRe,"click",function(AJ){s();AE(AJ);return false});H(h,"blur",function(){var AJ=A("script");AJ.src=AG+"?logcheck&username="+encodeURIComponent(h.value)+"&callback=bdlogin.login.ucheck&tpl=mn&t="+(new Date()).getTime();document.body.appendChild(AJ);return true})}function u(AJ){if(!X){switch(AJ){case"0":W(false);d=false;break;case"1":W(true);d=true;break}}}function AF(){var AK=(new Date()).getTime();var AJ=O("bd_login_script");if(AJ){document.body.removeChild(AJ)}var AL=A("script","bd_login_script");if(h){AL.src=AG+"?apilogin&callback=bdlogin.login.ready&tpl=mn&username="+h.value+"&tt="+AK}else{AL.src=AG+"?apilogin&callback=bdlogin.login.ready&tpl=mn&tt="+AK}document.body.appendChild(AL)}function V(AJ){f();if("0"==AJ.error_no){r.href=AJ.more_ext.ext1_url;r.innerHTML=AJ.more_ext.ext1_name;l(AJ.param_in,AJ.param_out);window[AI]=e}}function AE(AJ){if(AJ&&AJ.preventDefault){AJ.preventDefault()}else{window.event.returnValue=false}}function AC(){if(""==C(h.value)){S(null,"û",null,null,true);return false}if(""==C(AD.value)){S(null,null,"",null,true);return false}if(d&&""==C(q.value)){S("֤",null,null,null,true);return false}return true}function l(AJ,AK){h.name=AJ.param1_name;h.value=AJ.param1_value;AD.name=AJ.param2_name;AD.value=AJ.param2_value;b.name=AJ.param5_name;q.name=AJ.param4_name;q.value="";s();if("1"==AJ.param4_value){W(true);d=true;X=true}else{W(false);d=false;X=false}z.name=AK.param1_name;z.value=AK.param1_contex;y.name=AK.param2_name;y.value=AK.param2_contex;o.name=AK.param3_name;o.value=AK.param3_contex;if(""==h.value){h.focus()}else{AD.focus()}}function s(){var AJ="httpdisabledsdisabled://"+I+"/?verifypic&t="+(new Date()).getTime();T.src=AJ}function W(AJ){if(D){AH.style.display=AJ?"block":"none"}else{AH.style.display=AJ?"table-row":"none"}if(AJ&&Y){Y.call(window)}if(!AJ&&k){k.call(window)}}function e(AK,AL){m.disabled=false;switch(AK){case"0":var AJ=decodeURIComponent(AL.un);c(1,AJ);break;case"1":S(null,G[AK]);break;case"2":S(null,G[AK]);break;case"4":S(null,null,G[AK]);break;case"5":S(G[AK]);break;case"6":S(G[AK]);break;case"7":S(G[AK]);break;case"8":S(G[AK]);break;case"16":S(G[AK]);break;case"20":S(G[AK]);break;case"257":S(G[AK]);break;default:S()}}function c(AK,AJ){if(R){R.call(window,AK,AJ)}if(g){g.call(window,AK,AJ);g=null}}function S(AM,AN,AK,AL,AJ){if(AN||AK){B(h,"width","128px");B(AD,"width","128px");B(j,"width","100px");B(w,"width","100px")}else{B(h,"width","170px");B(AD,"width","170px");B(j,"width","40px");B(w,"width","40px")}p.innerHTML=AM?AM:"";j.innerHTML=AN?AN:"";w.innerHTML=AK?AK:"";if(AN){h.focus()}if(AK){AD.focus()}if(d&&AL){q.focus()}if(!AJ){AF()}}function AA(){return d||X}function t(AJ){g=AJ}function C(AJ){AJ=AJ.replace(/(\u3000+)|(\u3000+)/g,"");AJ=AJ.replace(/( +)|( +)/g,"");return AJ}x();return{domNode:AB,verify:AA,loaddisabled:AF,ready:V,ucheck:u,setCallback:t,success:c}}return{Bar:L,Tab:E,Dialog:K,Login:J}})();var bdlogin=[];bdlogin.bar=bdu.Bar();var lParams={prefix:"login",callbackName:"bdLoginReply",jump:"httpdisabled://www.baidu.com/user/j.html",caption:"ٶעûֱӵ¼",footer:"ûаٶʺţעٶʺ",success:function(E,B){if(E==1){user_c({fm:"set",tab:"loginOK",url:"httpdisabled://passport.baidu.com/login"})}else{if(E==2){user_c({fm:"set",tab:"regOK",url:"httpdisabled://passport.baidu.com/reg"})}}bdlogin.box.close(true);for(var C=0,A=window[const_callback_list].length;C"}}],selectIndex:0,cssPrefix:"bd_tab"};bdlogin.tab=bdu.Tab(tabParams);var dParams={domNode:bdlogin.tab.domNode,width:395,height:400,mask:true,shadow:true,drag:true,ready:function(){bdlogin.bar.notifyReady()},loaddisabled:function(){bdlogin.tab.show(0);bdlogin.login.loaddisabled()}};bdlogin.box=bdu.Dialog(dParams);bdlogin.login.setCallback(function(){});bdlogin.box.ready();window._invoke_login=function(B){if(B){try{bdlogin.login.setCallback(B);bdlogin.box.setCloseCallback(B)}catch(A){return false}}bdlogin.box.show();return true}; \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/b.scorecardresearch.com/b2@c1=2&c2=6035051&c3=&c4=www.bbc.co.uk%2Fnews%2F&c5=&c6=&c15=&cv=1.3&cj=1.html b/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/b.scorecardresearch.com/b2@c1=2&c2=6035051&c3=&c4=www.bbc.co.uk%2Fnews%2F&c5=&c6=&c15=&cv=1.3&cj=1.html deleted file mode 100755 index e69de29bb..000000000 diff --git a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/bbc.112.2o7.net/b/ss/bbcwglobalprod/1/H.21--NS/0@AQB=1&pccr=true&AQE=1 b/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/bbc.112.2o7.net/b/ss/bbcwglobalprod/1/H.21--NS/0@AQB=1&pccr=true&AQE=1 deleted file mode 100755 index f4a2493a1..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/bbc.112.2o7.net/b/ss/bbcwglobalprod/1/H.21--NS/0@AQB=1&pccr=true&AQE=1 and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/edge.quantserve.com/quant.js b/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/edge.quantserve.com/quant.js deleted file mode 100755 index 2e74eb3e1..000000000 --- a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/edge.quantserve.com/quant.js +++ /dev/null @@ -1,28 +0,0 @@ -if(!__qc){var __qc={qcdst:function(){if(__qc.qctzoff(0)!=__qc.qctzoff(6))return 1;return 0;},qctzoff:function(m){var d1=new Date(2000,m,1,0,0,0,0);var t=d1.toGMTString();var d3=new Date(t.substring(0,t.lastIndexOf(" ")-1));return d1-d3;},qceuc:function(s){if(typeof(encodeURIComponent)=='function'){return encodeURIComponent(s);} -else{return escape(s);}},qcrnd:function(){return Math.round(Math.random()*2147483647);},qcgc:function(n){var v='';var c=document.cookie;if(!c)return v;var i=c.indexOf(n+"=");var len=i+n.length+1;if(i>-1){var end=c.indexOf(";",len);if(end<0)end=c.length;v=c.substring(len,end);} -return v;},qcdomain:function(){var d=document.domain;if(d.substring(0,4)=="www.")d=d.substring(4,d.length);var a=d.split(".");var len=a.length;if(len<3)return d;var e=a[len-1];if(e.length<3)return d;d=a[len-2]+"."+a[len-1];return d;},qhash2:function(h,s){for(var i=0;i0){s+=";fpan=0;fpa="+a;} -else{var da=new Date();a='P0-'+__qc.qcrnd()+'-'+da.getTime();u.cookie="__qca="+a+"; expires=Sun, 18 Jan 2038 00:00:00 GMT; path=/; domain="+d;a=__qc.qcgc("__qca");if(a.length>0){s+=";fpan=1;fpa="+a;} -else{s+=";fpan=u;fpa=";}} -return s;},qcdc:function(n){document.cookie=n+"=; expires=Thu, 01 Jan 1970 00:00:01 GMT; path=/; domain="+__qc.qcdomain();},qpxloaddisabled:function(img){if(img&&typeof(img.width)=="number"&&img.width==3){__qc.qcdc("__qca");}},qcp:function(p,myqo){var s='',a=null;var media='webpage',event='loaddisabled';if(myqo!=null){for(var k in myqo){if(typeof(k)!='string'){continue;} -if(typeof(myqo[k])!='string'){continue;} -if(k=='qacct'){a=myqo[k];continue;} -s+=';'+k+p+'='+__qc.qceuc(myqo[k]);if(k=='media'){media=myqo[k];} -if(k=='event'){event=myqo[k];}}} -if(typeof a!="string"){if((typeof _qacct=="undefined")||(_qacct.length==0))return'';a=_qacct;} -if(media=='webpage'&&event=='loaddisabled'){for(var i=0;i<__qc.qpixelsent.length;i++){if(__qc.qpixelsent[i]==a)return'';} -__qc.qpixelsent.push(a);} -if(media=='ad'){__qc.qad=1;} -s=';a'+p+'='+a+s;return s;},qcesc:function(s){return s.replace(/\./g,'%2E').replace(/,/g,'%2C');},qcd:function(o){return(typeof(o)!="undefined"&&o!=null);},qcogl:function(){var m=document.getElementsByTagName('meta');var o='';for(var i=0;i=1000)return o;if(__qc.qcd(m[i])&&__qc.qcd(m[i].attributes)&&__qc.qcd(m[i].attributes.property)&&__qc.qcd(m[i].attributes.property.value)&&__qc.qcd(m[i].content)){var p=m[i].attributes.property.value;var c=m[i].content;if(p.length>3&&p.substring(0,3)=='og:'){if(o.length>0)o+=',';var l=(c.length>80)?80:c.length;o+=__qc.qcesc(p.substring(3,p.length))+'.'+__qc.qcesc(c.substring(0,l));}}} -return __qc.qceuc(o);},firepixel:function(qoptions){var e=(typeof(encodeURIComponent)=='function')?"n":"s";var r=__qc.qcrnd();var sr='',qo='',qm='',url='',ref='',je='u',ns='1';var qocount=0;__qc.qad=0;if(typeof __qc.qpixelsent=="undefined"){__qc.qpixelsent=new Array();} -if(typeof qoptions!="undefined"&&qoptions!=null){__qc.qopts=qoptions;for(var k in __qc.qopts){if(typeof(__qc.qopts[k])=='string'){qo=__qc.qcp("",__qc.qopts);break;}else if(typeof(__qc.qopts[k])=='object'&&__qc.qopts[k]!=null){++qocount;qo+=__qc.qcp("."+qocount,__qc.qopts[k]);}}}else if(typeof _qacct=="string"){qo=__qc.qcp("",null);} -if(qo.length==0)return;var ce=(navigator.cookieEnabled)?"1":"0";if(typeof navigator.javaEnabled!='undefined')je=(navigator.javaEnabled())?"1":"0";if(typeof _qmeta!="undefined"&&_qmeta!=null){qm=';m='+__qc.qceuc(_qmeta);_qmeta=null;} -if(self.screen){sr=screen.width+"x"+screen.height+"x"+screen.colorDepth;} -var d=new Date();var dst=__qc.qcdst();var qs='http';if(window.location.protocol=='https:'){qs+='s';} -qs="../../pixel.quantserve.com";var fp=__qc.qcsc();if(window.location&&window.location.href)url=__qc.qceuc(window.location.href);if(window.document&&window.document.referrer)ref=__qc.qceuc(window.document.referrer);if(self==top)ns='0';var ogl=__qc.qcogl();var img=new Image();img.alt="";img.src=qs+'/pixel/r.html';img.onloaddisabled=function(){__qc.qpxloaddisabled(img);}},quantserve:function(){if(typeof _qevents=='undefined'){_qevents=[];} -if(typeof _qoptions!="undefined"&&_qoptions!=null){__qc.firepixel(_qoptions);_qoptions=null;}else if(!_qevents.length&&typeof _qacct!="undefined"){__qc.firepixel(null);} -if(!__qc.evts){for(var k in _qevents){__qc.firepixel(_qevents[k]);} -_qevents={push:function(){var a=arguments;for(var i=0;i<"+"/script>");}else{var Ta=document.createElement("script");Ta.language="JavaScript";Ta.type="text/javascript";Ta.src=Sa;if(document.body==null){document.getElementsByTagName("head")[0].appendChild(Ta);}else{document.body.insertBefore(Ta,document.body.firstChild);}Ra=Ta;}}this._rsioa=1;}this.rsi_r();return Ra;};this._rsiya=function(){var Ua="";this.DM_addEncToLoc("_rsiL",this._rsiva);Ua="DM_LOC="+_rsixa(this._rsita);if(this._rsipa){Ua+="&DM_CAT="+_rsixa(this._rsipa);}if(this._rsisa){Ua+="&DM_EVT="+_rsixa(this._rsisa);}if(this._rsira){Ua+="&DM_KYW="+_rsixa(this._rsira);}if(this._rsica==1&&this._rsiua){Ua+="&DM_REF="+_rsixa(this._rsiua);}if(this._rsida==1){Ua+="&DM_TIT="+_rsixa(document.title);}if(this._rsiqa){Ua+="&DM_NAM="+_rsixa(this._rsiqa);}Ua+="&DM_EOM=1";var Va="httpdisabled"+(location.protocol=="httpdisabledsdisabled:"?"s":"")+"://";var Wa="/"+this._rsiaa+"/"+this._rsija+this._rsika+"/0/"+this._rsila+"/"+this._rsiga+"/";var Xa=Math.floor(Math.random()*1000000000)+"."+this._rsiia;var Ya=Va+this._rsiha+Wa+Xa+"?D="+_rsixa(Ua)+"&C="+_rsixa(csids);var Za=Ya.length;if(Za>=2000){if(Ya.charAt(1998)=='%'){Ya=Ya.substr(0,1998);}else if(Ya.charAt(1999)=='%'){Ya=Ya.substr(0,1999);}else{Ya=Ya.substr(0,2000);}if(Ya.charAt(Ya.length-3)=='%'&&Ya.charAt(Ya.length-2)=='2'&&Ya.charAt(Ya.length-1)=='5'){Ya=Ya.substr(0,Ya.length-3);}}return Ya;};this.rsi_r=function(){var $a;var ab;var bb=0;var cb=0;if(this._rsiba==1){var db=window;while(true){try{$a=db.document.location;ab=db.document.referrer;bb=cb;}catch(notAllowed){}if(db==window.top||db==db.parent){break;}db=db.parent;cb++;}}else{$a=window.document.location;ab=window.document.referrer;}this._rsiva=cb-bb;this._rsiua=this._rsima?_rsiza(ab.toString()):ab.toString();if(this._rsiva==0){this._rsita=(this._rsima)?_rsiza($a.href):$a.href;}else{this._rsita=this._rsiua;}this._rsipa=null;this._rsiqa=null;this._rsira=null;this._rsisa=null;};this.rsi_r();}var _rsixa;if(typeof(encodeURIComponent)=="function"){_rsixa=encodeURIComponent;}else{var _rsiAa=new RegExp("[\x00-\x20]|[\x22-\x26]|[\x2B-\x2C]|\x2F|[\x3A-\x40]|[\x5B-\x5E]|\x60|[\x7B-\x7D]|[\x7F-\uFFFF]","g");_rsixa=function(v){return v.toString().replace(_rsiAa,_rsiBa);}}function _rsiwa(u,n,v){return u+(u.indexOf("?")==-1?"?":"&")+n+"="+v;}function _rsiza(u){var i=u.indexOf('#');return(i>=0)?u.substr(0,i):u;}function _rsiCa(i){var eb=i.toString(16).toUpperCase();return eb.length<2?"0"+eb:eb;}function _rsiBa(c){var i=c.charCodeAt(0);if(isNaN(i))return "";if(i<128)return "%"+_rsiCa(i);if(i<2048)return "%"+_rsiCa(0xC0+(i>>6))+"%"+_rsiCa(0x80+(i&0x3F));if(i<65536)return "%"+_rsiCa(0xE0+(i>>12))+"%"+_rsiCa(0x80+(i>>6&0x3F))+"%"+_rsiCa(0x80+(i&0x3F));return "%"+_rsiCa(0xF0+(i>>18))+"%"+_rsiCa(0x80+(i>>12&0x3F))+"%"+_rsiCa(0x80+(i>>6&0x3F))+"%"+_rsiCa(0x80+(i&0x3F));}window[rsi_csid]=new rsiClient(rsi_csid); -function DM_cat(aa){window[rsi_csid].DM_cat(aa);}function DM_name(ba){window[rsi_csid].DM_name(ba);}function DM_keywords(kw){window[rsi_csid].DM_keywords(kw);}function DM_event(ca){window[rsi_csid].DM_event(ca);}function DM_addToLoc(n,v){window[rsi_csid].DM_addToLoc(n,v);}function DM_addEncToLoc(n,v){window[rsi_csid].DM_addEncToLoc(n,v);}function DM_setLoc(u){window[rsi_csid].DM_setLoc(u);}function DM_tag(){window[rsi_csid].DM_tag();} diff --git a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbc.co.uk/js/app/av/emp/1_1_3_0_0_426652_426614_1/config.sjson@edition=us&site=news§ion=%2FFrontpage b/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbc.co.uk/js/app/av/emp/1_1_3_0_0_426652_426614_1/config.sjson@edition=us&site=news§ion=%2FFrontpage deleted file mode 100755 index 2794be925..000000000 --- a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbc.co.uk/js/app/av/emp/1_1_3_0_0_426652_426614_1/config.sjson@edition=us&site=news§ion=%2FFrontpage +++ /dev/null @@ -1,195 +0,0 @@ -/** - * namespace Holds at least 1 config JSON object - */ -bbc.fmtj.page.empConfig = {}; - -/** - * The base configuration applied to all - * EMPs embedded on Journalism sites. - * - */ -bbc.fmtj.page.empConfig.base = { - - /** - * Related to the EMP such as size, - * location etc. - * - */ - player : { - /** the height of the transport controls in the EMP */ - toolbarPadding: 0, - uxHighlightColour: '0xff0000', - - /** - * The footer that appears when the EMP voided in a - * popout window. - */ - popoutFooterHeight : { - /** height of the audio footer */ - audio: 32, - /** height of the video footer */ - video: 77 - }, - - /* Used to feed the embeddedMedia.Player required version */ - requiredVersion: "9.0.115" - - }, - - /** Supported audio player sizes. The size keys must match those output by CPS */ - audio : { - /** the 'small' size */ - small : { width: 226, height: 115 }, - /** the larger size */ - full : { width: 512, height: 115 } - }, - - /** - * Supported video player sizes - * TODO: Are these used - */ - video : { - /* should be named sizes? */ - /* these may not be used...*/ - standard : { width: 448, height: 252 }, - popout : { width: 512, height: 323 } - }, - - /** - * Message text for users that do not have the - * correct version of Flash to embed the EMP - */ - noFlashMessage : { - heading : "Cannot play media.", - bodyText : "You do not have the correct version of the flash player. ", - linkText : "Downloaddisabled the correct version", - linkUrl : "httpdisabled://www.adobe.com/shockwave/downloaddisabled/downloaddisabled.cgi?P1_Prod_Version=ShockwaveFlash" - }, - - /** - * The templates to be used with the noFlashMessage. - */ - noFlashTemplate : { - audio: '

{heading}{bodyText} {linkText}

', - video: '

{heading}{bodyText} {linkText}

' - }, - - /** - * The URL of the config XML file for configuring the EMP - * see http://newsimg.bbc.co.uk/player/emp/1_1_3_0_0_426652_426614_1/ - */ - configUrl: "httpdisabled://news.bbc.co.uk/player/emp/1_1_3_0_0_426652_426614_1/config/default.xml", - - /** - The settings to be converted into keys such as config_settings_KEY = VALUE - and passed to emp.set(key, value) - - example settings: { - language: "default" - } - - => - - emp.set( "config_settings_language", "default" ); - - see http://newsimg.bbc.co.uk/player/emp/1_1_3_0_0_426652_426614_1/docs/guides/configurationSettings.html - */ - settings: { - /** Language to use for EMP interface */ - language: "default", - skin:"silver" - }, - - /** - Same behaviour as settings object above but used to configure - any EMP plugins: - - examples plugins: { - fmtjLiveStats: { - pageType: "eav7" - } - } - - => - - emp.set( "config_plugins_fmtjLivestats_pageType", eav7" ) - - see http://newsimg.bbc.co.uk/player/emp/1_1_3_0_0_426652_426614_1/docs/guides/plugins.html - - TODO what do we do about livestats tracking for developer usage?? - */ - plugins: { - /** Livestats plugin parameters are supplied by CPS */ - fmtjLiveStats: {} - }, - - // TODO: Add quova geoip logic here to stop appearing when inside the uk - - /** - * Options for configuring adverts - * when EMP is viewed internationally. - */ - ads: { - /** - * Configuration for companion ad format - */ - companion: { - /** Dimensions of the companion */ - size: "300x60", - - /** Type of companion */ - type: "adi", - - /** - * Prefix for the id of the companion banner if automatically created - * by this embed code (for example if embedded by a developer) - */ - idPrefix: "bbccom_companion_", - - /** - * Template for the companion banner dom id - */ - template: '
Advertisement
' - - /** - * name suppress {boolean} - * When true and a developer is embedding then no companion will - * be created. Make sure that you also stop the EMP showing a - * pre-roll advert by calling: - * emp.set( "config_settings_suppressItemKind", "advert" ); - */ - } - } -}; - - - - /* - * Begin panorama config - */ - - - /* - * Begin welsh config - */ - - - /* - * Begin F1 config - */ - - - /* - * Begin weather config - */ - - - /* - * Register EMP - */ - bbc.fmtj.queue.register({namespace:"bbc.fmtj.av.emp",method:"loaddisabled",scripts: {foot: [ "/js/app/av/emp/1_1_3_0_0_426652_426614_1/emp.js" ]}}); - -/* -* DemocracyLive and Childrens do not have a site_to_serve variable -* So there is currently no way to configure them. -*/ diff --git a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/css/screen/shared/19_58/3pt_ads.css b/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/css/screen/shared/19_58/3pt_ads.css deleted file mode 100755 index e5de0645a..000000000 --- a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/css/screen/shared/19_58/3pt_ads.css +++ /dev/null @@ -1 +0,0 @@ -body#travel .bbccom_wallpaper #blq-container-inner{overflow:visible;}#bbccom_slot_wallpaper_left{height:600px;left:-310px;position:absolute;top:-40px;width:300px;}#bbccom_slot_wallpaper_right{height:600px;position:absolute;right:-310px;top:-40px;width:300px;}#blq-pre-mast{z-index:9999;}.bbccom_display_none{display:none!important;}.bbccom_visibility_hidden{height:60px;visibility:hidden;}.bbccom_text,.bbccom_text a,.bbccom_text a:hover,.bbccom_text a:active,.bbccom_text a:visited,.lhs .bbccom_text a:link,.lhs .bbccom_text a:visited,.lhs .bbccom_text a:active,.lhs .bbccom_text a:hover,.lhs #bbccom_button .bbccom_text a,.lhs #bbccom_button .bbccom_text a:hover,#bbccom_sponsor_section_text,.bbccom_sponsor_text,.photo_gallery #bbccom_sponsor_section_text,#blq-main .bbccom_companion_text,#blq-main .bbccom_companion_text a,#bbccom_mpu a,#bbccom_mpu_high a,#bbccom_leaderboard a,#galothercontentbox .bbccom_text a:link,#navigation .bbccom_text a:link,#secondary-content .bbccom_text a:link,#secondary-content .bbccom_text a:visited,#secondary-content .bbccom_text a:active,#secondary-content .bbccom_text a:hover,#secondary-content .bbccom_text a:focus,#travel #bbccom_sponsor_section_text,#bbccom_sponsor_section_news,#blq-main .bbccom_adsense h3 a{color:#505050;font:bold 10px/23px helvetica,arial,sans-serif!important;letter-spacing:0!important;text-transform:uppercase;background-color:transparent;}#travel .bbccom_adsense h4 a,#travel .bbccom_adsense h4 p a{color:#000;font:bold 13px/13px arial,helvetica,sans-serif!important;text-transform:none;}#travel #blq-main .bbccom_adsense p{color:#505050;}#travel #blq-main .bbccom_adsense p a{color:#78b200;text-transform:none;}#bbccom_sponsor_section_text,#bbccom_module_special-reports .bbccom_text,#bbccom_leaderboard_container .bbccom_text a,#bbccom_module_programme-breakout .bbccom_text,#bbccom_module_hyper-promotional-content .bbccom_text,.news #header-wrapper #bbccom_sponsor_section .bbccom_text{color:#fff;text-decoration:none;}.bbccom_text{text-align:right;}.bbccom_text,#bbccom_module_range-most-popular_text{text-align:right;}.bbccom_sponsor .bbccom_text{padding-right:3px;display:inline;}.adimg{border-style:none;}.news .bbccom-advert{margin-top:-1px;}.bbccom_slot_mpu .more-galleries li.last-child{display:none;}.news .partner_buttons_2cols{padding:10px 23px 0;width:288px;}.news #bbccom_partner_button1{width:334px;}.news .bbccom_adsense,.blogs .bbccom_adsense{background-color:#fff;border:1px solid #999;}.news #blq-main .bbccom_adsense h3 a,.news #blq-main .bbccom_adsense p,.blogs #blq-main .bbccom_adsense h3 a,.blogs #blq-main .bbccom_adsense p{color:#505050;}.news #blq-main .bbccom_adsense a,.blogs #blq-main .bbccom_adsense a{color:#174f82;}#travel #bbccom_leaderboard,#travel #bbccom_mpu,#travel #bbccom_button,#travel #bbccom_promo_feature_1{background-color:#e8e8e8;}#travel .gallery #bbccom_leaderboard,#travel .gallery #bbccom_mpu,#travel .gallery #bbccom_button,#travel .gallery #bbccom_promo_feature_1{background-color:#212121;}#travel .gallery .bbccom_text a{color:#878787;}#travel #bbccom_leaderboard{line-height:1;padding:0 8px 8px;}#travel #bbccom_mpu{margin-bottom:20px;padding:0 8px;text-align:center;}.bbccom_slot_mpu336 #promo-content #bbccom_mpu{padding:0;}#travel.bbccom_slot_mpu336 #bbccom_mpu{width:336px;}.bbccom_slot_xxl .feature #promo-content div{margin:0 auto;}#travel #bbccom_button{line-height:1;padding:0 8px 8px;}#travel #bbccom_button a{display:inline-block;line-height:1;}#travel #bbccom_sponsor_section{bottom:22px;top:auto;right:0;}#travel #promo-content .bbccom_text{padding-right:8px;}#travel .promo_feature{line-height:1;margin-bottom:24px;width:336px;}#travel #blq-main .bbccom_adsense{background-color:#e8e8e8;}#travel #blq-main .bbccom_adsense h3{border-bottom:1px solid #ABABAB;margin:0 8px;padding:0;text-align:right;}#travel #bbccom_adsense_mpu{margin-top:0;}#bbccom_leaderboard{width:728px;padding:0 2px;margin:0 auto;}#bbccom_leaderboard_container{background-color:#484848;}#bbccom_leaderboard_container #bbccom_leaderboard{padding-bottom:8px;}.bbccom_slot_leaderboard970 #bbccom_leaderboard,.bbccom_slot_leaderboard97066 #bbccom_leaderboard,.bbccom_slot_leaderboard97090 #bbccom_leaderboard{height:auto;padding:0 3px;width:auto;}.bbccom_slot_leaderboard970 #blq-main #bbccom_leaderboard,.bbccom_slot_leaderboard97066 #blq-main #bbccom_leaderboard,.bbccom_slot_leaderboard97090 #blq-main #bbccom_leaderboard{padding:0 3px;}#bbccom_button .bbccom_text{text-align:right;}#bbccom_button{border:0 none;float:left;padding:0 0 8px 20px;width:120px;}.lhs #bbccom_button a:link,.lhs #bbccom_button a:visited,.lhs #bbccom_button a:active{padding:0;}#blq-main .companion_v4{height:60px;padding-top:10px;width:auto;}#blq-main .bbccom_companion{height:84px;margin:auto;overflow:hidden;width:300px;}#blq-main .bbccom_companion div{float:right;height:auto;padding:0;}#blq-main .companion_v4 div.bbccom_companion_text{width:auto;}#story-body .companion_v4{padding-bottom:10px;}.videoInStoryA .bbccom_visibility_show,.videoInStoryB .bbccom_visibility_show{height:auto;margin-top:8px;}#blq-main .companion_parent{background-color:#D5D5D5;height:auto;margin-top:-3px;padding-bottom:10px;text-align:center;}#blq-main .companion_parent .bbccom_companion_text{display:block;float:none;height:auto;margin:0 auto;padding:0;text-align:right;width:300px;}#blq-main .companion_parent .bbccom_companion_text a{background-image:none;float:none;padding:0;}#blq-main .companion_parent div{height:60px;}#blq-main .companion_parent div.bbccom_companion_text{height:24px;}#bbccom_sponsor_section{background:none;height:31px;position:absolute;right:85px;text-align:right;top:27px;width:auto;}.sportbanner #bbccom_sponsor_section{padding:0 28px 0 0;right:-11px;top:-2px;}.sportbanner #bbccom_sponsor_section_text{float:left;margin-top:15px;}.wodban #bbccom_sponsor_section{padding:0 13px 0 0;right:0;top:-3px;}#bbccom_sponsor_section div{background:none;display:inline-block;float:none;margin:0;padding:0;}#bbccom_sponsor_section_text{width:130px;}#bbccom_sponsor_section_image,#bbccom_sponsor_section_image a{width:96px;}#bbccom_sponsor_section_image{padding-left:10px;}.banner #bbccom_sponsor_section div{height:auto;}.news #header-wrapper #bbccom_sponsor_section{left:auto;right:0;top:15px;width:205px;}.news #header-wrapper #bbccom_sponsor_section .bbccom_text{float:left;line-height:38px!important;}.bbccom_sponsor{height:31px;}#bbccom_sponsor_section_news{float:left;margin:0 0 0 10px;}#bbccom_sponsor_section_news p{float:left;margin:20px 5px 0 0;}#bbccom_sponsor_section_news img{display:block;}.news .photo-gallery #bbccom_sponsor_section{left:auto;right:0;top:42px;}.news .photo-gallery #bbccom_sponsor_section .bbccom_text{float:left;padding-top:3px;}.news .photo-gallery #bbccom_sponsor_section a{margin-left:3px;}#socialBookMarks iframe{border:none;}#bbccom_module_page-bookmark-links{height:31px;position:absolute;right:0;text-align:right;top:-10px;width:230px;}.story-related{margin:0 0 24px!important;}#bbccom_module_hyper-promotional-content{background:#D1700E;border-top:1px solid #fff;padding:8px;text-align:right;margin-top:0;}.bbccom_slot_module_special-reports .special-reports .top-report{padding-bottom:4em;}.bbccom_slot_module_special-reports .more-special-reports{display:none;}#bbccom_module_special-reports{text-align:right;min-height:1px;padding:8px 8px 5px 0;position:absolute;bottom:0;right:0;width:100%;z-index:1;}#bbccom_storyprintsponsorship{overflow:auto;border:1px solid #eee;float:right;margin:9px 0 29px 0;width:251px;padding:4px 0;}#bbccom_storyprintsponsorship p{float:left;font-size:.8em;padding:6px 0 6px 6px;text-transform:uppercase;margin-right:10px;}#bbccom_storyprintsponsorship div{height:31px;}#bbccom_storyprintsponsorship a{background-image:none;margin:0;padding:0;}#bbccom_storyprintsponsorship .bbccom_text{display:none;}#bbccom_module_most-popular,#bbccom_module_programme-breakout,#bbccom_module_range-most-popular,#bbccom_module_most-popular-category{clear:both;height:31px;overflow:hidden;padding-top:8px;position:relative;text-align:right;}.bbccom_slot_xxl #bbccom_module_programme-breakout{float:right;padding-bottom:8px;width:336px;}.bbccom_slot_xxl li.no-image #bbccom_module_programme-breakout{right:auto;bottom:auto;position:relative;width:auto;}#bbccom_module_market-data-include{background:#ededed;border-top:1px solid #fff;margin:-16px 0 16px 0;padding:8px 8px 8px 0;text-align:right;}#main-content .story-actions{float:left;width:468px;}#bbccom_mpu,#bbccom_mpu_high{border:0;margin:0 auto;width:300px;}.news #bbccom_mpu{margin:-8px auto 13px;}.news .media-asset #bbccom_mpu{margin-top:0;}.news #bbccom_mpu_high{margin:-6px auto 13px;}.news #bbccom_mpu img,.news #bbccom_mpu_high img{margin-bottom:-6px;}.wgreylinebottom #bbccom_mpu{margin:-14px auto 11px;}td #bbccom_mpu{margin-bottom:16px;}.blq_hp #bbccom_mpu{margin:0;}#galothercontentbox #bbccom_mpu{margin-top:-12px;}.bbccom_slot_xxl #bbccom_mpu,.bbccom_slot_xxl #bbccom_mpu_high{width:468px;margin-left:15px;}.bbccom_slot_mpu336 #bbccom_mpu,.bbccom_slot_mpu336 #bbccom_mpu_high{width:auto;}.bbccom_slot_mpu_skyscraper #bbccom_mpu,.bbccom_slot_mpu_skyscraper #bbccom_mpu_high{height:644px;width:160px;}.mpu_v4{margin:0 0 20px 3px;}#bbccom_adsense_mpu,#secondary-content #bbccom_adsense_mpu{margin-top:10px;}#secondary-content #bbccom_mpu,#secondary-content #bbccom_mpu div,#secondary-content #bbccom_mpu_high,#secondary-content #bbccom_mpu_high div,#secondary-content #bbccom_adsense_mpu,#secondary-content #bbccom_adsense_mpu div{border-bottom:none;}#secondary-content #bbccom_mpu,#secondary-content #bbccom_mpu div,#secondary-content #bbccom_mpu_high,#secondary-content #bbccom_mpu_high div{border-bottom:none;padding-bottom:0;width:300px;}#bbccom_skyscraper{position:absolute;border:0;width:160px;height:600px;text-align:center;}.skyscraper_v4{top:156px;left:1000px;}.skyscraper_v3_5{top:104px;left:815px;}.skyscraper_v3{top:256px;left:770px;}#bbccom_bottom{height:71px;width:470px;}.bottom_v3,.bottom_v3_5{margin:0 0 0 215px;padding:8px 0;}#bbccom_adsense_mpu,#bbccom_adsense_middle{display:inline-block;font-family:arial,sans-serif;}.bbccom_adsense{background-color:#EDF3F3;}#bbccom_adsense_mpu{margin-bottom:10px;}#bbccom_adsense_middle{margin-bottom:20px;width:466px;}#main-content #bbccom_adsense_middle{margin-bottom:20px;margin-top:22px;}.bbccom_adsense h3,.bbccom_adsense h4{font-size:14px;}#blq-main .bbccom_adsense h3{padding:6px;}#blq-main .bbccom_adsense li{background-image:none;padding:6px;}#blq-main .bbccom_adsense h3 a{background-image:none;padding:0;color:#555;font-weight:bold;}#blq-main .bbccom_adsense a{border-bottom:none;color:#006;}#blq-main .bbccom_adsense p{color:#000;font-size:13px;margin:0;padding:0;}#blq-main .bbccom_adsense p a{font-weight:normal;}#blq-main .adsense_mpu_weather_top{margin-top:0;}.adsense_mpu_weather{background-color:#fff;width:296px;}.layout-block-a .bbccom_adsense{width:462px;}.layout-block-a #bbccom_adsense_mpu{margin-top:0;}#secondary-content .adsense_mpu li{background-image:none;}#bbccom_partner_button1{border:1px solid #EAEAEA;float:left;margin:8px 0 16px 0;padding-top:10px;position:relative;}#bbccom_partner_button1 a{display:inline-block;height:30px;margin-left:31px;padding-bottom:10px;width:120px;}#bbccom_partner_button1 .partner_buttons_4cols a{margin-left:27px;}#bbccom_partner_button1 .bbccom_text{position:absolute;right:0;top:-26px;}.bbccom_slot_xxl #bbccom_partner_button1{width:494px;}.sportbanner{position:relative;}#bbccom_bottom_adlabel{color:#bbb;}#bbccom_leaderboard table,#bbccom_leaderboard tr,#bbccom_leaderboard td,#bbccom_leaderboard th{margin:0;padding:0;}.bbccom_slot_sponsor_section div.cg-2010-section{background:url("../../../../sol/shared/img/v4/commonwealth_games_2010/cg_bbccom_banner_sprite2.png") no-repeat scroll 160px 0 transparent;}.cg-2010-section .sportbanner #bbccom_sponsor_section{padding:0 16px 0 0;right:0;}.cg-2010-section #bbccom_sponsor_section_text{color:#000;float:left;margin-top:15px;}.bbccom_slot_sponsor_section a#rss-alternative{margin-right:340px;}.bbccom_slot_sponsor_section #fixturesLink{background-image:none;float:left;line-height:1.3em;margin-left:10px;}.bbccom_slot_sponsor_section .world-cup-2010-section .athleticsbg{margin-top:65px;}.world-cup-2010-section #bbccom_mpu{margin-bottom:20px;}.bbccom_slot_sponsor_section .world-cup-2010-section .contentwrapper,.bbccom_slot_sponsor_section .world-cup-2010-section .contentwrapperwide{padding:32px 0 0 0;}.world-cup-2010-section #bbccom_sponsor_section{color:#505050;left:auto;line-height:55px;right:14px;top:118px;width:230px;}.world-cup-2010-section #bbccom_sponsor_section div{float:left;line-height:53px;}.world-cup-2010-section #bbccom_sponsor_section a{left:0;position:relative;top:0;width:100px;}.bbccom_slot_mpu div.f1-winter-olympics-2010 #bbccom_mpu{padding-bottom:29px;}div.f1-winter-olympics-2010 #bbccom_sponsor_section{left:531px;top:21px;width:260px;}div.f1-winter-olympics-2010 #bbccom_sponsor_section div{float:left;}div.f1-winter-olympics-2010 #bbccom_sponsor_section_text{padding-top:6px;}div.f1-winter-olympics-2010 #bbccom_sponsor_section_image{position:relative;width:100px;}div.f1-winter-olympics-2010 .sportbanner div #bbccom_sponsor_section_image a{left:0;top:0;width:100px;}.embedvideo .latestinfo p{margin-top:388px;}.i #bbccom_leaderboard_adlabel{color:#fff;}#ad,#ad .container{background:transparent;}div.contentBlock a.headerSponsor{display:block;font-size:.667em;font-weight:normal;height:30px;padding:5px 5px 5px 40px;background-color:#EFEDED;}div.contentBlock a.headerSponsor img{float:left;}div.contentBlock a.headerSponsor span{float:left;line-height:26px;margin-right:5px;}.moduleAdvertContent{height:31px;padding:6px 10px;cursor:default;}.moduleAdvertContent a,.moduleAdvertContent a img{float:left;}div.bbccom_module_adlabel{color:#666;float:left;font-size:.8em;margin:6px 10px 0 0;width:180px;}#bbccom_halfbanner{border-top:1px solid #DBDBDB;text-align:center;}div.bbccom_halfbanner_adlabel{color:#666;font-size:.8em;margin:6px 10px 0 0;text-align:center;width:300px;}.bbccom_halfbanner_image{padding:5px 0 10px 0;}#international .colB{min-height:250px;height:auto;padding-top:0;}.blq-js #international.bbccom_slot_mpu .colB{height:auto;padding-top:7px;}.blq-js #international.bbcdotcomAdvertsResetMpu .colB{padding-top:0;height:250px;}.blq-js .bbccom_slot_mpu .colE{margin-top:0!important;}.blq-js #international.bbcdotcomAdvertsResetMpu .colE{margin-top:-250px;}.advert{margin-left:2px;}.news .advert{margin:0 0 -2px 2px;}.front-page .advert{margin:0 0 3px 2px;}.bbcdotcomAdvertsResetMpu #bbccom_mpu{display:none;}.skylightTheme #bbccom_leaderboard_container{background-color:#1778B3;}.doveTheme #bbccom_leaderboard_container{background-color:#5B688F;}.tealTheme #bbccom_leaderboard_container{background-color:#2383A3;}.aquaTheme #bbccom_leaderboard_container{background-color:#158979;}.greenTheme #bbccom_leaderboard_container{background-color:#5D891B;}.violetTheme #bbccom_leaderboard_container{background-color:#6A5789;}.purpleTheme #bbccom_leaderboard_container{background-color:#823892;}.pinkTheme #bbccom_leaderboard_container{background-color:#9D1767;}.oliveTheme #bbccom_leaderboard_container{background-color:#7C7854;}.suedeTheme #bbccom_leaderboard_container{background-color:#695C4A;}.redTheme #bbccom_leaderboard_container{background-color:#9E2C1D;}.orangeTheme #bbccom_leaderboard_container{background-color:#C55F16;}.blackTheme #bbccom_leaderboard_container{background-color:#3F3F3F;}.module h2 a.headerSponsor{position:absolute;right:30px;top:0;width:auto;}.module h2 a.headerSponsor{display:block;font-size:.667em;font-weight:normal;height:30px;margin:5px 0 0;}.module h2 a.headerSponsor span{float:left;line-height:26px;margin-right:5px;}.module h2 a.headerSponsor img{float:left;}.blogs #bbccom_mpu,.blogs #bbccom_partner_button1,.blogs #bbccom_adsense_mpu{float:left;}.blogs #bbccom_partner_button1{margin:14px 0;}.blogs #bbccom_mpu{margin-bottom:14px;}#bbccom_leaderboard_adlabel.bbccom_text a,.blogs #content #bbccom_mpu_adlabel a{color:#666;}.blogs .adsense_mpu{font-size:1em;}.blogs #content .adsensetitle a:link{color:#555;}.blogs #content .adsenselabel a:link{font-size:1.1em;}.blogs #content .adsenselabel a:link,.blogs #content .adsenseurl a:link{color:#006;}.blogs #content .adsensead span{line-height:1.4em;}.blogs #bbccom_sponsor_section{width:auto;top:20px;}.blogs #bbccom_sponsor_section_text{width:auto;font-size:.8em;line-height:31px;}.blogs #bbccom_sponsor_section_image{width:auto;}.blogs #bbccom_sponsor_section_text,.blogs #bbccom_sponsor_section_image{float:left;margin-left:10px;}#blq-weather-header #bbccom_sponsor_section{top:-2px;right:14px;display:block;}#blq-weather-header #bbccom_sponsor_section div{display:block;}#blq-weather-header #bbccom_sponsor_section_text{text-align:right;}#blq-weather-header #bbccom_sponsor_section_image{width:auto;}.bbccom_slot_interstitial #blq-acc,.bbccom_slot_interstitial #blq-mast{display:none!important;}.bbccom_slot_interstitial{overflow:hidden;}.bbccom_slot_interstitial_300x600 #bbccom_int{width:300px;}#bbccom_int_container{width:100%;text-align:center;height:5000px;left:0;position:absolute;top:-40px;z-index:10000;}#bbccom_int_outer{top:0;z-index:9999;background:url('../../../../../www.bbc.co.uk/bbc.com/images/interstitial/header.gif') #ddd no-repeat;height:100%!important;height:4000px;}#bbccom_int_inner{width:976px;}#bbccom_int_head{text-align:right;padding:70px 10px 0 0;}#bbccom_int_link{font-family:arial,sans-serif;color:black;font-size:.8em;font-weight:bold;text-decoration:none;cursor:pointer;background:url('../../../../../www.bbc.co.uk/bbc.com/images/interstitial/arrow.gif') transparent right center no-repeat;padding-right:14px;}#bbccom_int{margin:0 auto;padding-top:20px;width:640px;}#travel #bbccom_int_outer{background:url('../../../../../www.bbc.co.uk/bbc.com/images/interstitial/header_travel.gif') #ddd no-repeat;}.blq_hp .pulse-pop{top:103px;}.bbccom_slot_leaderboard .pulse-pop{top:232px;}.bbccom_slot_leaderboard97066 .pulse-pop{top:200px;}.bbccom_slot_leaderboard97090 .pulse-pop{top:224px;}.news #blq-pre-mast .pulse-pop{left:700px;top:300px;}.centerbody #blq-pre-mast .pulse-pop{left:700px;top:300px;}.blq-js #international .colB{padding-top:0;height:280px;}.blq-js #international .colE{margin-top:-280px;}#blq-main .front-page .bbccom_companion{display:none;} \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/img/1_0_1/cream/hi/news/news-blocks.gif b/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/img/1_0_1/cream/hi/news/news-blocks.gif deleted file mode 100755 index 33d693a4a..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/img/1_0_1/cream/hi/news/news-blocks.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/app/bbccom/19_52/s_code.js b/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/app/bbccom/19_52/s_code.js deleted file mode 100755 index ea521da8d..000000000 --- a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/app/bbccom/19_52/s_code.js +++ /dev/null @@ -1,1091 +0,0 @@ -/* SiteCatalyst code version: H.22.1. -Copyright 1996-2010 Adobe, Inc. All Rights Reserved -More info available at http://www.omniture.com */ - -/* -Version: 1.7.3 - */ -//var s_account = "bbcwglobaldev" -var s_account = "bbcwglobalprod" -var s=s_gi(s_account) -/************************** CONFIG SECTION **************************/ -/* You may add or alter any code config here. */ -s.charSet="ISO-8859-1" -/* Conversion Config */ -s.currencyCode="USD" -/* Link Tracking Config */ -s.trackDownloaddisabledLinks=true -s.trackExternalLinks=true -s.trackInlineStats=true -s.linkDownloaddisabledFileTypes="exe,zip,wav,mp3,mov,mpg,avi,wmv,doc,pdf,xls" -s.linkInternalFilters="javascript:,bbc.com,bbc.co.uk" -s.linkLeaveQueryString=false -s.linkTrackVars="None" -s.linkTrackEvents="None" - -/* Time Parting Config */ -s.dstStart = "3/28/2010"; -s.dstEnd = "10/31/2010"; -s.currentYear = Set_Year(); - -/* Channel Manager Configuration */ -s._extraSearchEngines="" -s._channelDomain = "Facebook|facebook.com>Twitter|twitter.com>YouTube|youtube.com>LinkedIn|linkedin.com>MySpace|myspace.com>Other Social Media|digg.com,flickr.com,stumbleupon.com,del.icio.us,reddit.com,metacafe.com,technorati.com" -s._channelParameter = "" -s._channelPattern = "" - -/* Hierarchy Section Rules */ -var thisURL = document.URL; -var h1 = ""; -var h2 = ""; -var h3 = ""; -var h4 = ""; -var br = "
"; -var url = ""; -var hArray; -var hLength; -var newUrl = ""; -var contentIdMatch; -//string sequence starting with a - or _, followed by 7 - 8 digits, followed by a non digit or EOL -var reStandardContentId = new RegExp("([0-9]{7,8})([^0-9]|$)"); -var reNewsContentId = new RegExp("(-)([0-9]{7,8})([^0-9]|$)"); - -s.usePlugins = true -function s_doPlugins(s) { - /* Add calls to plugins here */ - - /* Custom Page Views event */ - s.events = s.apl(s.events, "event2", ",", 1); - - - /* Hierarchy Section Rules */ - - evaluateUrl(thisURL); - - s.channel = s.prop6; - - /* Meta tag capture */ - if (document.getElementsByName) { - - //Page Name variable - s.pageName = document.title.replace(/ - /g, ' | ').toLowerCase(); - s.eVar2 = s.pageName; - - s.hier1 = document.title.replace(/ - /g, '|'); - if ("undefined" != typeof BBC) { - s.hier2 = BBC.adverts.getSectionPath(); - } else { - sectionPath = window.location.pathname.replace('2/hi', 'news'); // Flip news - sectionPath = sectionPath.replace('sport2/hi', 'sport'); // Flip sport - sectionPath = sectionPath.replace(/\/+[0-9]*.([a-z])*$/g, ''); // Remove / from the end of the link - s.hier2 = sectionPath.substring(1); - } - - - //Site Section for channel now set above -// var metaArray = document.getElementsByName('CPS_SITE_NAME'); -// for (var i = 0; i < metaArray.length; i++) { -// s.channel = metaArray[i].content; -// } - - - //prop3 - var metaArray = document.getElementsByName('Headline'); - for (var i = 0; i < metaArray.length; i++) { - s.prop3 = metaArray[i].content; - s.eVar3 = s.prop3; - } - - //prop4 - var metaArray = document.getElementsByName('CPS_ID'); - for (var i = 0; i < metaArray.length; i++) { - s.prop4 = metaArray[i].content; - s.eVar4 = s.prop4; - } - - //prop5 - var metaArray = document.getElementsByName('contentFlavor'); - for (var i = 0; i < metaArray.length; i++) { - s.prop5 = metaArray[i].content.toUpperCase(); - s.eVar5 = s.prop5; - } - - - //prop10 - var metaArray = document.getElementsByName('OriginalPublicationDate'); - for (var i = 0; i < metaArray.length; i++) { - s.prop10 = metaArray[i].content; - s.eVar10 = s.prop10; - } - - //prop14 - //var metaArray = document.getElementsByName('CPS_AUDIENCE'); - //for (var i = 0; i < metaArray.length; i++) { - // s.prop14 = metaArray[i].content; - // s.eVar14 = s.prop14; - //} - - //prop15 - var metaArray = document.getElementsByName('IFS_URL'); - for (var i = 0; i < metaArray.length; i++) { - s.prop15 = metaArray[i].content; - s.eVar15 = s.prop15; - } - } - - if ("undefined" != typeof bbc && - "undefined" != typeof bbc.fmtj && - "undefined" != typeof bbc.fmtj.page ) { - s.prop32 = bbc.fmtj.page.adKeyword; - s.eVar32 = s.prop32; - } - - if ("undefined" != typeof bbcdotcom && - "undefined" != typeof bbcdotcom.stats ) { - - if ('yes' == bbcdotcom.stats.adEnabled) { - s.prop57 = "yes"; - s.eVar57 = s.prop57; - } else { - s.prop57 = "no"; - s.eVar57 = s.prop57; - } - // TODO: Remove the if statement and set prop14 once a fix for - // https://jira.dev.bbc.co.uk/browse/BBCCOM-490 is live. - if('homepage' != h1) { - s.prop14 = bbcdotcom.stats.audience; - s.eVar14 = s.prop14; - } - s.prop31 = bbcdotcom.stats.contentType; - s.eVar31 = s.prop31; - } - - //s.prop31 = "standard - html" - //s.eVar31 = "standard - html" - //s.prop31 = "Normal Web" - - /* Visitor Information */ - //Visitor Number - s.prop12 = s.getVisitNum(); - - //Days Since Last Visit - s.prop13 = s.getDaysSinceLastVisit(); - s.eVar13 = s.prop13; - - //Page Refresh Variable - s.prop17 = s.trackRefresh(s.pageName, 'tr_pr1'); - - //Track New and Repeat Visitors - s.prop18 = s.getNewRepeat(); - if (s.pageName && s.prop18 == 'New') s.prop19 = s.pageName; - if (s.pageName && s.prop18 == 'Repeat') s.prop20 = s.pageName; - - //Set Time Parting Variables - s_hour = s.getTimeParting('h', '0'); - s_day = s.getTimeParting('d', '0'); - s_timepart = s_day + "|" + s_hour; - s.prop11 = s_timepart.toLowerCase(); - if (s.visEvent) s.eVar11 = s.prop11; - - /* Campaign Config */ - //The Campaign variable - //s.campaign = s.getQueryParam('cmpid'); - //s.eVar1 = s.crossVisitParticipation(s.campaign, 's_cpm', '90', '5', '>', 'purchase'); - - s.campaign = s.getQueryParam('ocid'); - s.campaign = s.getValOnce(s.campaign,'s_campaign',0); - - /* Plugin: channelManager v2.2 */ - s.channelManager('cmp,cmpid,cid,rss,ocid,OCID', ':', 's_cm', '0'); - - if (s._channel == "Natural Search") { - s._channel = "Organic"; - s._campaign = s._partner + "-" + s._channel + "-" + s._keywords.toLowerCase(); - } - if (s._channel == "Referrers") { - s._channel = "Other Referrers"; - s._campaign = s._channel + "-" + s._referringDomain; - } - - s.eVar43 = s._referrer - s.eVar44 = s._referringDomain - s.eVar45 = s._keywords - s.eVar46 = s._partner - s.eVar47 = s._channel - - //Referrer - Search Term Stacking - s.eVar48 = s.crossVisitParticipation(s._keywords, 's_ev48', '30', '5', '>', 'event2', 1); - - //Referrer - Channel Stacking - s.eVar49 = s.crossVisitParticipation(s._channel, 's_ev49', '30', '5', '>'); - - -} -s.doPlugins = s_doPlugins - -function Set_Year() { - var now = new Date(); - var year = now.getYear(); - if (year < 1900) { - year = year + 1900; - } - return year; -} - -/*********************** PLUGINS SECTION ****************************/ - -function evaluateUrl(siteUrl) { - - h1 = ""; - h2 = ""; - h3 = ""; - h4 = ""; - url = ""; - hArray = null; - hLength = null; - newUrl = ""; - contentIdMatch = null; - - url = siteUrl; - - url = url.toLowerCase(); - url = url.replace(/^\s*(.*?)\s*$/,"$1"); - - //if last character is / then remove - url = url.replace(/\/$/g,''); - - //remove protocol in url - newUrl = url.replace(/^(http|https):\/\//g,""); - - //remove uk- in url if there is another section - //i.e. http://www.bbc.co.uk/news/uk-politics-11754656 - if(3 <= newUrl.split('-').length) { - newUrl = newUrl.replace(/uk-/,""); - } - - //replace a number document with article, mainly for v3 stories - newUrl = newUrl.replace(/\/[0-9]{7}.stm/,"/articles"); - - // strip default.stm - newUrl = newUrl.replace(/\/default.stm/g,''); - - //split the url - hArray = newUrl.split("\/"); - hLength = hArray.length; - - if (hLength >= 2) { - - siteSection = hArray[1]; - - switch(siteSection){ - case 'news': news(); break; - case 'sport': sport(); break; - case 'sport2': sport(); break; - case 'weather': weather(); break; - case 'travel': travel(); break; - case 'blogs': blogs(); break; - case 'radio': radio(); break; - //default:void("no siteSection found" + br);break; - } - } - - //Handle home page - if (hLength == 1) { - h1 = 'homepage'; - } - - if ("undefined" != typeof h1 && '' != h1) { - s.prop6 = h1; - s.eVar6 = s.prop6; - s.channel = s.prop6; - } - if ("undefined" != typeof h2 && '' != h2) { - s.prop7 = h2; - s.eVar7 = s.prop7; - } - if ("undefined" != typeof h3 && '' != h3) { - s.prop8 = h3; - s.eVar8 = s.prop8; - } - if ("undefined" != typeof h4 && '' != h4) { - s.prop9 = h4; - s.eVar9 = s.prop9; - } - - //*** - //END of Main section - //*** -} - -function news (){ - - h1 = hArray[1]; - - contentIdMatch = reNewsContentId.test(newUrl) - if (!contentIdMatch) { - if (hLength >= 3) { - h2 = h1 + ">" + hArray[2]; - if (hLength >= 4) { - h3 = h2 + ">" + hArray[3]; - } - } - } - else { - if (hLength >= 2) { - - //change all \d{7} and \d{8} to 'articles' - var lastFwdSlash = newUrl.lastIndexOf("/"); - var lastValue = newUrl.substr(lastFwdSlash + 1); - - lastValue = lastValue.replace(/([0-9]{8})/,"articles"); - lastValue = lastValue.replace(/([0-9]{7})/,"articles"); - - var firstDash = lastValue.indexOf("-"); - - if (firstDash > 0){ - - h2 = h1 + ">" + lastValue.substring(0,firstDash); - h3 = h2 + ">" + lastValue.substr(firstDash + 1); - - } else { - - h2 = h1 + ">" + lastValue; - - } - - } - - } -} - -function sport() { - - var newUrlSport = ""; - - //Keep the original value (eg Sport2), - h1 = hArray[1].replace(/sport2/g,'sport'); - - contentIdMatch = reStandardContentId.test(newUrl); - - if (!contentIdMatch) { - - newUrl = newUrl.replace(/sport2/g,'sport'); - newUrlSport = newUrl.replace(/\/hi\//g,'\/'); - hArray = newUrlSport.split("\/"); - hLength = hArray.length; - - if (hLength >= 3) { - - //Use the new value of h1 eg sport not sport2 - h2 = hArray[1] + ">" + hArray[2]; - if (hLength >= 4) { - h3 = h2 + ">" + hArray[3]; - - newUrlSport = newUrlSport.replace(/\/m\//g,'\/'); - hArray = newUrlSport.split("\/"); - hLength = hArray.length; - - if (hLength >= 5) { - h4 = h3 + ">" + hArray[4]; - } - } - } - - } else { - - var posHi = hArray.indexOf('hi'); - - if (posHi > 0 && (hLength >= (posHi + 1) )) { - h2 = h1 + ">" + hArray[posHi + 1]; - } - if (posHi > 0 && (hLength >= (posHi + 2) )) { - h3 = h2 + ">" + hArray[posHi + 2]; - } - var posM = hArray.indexOf('m'); - if (posM > 0 && (hLength >= (posM + 1) )) { - h4 = h3 + ">" + hArray[posM + 1]; - } - } -} - -function weather() { - - h1 = hArray[1]; - - newUrl = newUrl.replace(/\/hi\//g,'\/'); - hArray = newUrl.split("\/"); - hLength = hArray.length; - - if (hLength >= 3) { - h2 = h1 + ">" + hArray[2]; - contentIdMatch = reStandardContentId.test(newUrl); - if (!contentIdMatch) { - if (hLength >= 4) { - h3 = h2 + ">" + hArray[3]; - } - } else { - h3 = h2 + ">" + 'articles'; - } - } -} - -function travel () { - h1 = hArray[1]; - if (hLength >= 3) { - h2 = h1 + ">" + hArray[2]; - contentIdMatch = reStandardContentId.test(newUrl); - if (!contentIdMatch) { - if (hLength >= 4) { - h3 = h2 + ">" + hArray[3]; - } - } - else { - h3 = h2 + ">" + 'articles'; - } - } -} - -function blogs() { - - newUrl = newUrl.replace(/\.shtml/g,'\/'); - hArray = newUrl.split("\/"); - hLength = hArray.length; - - h1 = hArray[1]; - - if (hLength >= 3) { - h2 = h1 + ">" + hArray[2]; - if (hLength >= 4) { - h3 = h2 + ">" + hArray[3]; - if (hLength >= 5) { - h4 = h3 + ">" + hArray[4]; - } - } - } -} - -function radio() { - h1 = hArray[1]; -} - - -/********************************************************************* -* Function p_fo(x,y): Ensures the plugin code is fired only on the -* first call of do_plugins -* Returns: -* - 1 if first instance on firing -* - 0 if not first instance on firing -*********************************************************************/ -s.p_fo = new Function("n", "" -+ "var s=this;if(!s.__fo){s.__fo=new Object;}if(!s.__fo[n]){s.__fo[n]=" -+ "new Object;return 1;}else {return 0;}"); - -/* -* Plugin: getValOnce 0.2 - get a value once per session or number of days -*/ -s.getValOnce = new Function("v", "c", "e", "" -+ "var s=this,k=s.c_r(c),a=new Date;e=e?e:0;if(v){a.setTime(a.getTime(" -+ ")+e*86400000);s.c_w(c,v,e?a:0);}return v==k?'':v"); - -/* -* Plugin Utility: apl v1.1 -*/ -s.apl = new Function("l", "v", "d", "u", "" -+ "var s=this,m=0;if(!l)l='';if(u){var i,n,a=s.split(l,d);for(i=0;i-1?i:l.length;a[x" -+ "++]=l.substring(0,i);l=l.substring(i+d.length);}return a"); - -/* Utility Function: p_c */ -s.p_c = new Function("v", "c", "" -+ "var x=v.indexOf('=');return c.toLowerCase()==v.substring(0,x<0?v.le" -+ "ngth:x).toLowerCase()?v:0"); - -/* -* s.join: 1.0 - s.join(v,p) -* -* v - Array (may also be array of array) -* p - formatting parameters (front, back, delim, wrap) -* -*/ -s.join = new Function("v", "p", "" -+ "var s = this;var f,b,d,w;if(p){f=p.front?p.front:'';b=p.back?p.back" -+ ":'';d=p.delim?p.delim:'';w=p.wrap?p.wrap:'';}var str='';for(var x=0" -+ ";x=0){x=x.substring(0,i)+n+x." -+ "substring(i+o.length);i=x.indexOf(o,i+l)}return x"); - -/* -* Plugin - trackRefresh v1.1 (requires split utility function) -*/ -s.trackRefresh = new Function("v", "c", "" -+ "var s=this,a,t=new Date,x;t.setTime(t.getTime()+1800000);if(!s.c_r(" -+ "c)){s.c_w(c,v,t);return v}else{x=unescape(s.c_r(c));if(x==v){x+='~[" -+ "1]';s.c_w(c,x,0);return x}else{a=s.split(x,'~[');if(a[0]==v){i=pars" -+ "eInt(a[1])+1;x=a[0]+'~['+i+']';s.c_w(c,x,0);return x}else{s.c_w(c,v" -+ ",0);return v}}}"); - -/* -* Plugin: Visit Number By Month 2.0 - Return the user visit number -*/ -s.getVisitNum = new Function("" -+ "var s=this,e=new Date(),cval,cvisit,ct=e.getTime(),c='s_vnum',c2='s" -+ "_invisit';e.setTime(ct+30*24*60*60*1000);cval=s.c_r(c);if(cval){var" -+ " i=cval.indexOf('&vn='),str=cval.substring(i+4,cval.length),k;}cvis" -+ "it=s.c_r(c2);if(cvisit){if(str){e.setTime(ct+30*60*1000);s.c_w(c2,'" -+ "true',e);return str;}else return 'unknown visit number';}else{if(st" -+ "r){str++;k=cval.substring(0,i);e.setTime(k);s.c_w(c,k+'&vn='+str,e)" -+ ";e.setTime(ct+30*60*1000);s.c_w(c2,'true',e);return str;}else{s.c_w" -+ "(c,ct+30*24*60*60*1000+'&vn=1',e);e.setTime(ct+30*60*1000);s.c_w(c2" -+ ",'true',e);return 1;}}" -); - -/* -* Plugin: getTimeToComplete 0.4 - return the time from start to stop -*/ -s.getTimeToComplete = new Function("v", "cn", "e", "" -+ "var s=this,d=new Date,x=d,k;if(!s.ttcr){e=e?e:0;if(v=='start'||v=='" -+ "stop')s.ttcr=1;x.setTime(x.getTime()+e*86400000);if(v=='start'){s.c" -+ "_w(cn,d.getTime(),e?x:0);return '';}if(v=='stop'){k=s.c_r(cn);if(!s" -+ ".c_w(cn,'',d)||!k)return '';v=(d.getTime()-k)/1000;var td=86400,th=" -+ "3600,tm=60,r=5,u,un;if(v>td){u=td;un='days';}else if(v>th){u=th;un=" -+ "'hours';}else if(v>tm){r=2;u=tm;un='minutes';}else{r=.2;u=1;un='sec" -+ "onds';}v=v*r/u;return (Math.round(v)/r)+' '+un;}}return '';"); - -/* -* Plugin: Days since last Visit 1.1.H - capture time from last visit -*/ -s.getDaysSinceLastVisit = new Function("c", "" -+ "var s=this,e=new Date(),es=new Date(),cval,cval_s,cval_ss,ct=e.getT" -+ "ime(),day=24*60*60*1000,f1,f2,f3,f4,f5;e.setTime(ct+3*365*day);es.s" -+ "etTime(ct+30*60*1000);f0='Cookies Not Supported';f1='First Visit';f" -+ "2='More than 30 days';f3='More than 7 days';f4='Less than 7 days';f" -+ "5='Less than 1 day';cval=s.c_r(c);if(cval.length==0){s.c_w(c,ct,e);" -+ "s.c_w(c+'_s',f1,es);}else{var d=ct-cval;if(d>30*60*1000){if(d>30*da" -+ "y){s.c_w(c,ct,e);s.c_w(c+'_s',f2,es);}else if(d<30*day+1 && d>7*day" -+ "){s.c_w(c,ct,e);s.c_w(c+'_s',f3,es);}else if(d<7*day+1 && d>day){s." -+ "c_w(c,ct,e);s.c_w(c+'_s',f4,es);}else if(ddsts&&cd30){mint='30'}if(thish>=12){ap='PM';thish=thish-12};" -+ "if (thish==0){thish=12};if(thisd==6||thisd==0){dt='Weekend'};" -+ "var timestring=thish+':'+mint+ap;if(t=='h'){return timestring}" -+ "if(t=='d'){return dow};if(t=='w'){return dt}}};"); - -/* -* Plugin: getQueryParam 2.3 -*/ -s.getQueryParam = new Function("p", "d", "u", "" -+ "var s=this,v='',i,t;d=d?d:'';u=u?u:(s.pageURL?s.pageURL:s.wd.locati" -+ "on);if(u=='f')u=s.gtfs().location;while(p){i=p.indexOf(',');i=i<0?p" -+ ".length:i;t=s.p_gpv(p.substring(0,i),u+'');if(t){t=t.indexOf('#')>-" -+ "1?t.substring(0,t.indexOf('#')):t;}if(t)v+=v?d+t:t;p=p.substring(i=" -+ "=p.length?i:i+1)}return v"); -s.p_gpv = new Function("k", "u", "" -+ "var s=this,v='',i=u.indexOf('?'),q;if(k&&i>-1){q=u.substring(i+1);v" -+ "=s.pt(q,'&','p_gvf',k)}return v"); -s.p_gvf = new Function("t", "k", "" -+ "if(t){var s=this,i=t.indexOf('='),p=i<0?t:t.substring(0,i),v=i<0?'T" -+ "rue':t.substring(i+1);if(p.toLowerCase()==k.toLowerCase())return s." -+ "epa(v)}return ''"); - -/* -* channelManager v2.2 - Tracking External Traffic -*/ -s.channelManager = new Function("a", "b", "c", "V", "" -+ "var s=this,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,t,u,v,w,x,y,z,A,B,C,D,E,F," -+ "G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,W,X,Y;g=s.referrer?s.referrer:documen" -+ "t.referrer;g=g.toLowerCase();if(!g){h='1'}i=g.indexOf('?')>-1?g.ind" -+ "exOf('?'):g.length;j=g.substring(0,i);k=s.linkInternalFilters.toLow" -+ "erCase();k=s.split(k,',');l=k.length;for(m=0;m-1?g.indexO" -+ "f('//')+2:0;r=g.indexOf('/',q)>-1?g.indexOf('/',q):i;t=g.substring(" -+ "q,r);t=t.toLowerCase();u=t;P='Referrers';v=s.seList+'>'+s._extraSea" -+ "rchEngines;if(V=='1'){j=s.repl(j,'oogle','%');j=s.repl(j,'ahoo','^'" -+ ");g=s.repl(g,'as_q','*');}A=s.split(v,'>');B=A.length;for(C=0;C-1){I=s.split(D[1],',');J=I.length;" -+ "for(K=0;K');l=k.length;for(m=0;m-1)P=Q[0]}}}d=s._channelParameter;if(d){k=s." -+ "split(d,'>');l=k.length;for(m=0;m');l=k.length;" -+ "for(m=0;mask.jp,ask.co|q,ask|Ask>www.baidu.com|wd|Baidu>daum" -+".net,search.daum.net|q|Daum>google.,googlesyndication.com|q,as_q|Go" -+"ogle>icqit.com|q|icq>bing.com|q|Microsoft Bing>myway.com|searchfor|" -+"MyWay.com>naver.com,search.naver.com|query|Naver>netscape.com|query" -+",search|Netscape Search>reference.com|q|Reference.com>seznam|w|Sezn" -+"am.cz>abcsok.no|q|Startsiden>tiscali.it,www.tiscali.co.uk|key,query" -+"|Tiscali>virgilio.it|qs|Virgilio>yahoo.com,yahoo.co.jp|p,va|Yahoo!>" -+"yandex|text|Yandex.ru>search.cnn.com|query|CNN Web Search>search.ea" -+"rthlink.net|q|Earthlink Search>search.comcast.net|q|Comcast Search>" -+"search.rr.com|qs|RoadRunner Search>optimum.net|q|Optimum Search";*/ -/* Top 130 */ -s.seList = "altavista.co|q,r|AltaVista>aol.co.uk,search.aol.co.uk|query" -+ "|AOL - United Kingdom>search.aol.com,search.aol.ca|query,q|AOL.com " -+ "Search>ask.com,ask.co.uk|ask,q|Ask Jeeves>www.baidu.com|wd|Baidu>da" -+ "um.net,search.daum.net|q|Daum>google.co,googlesyndication.com|q,as_" -+ "q|Google>google.com.ar|q,as_q|Google - Argentina>google.com.au|q,as" -+ "_q|Google - Australia>google.at|q,as_q|Google - Austria>google.com." -+ "bh|q,as_q|Google - Bahrain>google.com.bd|q,as_q|Google - Bangladesh" -+ ">google.be|q,as_q|Google - Belgium>google.com.bo|q,as_q|Google - Bo" -+ "livia>google.ba|q,as_q|Google - Bosnia-Hercegovina>google.com.br|q," -+ "as_q|Google - Brasil>google.bg|q,as_q|Google - Bulgaria>google.ca|q" -+ ",as_q|Google - Canada>google.cl|q,as_q|Google - Chile>google.cn|q,a" -+ "s_q|Google - China>google.com.co|q,as_q|Google - Colombia>google.co" -+ ".cr|q,as_q|Google - Costa Rica>google.hr|q,as_q|Google - Croatia>go" -+ "ogle.cz|q,as_q|Google - Czech Republic>google.dk|q,as_q|Google - De" -+ "nmark>google.com.do|q,as_q|Google - Dominican Republic>google.com.e" -+ "c|q,as_q|Google - Ecuador>google.com.eg|q,as_q|Google - Egypt>googl" -+ "e.com.sv|q,as_q|Google - El Salvador>google.ee|q,as_q|Google - Esto" -+ "nia>google.fi|q,as_q|Google - Finland>google.fr|q,as_q|Google - Fra" -+ "nce>google.de|q,as_q|Google - Germany>google.gr|q,as_q|Google - Gre" -+ "ece>google.com.gt|q,as_q|Google - Guatemala>google.hn|q,as_q|Google" -+ " - Honduras>google.com.hk|q,as_q|Google - Hong Kong>google.hu|q,as_" -+ "q|Google - Hungary>google.co.in|q,as_q|Google - India>google.co.id|" -+ "q,as_q|Google - Indonesia>google.ie|q,as_q|Google - Ireland>google." -+ "is|q,as_q|Google - Island>google.co.il|q,as_q|Google - Israel>googl" -+ "e.it|q,as_q|Google - Italy>google.com.jm|q,as_q|Google - Jamaica>go" -+ "ogle.co.jp|q,as_q|Google - Japan>google.jo|q,as_q|Google - Jordan>g" -+ "oogle.co.ke|q,as_q|Google - Kenya>google.co.kr|q,as_q|Google - Kore" -+ "a>google.lv|q,as_q|Google - Latvia>google.lt|q,as_q|Google - Lithua" -+ "nia>google.com.my|q,as_q|Google - Malaysia>google.com.mt|q,as_q|Goo" -+ "gle - Malta>google.mu|q,as_q|Google - Mauritius>google.com.mx|q,as_" -+ "q|Google - Mexico>google.co.ma|q,as_q|Google - Morocco>google.nl|q," -+ "as_q|Google - Netherlands>google.co.nz|q,as_q|Google - New Zealand>" -+ "google.com.ni|q,as_q|Google - Nicaragua>google.com.ng|q,as_q|Google" -+ " - Nigeria>google.no|q,as_q|Google - Norway>google.com.pk|q,as_q|Go" -+ "ogle - Pakistan>google.com.py|q,as_q|Google - Paraguay>google.com.p" -+ "e|q,as_q|Google - Peru>google.com.ph|q,as_q|Google - Philippines>go" -+ "ogle.pl|q,as_q|Google - Poland>google.pt|q,as_q|Google - Portugal>g" -+ "oogle.com.pr|q,as_q|Google - Puerto Rico>google.com.qa|q,as_q|Googl" -+ "e - Qatar>google.ro|q,as_q|Google - Romania>google.ru|q,as_q|Google" -+ " - Russia>google.st|q,as_q|Google - Sao Tome and Principe>google.co" -+ "m.sa|q,as_q|Google - Saudi Arabia>google.com.sg|q,as_q|Google - Sin" -+ "gapore>google.sk|q,as_q|Google - Slovakia>google.si|q,as_q|Google -" -+ " Slovenia>google.co.za|q,as_q|Google - South Africa>google.es|q,as_" -+ "q|Google - Spain>google.lk|q,as_q|Google - Sri Lanka>google.se|q,as" -+ "_q|Google - Sweden>google.ch|q,as_q|Google - Switzerland>google.com" -+ ".tw|q,as_q|Google - Taiwan>google.co.th|q,as_q|Google - Thailand>go" -+ "ogle.bs|q,as_q|Google - The Bahamas>google.tt|q,as_q|Google - Trini" -+ "dad and Tobago>google.com.tr|q,as_q|Google - Turkey>google.com.ua|q" -+ ",as_q|Google - Ukraine>google.ae|q,as_q|Google - United Arab Emirat" -+ "es>google.co.uk|q,as_q|Google - United Kingdom>google.com.uy|q,as_q" -+ "|Google - Uruguay>google.co.ve|q,as_q|Google - Venezuela>google.com" -+ ".vn|q,as_q|Google - Viet Nam>google.co.vi|q,as_q|Google - Virgin Is" -+ "lands>icqit.com|q|icq>bing.com|q|Microsoft Bing>myway.com|searchfor" -+ "|MyWay.com>naver.com,search.naver.com|query|Naver>netscape.com|quer" -+ "y,search|Netscape Search>reference.com|q|Reference.com>seznam|w|Sez" -+ "nam.cz>abcsok.no|q|Startsiden>tiscali.it|key|Tiscali>virgilio.it|qs" -+ "|Virgilio>yahoo.com,search.yahoo.com|p|Yahoo!>ar.yahoo.com,ar.searc" -+ "h.yahoo.com|p|Yahoo! - Argentina>au.yahoo.com,au.search.yahoo.com|p" -+ "|Yahoo! - Australia>ca.yahoo.com,ca.search.yahoo.com|p|Yahoo! - Can" -+ "ada>fr.yahoo.com,fr.search.yahoo.com|p|Yahoo! - France>de.yahoo.com" -+ ",de.search.yahoo.com|p|Yahoo! - Germany>hk.yahoo.com,hk.search.yaho" -+ "o.com|p|Yahoo! - Hong Kong>in.yahoo.com,in.search.yahoo.com|p|Yahoo" -+ "! - India>yahoo.co.jp,search.yahoo.co.jp|p,va|Yahoo! - Japan>kr.yah" -+ "oo.com,kr.search.yahoo.com|p|Yahoo! - Korea>mx.yahoo.com,mx.search." -+ "yahoo.com|p|Yahoo! - Mexico>ph.yahoo.com,ph.search.yahoo.com|p|Yaho" -+ "o! - Philippines>sg.yahoo.com,sg.search.yahoo.com|p|Yahoo! - Singap" -+ "ore>es.yahoo.com,es.search.yahoo.com|p|Yahoo! - Spain>telemundo.yah" -+ "oo.com,espanol.search.yahoo.com|p|Yahoo! - Spanish (US : Telemundo)" -+ ">tw.yahoo.com,tw.search.yahoo.com|p|Yahoo! - Taiwan>uk.yahoo.com,uk" -+ ".search.yahoo.com|p|Yahoo! - UK and Ireland>yandex|text|Yandex.ru>s" -+ "earch.cnn.com|query|CNN Web Search>search.earthlink.net|q|Earthlink" -+ " Search>search.comcast.net|q|Comcast Search>search.rr.com|qs|RoadRu" -+ "nner Search>optimum.net|q|Optimum Search"; - -/* -* Plug-in: crossVisitParticipation v1.6 - stacks values from -* specified variable in cookie and returns value -*/ -s.crossVisitParticipation = new Function("v", "cn", "ex", "ct", "dl", "ev", "dv", "" -+ "var s=this,ce;if(typeof(dv)==='undefined')dv=0;if(s.events&&ev){var" -+ " ay=s.split(ev,',');var ea=s.split(s.events,',');for(var u=0;u0&&arry[arry.length-1][0]==v)arry[ar" -+ "ry.length-1]=[v,new Date().getTime()];else arry[arry.length]=[v,new" -+ " Date().getTime()];var start=arry.length-ct<0?0:arry.length-ct;var " -+ "td=new Date();for(var x=start;x2||(x!=i.lx&&(x!=2||i.lx==1))) {b=\"Media.\"+name;pev3 = m.s.ape(i.n)+d+i.l+d+m.s.a" -+"pe(i.p)+d;if(x){if(o<0&&i.lt>0){o=(ts-i.lt)+i.lo;o=o=2&&i.lo=0?'L'+i.to:'')+i.e+(x!=2?(m.trackWhilePlaying?'L':'E')+o:'');if(m.trackWhilePlaying){b=0;pe='m_o';if(x!=4){w.offset=o;w.percent=((w.offset+1)/w" -+".length)*100;w.percent=w.percent>100?100:Math.floor(w.percent);w.timePlayed=i.t;if(m.monitor)m.monitor(m.s,w)}if(i.to<0)pe='m_s';else if(x==4)pe='m_i';else{t=0;v=e='None';ti=ti?parseInt(ti):0;z=tp?" -+"m.s.sp(tp,','):0;if(ti&&i.ts>=ti)t=1;else if(z){if(o=ti/100)){t=1;j=z.length}}}}}}}else{m" -+".e(n,2,-1);if(m.trackWhilePlaying){w.offset=i.lo;w.percent=((w.offset+1)/w.length)*100;w.percent=w.percent>100?100:Math.floor(w.percent);w.timePlayed=i.t;if(m.monitor)m.monitor(m.s,w)}m.l[n]=0;if(i" -+".e){pev3+=i.t+d+i.s+d+(m.trackWhilePlaying&&i.to>=0?'L'+i.to:'')+i.e;if(m.trackWhilePlaying){v=e='None';pe='m_o'}else{t=0;m.s.fbr(b)}}else t=0;b=0}if(t){vo.linkTrackVars=v;vo.linkTrackEvents=e;vo.p" -+"e=pe;vo.pev3=pev3;m.s.t(vo,b);if(m.trackWhilePlaying){i.ts=0;i.to=o;i.e=''}}}}return i};m.ae=function(n,l,p,x,o,b){if(n&&p){var m=this;if(!m.l||!m.l[n])void(n,l,p,b);m.e(n,x,o)}};m.a=function(o,t" -+"){var m=this,i=o.id?o.id:o.name,n=o.name,p=0,v,c,c1,c2,xc=m.s.h,x,e,f1,f2='s_media_'+m._in+'_oc',f3='s_media_'+m._in+'_t',f4='s_media_'+m._in+'_s',f5='s_media_'+m._in+'_l',f6='s_media_'+m._in+'_m'," -+"f7='s_media_'+m._in+'_c',tcf,w;if(!i){if(!m.c)m.c=0;i='s_media_'+m._in+'_'+m.c;m.c++}if(!o.id)o.id=i;if(!o.name)o.name=n=i;if(!m.ol)m.ol=new Object;if(m.ol[i])return;m.ol[i]=o;if(!xc)xc=m.s.b;tcf=n" -+"ew Function('o','var e,p=0;try{if(o.versionInfo&&o.currentMedia&&o.controls)p=1}catch(e){p=0}return p');p=tcf(o);if(!p){tcf=new Function('o','var e,p=0,t;try{t=o.GetQuickTimeVersion();if(t)p=2}catc" -+"h(e){p=0}return p');p=tcf(o);if(!p){tcf=new Function('o','var e,p=0,t;try{t=o.GetVersionInfo();if(t)p=3}catch(e){p=0}return p');p=tcf(o)}}v=\"var m=s_c_il[\"+m._in+\"],o=m.ol['\"+i+\"']\";if(p==1){" -+"p='Windows Media Player '+o.versionInfo;c1=v+',n,p,l,x=-1,cm,c,mn;if(o){cm=o.currentMedia;c=o.controls;if(cm&&c){mn=cm.name?cm.name:c.URL;l=cm.duration;p=c.currentPosition;n=o.playState;if(n){if(n=" -+"=8)x=0;if(n==3)x=1;if(n==1||n==2||n==4||n==5||n==6)x=2;}';c2='if(x>=0)m.ae(mn,l,\"'+p+'\",x,x!=2?p:-1,o)}}';c=c1+c2;if(m.s.isie&&xc){x=m.s.d.createElement('script');x.language='jscript';x.type='tex" -+"t/javascript';x.htmlFor=i;x.event='PlayStateChange(NewState)';x.defer=true;x.text=c;xc.appendChild(x);o[f6]=new Function(c1+'if(n==3){x=3;'+c2+'}setTimeout(o.'+f6+',5000)');o[f6]()}}if(p==2){p='Qui" -+"ckTime Player '+(o.GetIsQuickTimeRegistered()?'Pro ':'')+o.GetQuickTimeVersion();f1=f2;c=v+',n,x,t,l,p,p2,mn;if(o){mn=o.GetMovieName()?o.GetMovieName():o.GetURL();n=o.GetRate();t=o.GetTimeScale();l" -+"=o.GetDuration()/t;p=o.GetTime()/t;p2=o.'+f5+';if(n!=o.'+f4+'||p5){x=2;if(n!=0)x=1;else if(p>=l)x=0;if(p5)m.ae(mn,l,\"'+p+'\",2,p2,o);m.ae(mn,l,\"'+p+'\",x,x!=2?p:-1,o)}if(n>0&&" -+"o.'+f7+'>=10){m.ae(mn,l,\"'+p+'\",3,p,o);o.'+f7+'=0}o.'+f7+'++;o.'+f4+'=n;o.'+f5+'=p;setTimeout(\"'+v+';o.'+f2+'(0,0)\",500)}';o[f1]=new Function('a','b',c);o[f4]=-1;o[f7]=0;o[f1](0,0)}if(p==3){p='" -+"RealPlayer '+o.GetVersionInfo();f1=n+'_OnPlayStateChange';c1=v+',n,x=-1,l,p,mn;if(o){mn=o.GetTitle()?o.GetTitle():o.GetSource();n=o.GetPlayState();l=o.GetLength()/1000;p=o.GetPosition()/1000;if(n!=" -+"o.'+f4+'){if(n==3)x=1;if(n==0||n==2||n==4||n==5)x=2;if(n==0&&(p>=l||p==0))x=0;if(x>=0)m.ae(mn,l,\"'+p+'\",x,x!=2?p:-1,o)}if(n==3&&(o.'+f7+'>=10||!o.'+f3+')){m.ae(mn,l,\"'+p+'\",3,p,o);o.'+f7+'=0}o." -+"'+f7+'++;o.'+f4+'=n;';c2='if(o.'+f2+')o.'+f2+'(o,n)}';if(m.s.wd[f1])o[f2]=m.s.wd[f1];m.s.wd[f1]=new Function('a','b',c1+c2);o[f1]=new Function('a','b',c1+'setTimeout(\"'+v+';o.'+f1+'(0,0)\",o.'+f3+" -+"'?500:5000);'+c2);o[f4]=-1;if(m.s.isie)o[f3]=1;o[f7]=0;o[f1](0,0)}};m.as=new Function('e','var m=s_c_il['+m._in+'],l,n;if(m.autoTrack&&m.s.d.getElementsByTagName){l=m.s.d.getElementsByTagName(m.s.i" -+"sie?\"OBJECT\":\"EMBED\");if(l)for(n=0;n=0)y+=n}return y};s.fl=function(x,l){return x?(''+x).substring(0,l):x};s.co=func" -+"tion(o){if(!o)return o;var n=new Object,x;for(x in o)if(x.indexOf('select')<0&&x.indexOf('filter')<0)n[x]=o[x];return n};s.num=function(x){x=''+x;for(var p=0;p127){l=0;e='';while(n||l<4){e=h.substring(n%16,n%16+1)+e;n=(n-n%" -+"16)/16;l++}y+='%u'+e}else if(c=='+')y+='%2B';else y+=escape(c)}return y}else{x=s.rep(escape(''+x),'+','%2B');if(c&&s.em==1&&x.indexOf('%u')<0&&x.indexOf('%U')<0){i=x.indexOf('%');while(i>=0){i++;if" -+"(h.substring(8).indexOf(x.substring(i,i+1).toUpperCase())>=0)return x.substring(0,i)+'u00'+x.substring(i);i=x.indexOf('%',i)}}}}return x};s.epa=function(x){var s=this;if(x){x=''+x;return s.em==3?de" -+"codeURIComponent(x):unescape(s.rep(x,'+',' '))}return x};s.pt=function(x,d,f,a){var s=this,t=x,z=0,y,r;while(t){y=t.indexOf(d);y=y<0?t.length:y;t=t.substring(0,y);r=s[f](t,a);if(r)return r;z+=y+d.l" -+"ength;t=x.substring(z,x.length);t=z=0)a=a.substring(0,c);if(t.substring(0,2)=='s_')t=t.substring(2);return (t!=''&&t==a)};s.f" -+"sf=function(t,a){var s=this;if(s.pt(a,',','isf',t))s.fsg+=(s.fsg!=''?',':'')+t;return 0};s.fs=function(x,f){var s=this;s.fsg='';s.pt(x,',','fsf',f);return s.fsg};s.si=function(){var s=this,i,k,v,c=" -+"s_gi+'var s=s_gi(\"'+s.oun+'\");s.sa(\"'+s.un+'\");';for(i=0;i2?n:2;p=d.lastIndexOf('.');if(p>=0){while(p>=0&&n>1){p=d.lastIndexOf('" -+".',p-1);n--}s.c_d=p>0&&s.pt(d,'.','c_gdf',0)?d.substring(p):d}}return s.c_d};s.c_r=function(k){var s=this;k=s.ape(k);var c=' '+s.d.cookie,i=c.indexOf(' '+k+'='),e=i<0?i:c.indexOf(';',i),v=i<0?'':s." -+"epa(c.substring(i+2+k.length,e<0?c.length:e));return v!='[[B]]'?v:''};s.c_w=function(k,v,e){var s=this,d=s.c_gd(),l=s.cookieLifetime,t;v=''+v;l=l?(''+l).toUpperCase():'';if(e&&l!='SESSION'&&l!='NON" -+"E'){t=(v!=''?parseInt(l?l:0):-60);if(t){e=new Date;e.setTime(e.getTime()+(t*1000))}}if(k&&l!='NONE'){s.d.cookie=k+'='+s.ape(v!=''?v:'[[B]]')+'; path=/;'+(e&&l!='SESSION'?' expires='+e.toGMTString()" -+"+';':'')+(d?' domain='+d+';':'');return s.c_r(k)==v}return 0};s.eh=function(o,e,r,f){var s=this,b='s_'+e+'_'+s._in,n=-1,l,i,x;if(!s.ehl)s.ehl=new Array;l=s.ehl;for(i=0;i=5&&(!s.isopera||s.apv>=7)){tcf=new Function('s','f','a','t','var e,r;try{r=s[f](a)}catch(e){r=s[t](e)}return r');r=tcf(s,f,a,t)}else{if(s.ismac&&s.u.indexOf('MSIE 4')>=0)r=s[b](a);else{s.eh(s.wd," -+"'onerror',0,o);r=s[f](a);s.eh(s.wd,'onerror',1)}}return r};s.gtfset=function(e){var s=this;return s.tfs};s.gtfsoe=new Function('e','var s=s_c_il['+s._in+'],c;s.eh(window,\"onerror\",1);s.etfs=1;c=s" -+".t();if(c)s.void(c);s.etfs=0;return true');s.gtfsfb=function(a){return window};s.gtfsf=function(w){var s=this,p=w.parent,l=w.location;s.tfs=w;if(p&&p.location!=l&&p.location.host==l.host){s.tfs=" -+"p;return s.gtfsf(s.tfs)}return s.tfs};s.gtfs=function(){var s=this;if(!s.tfs){s.tfs=s.wd;if(!s.etfs)s.tfs=s.cet('gtfsf',s.tfs,'gtfset',s.gtfsoe,'gtfsfb')}return s.tfs};s.mrq=function(u){var s=this," -+"l=s.rl[u],n,r;s.rl[u]=0;if(l)for(n=0;n=3" -+"&&(!s.isopera||s.apv>=7)&&(s.ns6<0||s.apv>=6.1)){if(!s.rc)s.rc=new Object;if(!s.rc[un]){s.rc[un]=1;if(!s.rl)s.rl=new Object;s.rl[un]=new Array;setTimeout('if(window.s_c_il)window.s_c_il['+s._in+']." -+"mrq(\"'+un+'\")',750)}else{l=s.rl[un];if(l){r.t=ta;r.u=un;r.r=rs;l[l.length]=r;return ''}imn+='_'+s.rc[un];s.rc[un]++}im=s.wd[imn];if(!im)im=s.wd[imn]=new Image;im.s_l=0;im.onloaddisabled=new Function('e'," -+"'this.s_l=1;var wd=window,s;if(wd.s_c_il){s=wd.s_c_il['+s._in+'];s.mrq(\"'+un+'\");s.nrs--;if(!s.nrs)s.m_m(\"rr\")}');if(!s.nrs){s.nrs=1;s.m_m('rs')}else s.nrs++;im.src=rs;if((!ta||ta=='_self'||ta=" -+"='_top'||(s.wd.name&&ta==s.wd.name))&&rs.indexOf('&pe=')>=0){b=e=new Date;while(!im.s_l&&e.getTime()-b.getTime()<500)e=new Date}return ''}return ''};s.gg=function(v){var s=this;if(!s.wd['s_'+v])s.wd['s_'+v]='';return s.wd['s_'+v]};s.glf=function(t,a){if(t.substring(0,2)=='s_')t=t.substring(2);var s=this,v=s.gg(t);if(v)s[t]=v};s.gl=" -+"function(v){var s=this;if(s.pg)s.pt(v,',','glf',0)};s.rf=function(x){var s=this,y,i,j,h,l,a,b='',c='',t;if(x){y=''+x;i=y.indexOf('?');if(i>0){a=y.substring(i+1);y=y.substring(0,i);h=y.toLowerCase()" -+";i=0;if(h.substring(0,7)=='http://')i+=7;else if(h.substring(0,8)=='https://')i+=8;h=h.substring(i);i=h.indexOf(\"/\");if(i>0){h=h.substring(0,i);if(h.indexOf('google')>=0){a=s.sp(a,'&');if(a.lengt" -+"h>1){l=',q,ie,start,search_key,word,kw,cd,';for(j=0;j0&&l.indexOf(','+t.substring(0,i)+',')>=0)b+=(b?'&':'')+t;else c+=(c?'&':'')+t}if(b&&c){y+='?'+b+'&'" -+"+c;if(''+x!=y)x=y}}}}}}return x};s.hav=function(){var s=this,qs='',fv=s.linkTrackVars,fe=s.linkTrackEvents,mn,i;if(s.pe){mn=s.pe.substring(0,1).toUpperCase()+s.pe.substring(1);if(s[mn]){fv=s[mn].tr" -+"ackVars;fe=s[mn].trackEvents}}fv=fv?fv+','+s.vl_l+','+s.vl_l2:'';for(i=0;i=0?h.substring(0,qi):h;if(t&&h.substring(h.length-(t.length+1))=='.'+t" -+")return 1;return 0};s.ltef=function(t,h){t=t?t.toLowerCase():'';h=h?h.toLowerCase():'';if(t&&h.indexOf(t)>=0)return 1;return 0};s.lt=function(h){var s=this,lft=s.linkDownloaddisabledFileTypes,lef=s.linkExt" -+"ernalFilters,lif=s.linkInternalFilters;lif=lif?lif:s.wd.location.hostname;h=h.toLowerCase();if(s.trackDownloaddisabledLinks&&lft&&s.pt(lft,',','ltdf',h))return 'd';if(s.trackExternalLinks&&h.substring(0,1)" -+"!='#'&&(lef||lif)&&(!lef||s.pt(lef,',','ltef',h))&&(!lif||!s.pt(lif,',','ltef',h)))return 'e';return ''};s.lc=new Function('e','var s=s_c_il['+s._in+'],b=s.eh(this,\"onclick\");s.lnk=s.co(this);s.t" -+"();s.lnk=0;if(b)return this[b](e);return true');s.bc=new Function('e','var s=s_c_il['+s._in+'],f,tcf;if(s.d&&s.d.all&&s.d.all.cppXYctnr)return;s.eo=e.srcElement?e.srcElement:e.target;tcf=new Functi" -+"on(\"s\",\"var e;try{if(s.eo&&(s.eo.tagName||s.eo.parentElement||s.eo.parentNode))s.t()}catch(e){}\");tcf(s);s.eo=0');s.oh=function(o){var s=this,l=s.wd.location,h=o.href?o.href:'',i,j,k,p;i=h.inde" -+"xOf(':');j=h.indexOf('?');k=h.indexOf('/');if(h&&(i<0||(j>=0&&i>j)||(k>=0&&i>k))){p=o.protocol&&o.protocol.length>1?o.protocol:(l.protocol?l.protocol:'');i=l.pathname.lastIndexOf('/');h=(p?p+'//':'" -+"')+(o.host?o.host:(l.host?l.host:''))+(h.substring(0,1)!='/'?l.pathname.substring(0,i<0?0:i)+'/':'')+h}return h};s.ot=function(o){var t=o.tagName;t=t&&t.toUpperCase?t.toUpperCase():'';if(t=='SHAPE'" -+")t='';if(t){if((t=='INPUT'||t=='BUTTON')&&o.type&&o.type.toUpperCase)t=o.type.toUpperCase();else if(!t&&o.href)t='A';}return t};s.oid=function(o){var s=this,t=s.ot(o),p,c,n='',x=0;if(t&&!o.s_oid){p" -+"=o.protocol;c=o.onclick;if(o.href&&(t=='A'||t=='AREA')&&(!c||!p||p.toLowerCase().indexOf('javascript')<0))n=s.oh(o);else if(c){n=s.rep(s.rep(s.rep(s.rep(''+c,\"\\r\",''),\"\\n\",''),\"\\t\",''),' '" -+",'');x=2}else if(t=='INPUT'||t=='SUBMIT'){if(o.value)n=o.value;else if(o.innerText)n=o.innerText;else if(o.textContent)n=o.textContent;x=3}else if(o.src&&t=='IMAGE')n=o.src;if(n){o.s_oid=s.fl(n,100" -+");o.s_oidt=x}}return o.s_oid};s.rqf=function(t,un){var s=this,e=t.indexOf('='),u=e>=0?t.substring(0,e):'',q=e>=0?s.epa(t.substring(e+1)):'';if(u&&q&&(','+u+',').indexOf(','+un+',')>=0){if(u!=s.un&&" -+"s.un.indexOf(',')>=0)q='&u='+u+q+'&u=0';return q}return ''};s.rq=function(un){if(!un)un=this.un;var s=this,c=un.indexOf(','),v=s.c_r('s_sq'),q='';if(c<0)return s.pt(v,'&','rqf',un);return s.pt(un,'" -+",','rq',0)};s.sqp=function(t,a){var s=this,e=t.indexOf('='),q=e<0?'':s.epa(t.substring(e+1));s.sqq[q]='';if(e>=0)s.pt(t.substring(0,e),',','sqs',q);return 0};s.sqs=function(un,q){var s=this;s.squ[u" -+"n]=q;return 0};s.sq=function(q){var s=this,k='s_sq',v=s.c_r(k),x,c=0;s.sqq=new Object;s.squ=new Object;s.sqq[q]='';s.pt(v,'&','sqp',0);s.pt(s.un,',','sqs',q);v='';for(x in s.squ)if(x&&(!Object||!Ob" -+"ject.prototype||!Object.prototype[x]))s.sqq[s.squ[x]]+=(s.sqq[s.squ[x]]?',':'')+x;for(x in s.sqq)if(x&&(!Object||!Object.prototype||!Object.prototype[x])&&s.sqq[x]&&(x==q||c<2)){v+=(v?'&':'')+s.sqq" -+"[x]+'='+s.ape(x);c++}return s.c_w(k,v,0)};s.wdl=new Function('e','var s=s_c_il['+s._in+'],r=true,b=s.eh(s.wd,\"onloaddisabled\"),i,o,oc;if(b)r=this[b](e);for(i=0;i=0)&&oc.indexOf(\".tl(\")<0)s.eh(o,\"onclick\",0,s.lc);}return r');s.wds=function(){var s=this;if(s.apv>3&&(!s.isie|" -+"|!s.ismac||s.apv>=5)){if(s.b&&s.b.attachEvent)s.b.attachEvent('onclick',s.bc);else if(s.b&&s.b.addEventListener)s.b.addEventListener('click',s.bc,false);else s.eh(s.wd,'onloaddisabled',0,s.wdl)}};s.vs=func" -+"tion(x){var s=this,v=s.visitorSampling,g=s.visitorSamplingGroup,k='s_vsn_'+s.un+(g?'_'+g:''),n=s.c_r(k),e=new Date,y=e.getYear();e.setYear(y+10+(y<1900?1900:0));if(v){v*=100;if(!n){if(!s.c_w(k,x,e)" -+")return 0;n=x}if(n%10000>v)return 0}return 1};s.dyasmf=function(t,m){if(t&&m&&m.indexOf(t)>=0)return 1;return 0};s.dyasf=function(t,m){var s=this,i=t?t.indexOf('='):-1,n,x;if(i>=0&&m){var n=t.subst" -+"ring(0,i),x=t.substring(i+1);if(s.pt(x,',','dyasmf',m))return n}return 0};s.uns=function(){var s=this,x=s.dynamicAccountSelection,l=s.dynamicAccountList,m=s.dynamicAccountMatch,n,i;s.un=s.un.toLowe" -+"rCase();if(x&&l){if(!m)m=s.wd.location.host;if(!m.toLowerCase)m=''+m;l=l.toLowerCase();m=m.toLowerCase();n=s.pt(l,';','dyasf',m);if(n)s.un=n}i=s.un.indexOf(',');s.fun=i<0?s.un:s.un.substring(0,i)};" -+"s.sa=function(un){var s=this;s.un=un;if(!s.oun)s.oun=un;else if((','+s.oun+',').indexOf(','+un+',')<0)s.oun+=','+un;s.uns()};s.m_i=function(n,a){var s=this,m,f=n.substring(0,1),r,l,i;if(!s.m_l)s.m_" -+"l=new Object;if(!s.m_nl)s.m_nl=new Array;m=s.m_l[n];if(!a&&m&&m._e&&!m._i)s.m_a(n);if(!m){m=new Object,m._c='s_m';m._in=s.wd.s_c_in;m._il=s._il;m._il[m._in]=m;s.wd.s_c_in++;m.s=s;m._n=n;m._l=new Ar" -+"ray('_c','_in','_il','_i','_e','_d','_dl','s','n','_r','_g','_g1','_t','_t1','_x','_x1','_rs','_rr','_l');s.m_l[n]=m;s.m_nl[s.m_nl.length]=n}else if(m._r&&!m._m){r=m._r;r._m=m;l=m._l;for(i=0;i=0)x(s);else s.m_m(\"x\",n,x,e)}m=s.m_i(n,1);if(m._dl)m._dl=m._d=0;s.dlt();return f');s.m_m=function(t,n,d,e){t='_'+t;var s=this,i,x,m,f='_'+t,r=0,u;if(s.m_l&&s.m_nl)for(i=0;i=0){if(d&&e)u=m[t](d,e);else if(d)u=m[t](d);else u=m[t]()}}if(u)r=1;u=m[t+1];if(u&&!m[f]){if((''+u).indexO" -+"f('function')>=0){if(d&&e)u=m[t+1](d,e);else if(d)u=m[t+1](d);else u=m[t+1]()}}m[f]=1;if(u)r=1}}return r};s.m_ll=function(){var s=this,g=s.m_dl,i,o;if(g)for(i=0;i=0){g=n.substring(i+1);n=n.substring(0,i)}else " -+"g=\"m_\"+n;m=s.m_i(n)}if((l||(n&&!s.m_a(n,g)))&&u&&s.d&&c&&s.d.createElement){if(d){m._d=1;m._dl=1}if(ln){if(s.ssl)u=s.rep(u,'http:','https:');i='s_s:'+s._in+':'+n+':'+g;b='var s=s_c_il['+s._in+']," -+"o=s.d.getElementById(\"'+i+'\");if(s&&o){if(!o.l&&s.wd.'+g+'){o.l=1;if(o.i)clearTimeout(o.i);o.i=0;s.m_a(\"'+n+'\",\"'+g+'\"'+(e?',\"'+e+'\"':'')+')}';f2=b+'o.c++;if(!s.maxDelay)s.maxDelay=250;if(!" -+"o.l&&o.c<(s.maxDelay*2)/100)o.i=setTimeout(o.f2,100)}';f1=new Function('e',b+'}');tcf=new Function('s','c','i','u','f1','f2','var e,o=0;try{o=s.d.createElement(\"script\");if(o){o.type=\"text/javas" -+"cript\";'+(n?'o.id=i;o.defer=true;o.onloaddisabled=o.onreadystatechange=f1;o.f2=f2;o.l=0;':'')+'o.src=u;c.appendChild(o);'+(n?'o.c=0;o.i=setTimeout(f2,100)':'')+'}}catch(e){o=0}return o');o=tcf(s,c,i,u,f1," -+"f2)}else{o=new Object;o.n=n+':'+g;o.u=u;o.d=d;o.l=l;o.e=e;g=s.m_dl;if(!g)g=s.m_dl=new Array;i=0;while(i=s.maxDelay){s.dll[i]=0;s.t(vo)}else f=1}}if(s.dli)clearTimeout(s.dli);s.dli=0;if(f){if(!s.dli)s.dli=setTimeout(s.dlt,s.maxDelay)}else s.dll=0');s.d" -+"l=function(vo){var s=this,d=new Date;if(!vo)vo=new Object;s.pt(s.vl_g,',','vo2',vo);vo._t=d.getTime();if(!s.dll)s.dll=new Array;s.dll[s.dll.length]=vo;if(!s.maxDelay)s.maxDelay=250;s.dlt()};s.t=fun" -+"ction(vo,id){var s=this,trk=1,tm=new Date,sed=Math&&Math.random?Math.floor(Math.random()*10000000000000):tm.getTime(),sess='s'+Math.floor(tm.getTime()/10800000)%10+sed,y=tm.getYear(),vt=tm.getDate(" -+")+'/'+tm.getMonth()+'/'+(y<1900?y+1900:y)+' '+tm.getHours()+':'+tm.getMinutes()+':'+tm.getSeconds()+' '+tm.getDay()+' '+tm.getTimezoneOffset(),tcf,tfs=s.gtfs(),ta=-1,q='',qs='',code='',vb=new Objec" -+"t;s.gl(s.vl_g);s.uns();s.m_ll();if(!s.td){var tl=tfs.location,a,o,i,x='',c='',v='',p='',bw='',bh='',j='1.0',k=s.c_w('s_cc','true',0)?'Y':'N',hp='',ct='',pn=0,ps;if(String&&String.prototype){j='1.1'" -+";if(j.match){j='1.2';if(tm.setUTCDate){j='1.3';if(s.isie&&s.ismac&&s.apv>=5)j='1.4';if(pn.toPrecision){j='1.5';a=new Array;if(a.forEach){j='1.6';i=0;o=new Object;tcf=new Function('o','var e,i=0;try" -+"{i=new Iterator(o)}catch(e){}return i');i=tcf(o);if(i&&i.next)j='1.7'}}}}}if(s.apv>=4)x=screen.width+'x'+screen.height;if(s.isns||s.isopera){if(s.apv>=3){v=s.n.javaEnabled()?'Y':'N';if(s.apv>=4){c=" -+"screen.pixelDepth;bw=s.wd.innerWidth;bh=s.wd.innerHeight}}s.pl=s.n.plugins}else if(s.isie){if(s.apv>=4){v=s.n.javaEnabled()?'Y':'N';c=screen.colorDepth;if(s.apv>=5){bw=s.d.documentElement.offsetWid" -+"th;bh=s.d.documentElement.offsetHeight;if(!s.ismac&&s.b){tcf=new Function('s','tl','var e,hp=0;try{s.b.addBehavior(\"#default#homePage\");hp=s.b.isHomePage(tl)?\"Y\":\"N\"}catch(e){}return hp');hp=" -+"tcf(s,tl);tcf=new Function('s','var e,ct=0;try{s.b.addBehavior(\"#default#clientCaps\");ct=s.b.connectionType}catch(e){}return ct');ct=tcf(s)}}}else r=''}if(s.pl)while(pn=0&&oc.indexOf(\".s_oc(\")<0)||oc.indexOf(\".tl(\")>=0)return ''}if(n)ta=o.target;h=s.oh(o);i=h.indexOf('?');h=s.linkLeaveQueryString||i<0?h:h.substring(0,i);l=s.linkName" -+";t=s.linkType?s.linkType.toLowerCase():s.lt(h);if(t&&(h||l))q+='&pe=lnk_'+(t=='d'||t=='e'?s.ape(t):'o')+(h?'&pev1='+s.ape(h):'')+(l?'&pev2='+s.ape(l):'');else trk=0;if(s.trackInlineStats){if(!p){p=" -+"s.pageURL;w=0}t=s.ot(o);i=o.sourceIndex;if(s.gg('objectID')){n=s.gg('objectID');x=1;i=1}if(p&&n&&t)qs='&pid='+s.ape(s.fl(p,255))+(w?'&pidt='+w:'')+'&oid='+s.ape(s.fl(n,100))+(x?'&oidt='+x:'')+'&ot=" -+"'+s.ape(t)+(i?'&oi='+i:'')}}if(!trk&&!qs)return '';s.sampled=s.vs(sed);if(trk){if(s.sampled)code=s.mr(sess,(vt?'&t='+s.ape(vt):'')+s.hav()+q+(qs?qs:s.rq()),0,id,ta);qs='';s.m_m('t');if(s.p_r)s.p_r(" -+");s.referrer=''}s.sq(qs);}else{s.dl(vo);}if(vo)s.pt(s.vl_g,',','vo1',vb);s.lnk=s.eo=s.linkName=s.linkType=s.wd.s_objectID=s.ppu=s.pe=s.pev1=s.pev2=s.pev3='';if(s.pg)s.wd.s_lnk=s.wd.s_eo=s.wd.s_link" -+"Name=s.wd.s_linkType='';if(!id&&!s.tc){s.tc=1;s.flushBufferedRequests()}return code};s.tl=function(o,t,n,vo){var s=this;s.lnk=s.co(o);s.linkType=t;s.linkName=n;s.t(vo)};if(pg){s.wd.s_co=function(o)" -+"{var s=s_gi(\"_\",1,1);return s.co(o)};s.wd.s_gs=function(un){var s=s_gi(un,1,1);return s.t()};s.wd.s_dc=function(un){var s=s_gi(un,1);return s.t()}}s.ssl=(s.wd.location.protocol.toLowerCase().inde" -+"xOf('https')>=0);s.d=document;s.b=s.d.body;if(s.d.getElementsByTagName){s.h=s.d.getElementsByTagName('HEAD');if(s.h)s.h=s.h[0]}s.n=navigator;s.u=s.n.userAgent;s.ns6=s.u.indexOf('Netscape6/');var ap" -+"n=s.n.appName,v=s.n.appVersion,ie=v.indexOf('MSIE '),o=s.u.indexOf('Opera '),i;if(v.indexOf('Opera')>=0||o>0)apn='Opera';s.isie=(apn=='Microsoft Internet Explorer');s.isns=(apn=='Netscape');s.isope" -+"ra=(apn=='Opera');s.ismac=(s.u.indexOf('Mac')>=0);if(o>0)s.apv=parseFloat(s.u.substring(o+6));else if(ie>0){s.apv=parseInt(i=v.substring(ie+5));if(s.apv>3)s.apv=parseFloat(i)}else if(s.ns6>0)s.apv=" -+"parseFloat(s.u.substring(s.ns6+10));else s.apv=parseFloat(v);s.em=0;if(s.em.toPrecision)s.em=3;else if(String.fromCharCode){i=escape(String.fromCharCode(256)).toUpperCase();s.em=(i=='%C4%80'?2:(i==" -+"'%U0100'?1:0))}s.sa(un);s.vl_l='dynamicVariablePrefix,visitorID,vmk,visitorMigrationKey,visitorMigrationServer,visitorMigrationServerSecure,ppu,charSet,visitorNamespace,cookieDomainPeriods,cookieLi" -+"fetime,pageName,pageURL,referrer,currencyCode';s.va_l=s.sp(s.vl_l,',');s.vl_t=s.vl_l+',variableProvider,channel,server,pageType,transactionID,purchaseID,campaign,state,zip,events,products,linkName," -+"linkType';for(var n=1;n<76;n++)s.vl_t+=',prop'+n+',eVar'+n+',hier'+n+',list'+n;s.vl_l2=',tnt,pe,pev1,pev2,pev3,resolution,colorDepth,javascriptVersion,javaEnabled,cookiesEnabled,browserWidth,browse" -+"rHeight,connectionType,homepage,plugins';s.vl_t+=s.vl_l2;s.va_t=s.sp(s.vl_t,',');s.vl_g=s.vl_t+',trackingServer,trackingServerSecure,trackingServerBase,fpCookieDomainPeriods,disableBufferedRequests" -+",mobile,visitorSampling,visitorSamplingGroup,dynamicAccountSelection,dynamicAccountList,dynamicAccountMatch,trackDownloaddisabledLinks,trackExternalLinks,trackInlineStats,linkLeaveQueryString,linkDownloaddisabledF" -+"ileTypes,linkExternalFilters,linkInternalFilters,linkTrackVars,linkTrackEvents,linkNames,lnk,eo,_1_referrer';s.va_g=s.sp(s.vl_g,',');s.pg=pg;s.gl(s.vl_g);if(!ss)s.wds()", -w=window,l=w.s_c_il,n=navigator,u=n.userAgent,v=n.appVersion,e=v.indexOf('MSIE '),m=u.indexOf('Netscape6/'),a,i,s;if(un){un=un.toLowerCase();if(l)for(i=0;i=0){j=x.indexOf(d,i);a[a.length]=x.subst" -+"ring(i,j<0?x.length:j);i=j;if(i>=0)i+=d.length}}return a"); -w.s_jn=new Function("a","d","var x='',i,j=a.length;if(a&&j>0){x=a[0];if(j>1){if(a.join)x=a.join(d);else for(i=1;i0){d=x.substring(0,i);x=x.substring(i+2);l=s_sp(l,'');for(i=0;i<62;i++)l2[l[i]]=i;t=s_sp(t,'');d" -+"=s_sp(d,'~');i=0;while(i<5){v=0;if(x.indexOf(t[i])>=0) {x2=s_sp(x,t[i]);for(j=1;j=0)x=s_rep(x,w,t[i]);i++;b+=62}}}return x"); -w.s_fe=new Function("c","return s_rep(s_rep(s_rep(c,'\\\\','\\\\\\\\'),'\"','\\\\\"'),\"\\n\",\"\\\\n\")"); -w.s_fa=new Function("f","var s=f.indexOf('(')+1,e=f.indexOf(')'),a='',c;while(s>=0&&s=0){s++;d=1;q='';x=0;f=c.substring(s);a=s_fa(f);e=o=c.indexOf('{',s);e++;while(d>0){h=c.substring(e,e+1);if(q){i" -+"f(h==q&&!x)q='';if(h=='\\\\')x=x?0:1;else x=0}else{if(h=='\"'||h==\"'\")q=h;if(h=='{')d++;if(h=='}')d--}if(d>0)e++}c=c.substring(0,s)+'new Function('+(a?a+',':'')+'\"'+s_fe(c.substring(o+1,e))+'\")" -+"'+c.substring(e+1);s=c.indexOf('=function(')}return c;"); -c=s_d(c);if(e>0){a=parseInt(i=v.substring(e+5));if(a>3)a=parseFloat(i)}else if(m>0)a=parseFloat(u.substring(m+10));else a=parseFloat(v);if(a>=5&&v.indexOf('Opera')<0&&u.indexOf('Opera')<0){w.s_c=new Function("un","pg","ss","var s=this;"+c);return new s_c(un,pg,ss)}else s=new Function("un","pg","ss","var s=new Object;"+s_ft(c)+";return s");return s(un,pg,ss)} \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/app/bbccom/19_61/bbccom.js b/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/app/bbccom/19_61/bbccom.js deleted file mode 100755 index 6c702097a..000000000 --- a/mobile/android/tests/browser/chrome/tp5/bbc.co.uk/news.bbcimg.co.uk/js/app/bbccom/19_61/bbccom.js +++ /dev/null @@ -1 +0,0 @@ -gloaddisableder.loaddisabled(["glow","1","glow.dom","glow.anim","glow.events","glow.embed"],{onLoad:function(A){BBC.adverts=function(){var AM="undefined",s="keyValues",AY="slots",u="ads",P=0,l="",p="/",K=";",Ak="=",Ae="bbccom_display_none",Ac=' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - -
- - -
-
- -

- BBC News - - 8 April 2011 -Last updated at 17:54 ET - -

- - -
- -
- - - - RSS feed - - - -
- - - -
- - -
- -
- - - - -
- - - -
-
- -
- - - - - - -
- - -
- - -
- -
- - - - - -
- - -

- Blame game as US shutdown loomsJohn Boehner -

- - -

Republicans and Democrats offer starkly different reasons for an impasse in talks on US spending cuts as the clock ticks down towards a government shutdown.

- -
-
- - - - - - - - -
- - -
- - - - - - - - - - - - - -

- Protest in Deraa filmed on mobile phoneSyrian city hit by deadly clashes -

- -

At least 23 demonstrators are reported killed in anti-government rallies in the Syrian city of Deraa, as renewed protests spread across the country.

- - -
-
- - - - - - - - - -
- - -
- - - - - - - - - - - - - -

- Police boarding HMS AstuteShooting attack on UK nuclear sub -

- -

One person is killed and another is in a life-threatening condition after a shooting on board a British nuclear submarine.

- - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - -
- - -
- - -
- -
- - -
-

Business

- - - - - - - - - - - - - - - - -
- - - - -
-

Technology

- - - - - - - - - - - - - - - - -
- - - - -
-

Entertainment/Arts

- - - - - - - - - - - - - - - - -
- - - - -
-

Science/Env

- - - - - - - - - - - - - - - - -
- - -
-
- - -
-

Health

- - - - - - - - - - - - - - - - -
- - - - -
-

Have Your Say

- - - - - - - - - - - - - - - - -
- - - - -
-

Magazine

- - - - - - - - - - - - - - - - -
- - - - -
-

Also In The News

- - - - - - - - - - - - - - - - -
- - -
-
- - - - - - -
- -
-

World News

- - -
- -
-

US & Canada

- - - - - - - - - - - - - - - -
- - -
-

Latin America

- - - - - - - - - - - - - - - -
- - -
-

Africa

- - - - - - - - - - - - - - - -
- - -
-

Asia-Pacific

- - - - - - - - - - - - - - - -
- -
-
- -
-

Europe

- - - - - - - - - - - - - - - -
- - -
-

Middle East

- - - - - - - - - - - - - - - -
- - -
-

South Asia

- - - - - - - - - - - - - - - -
- -
-
- - - -
- - - -
-

UK News

- - -
- -
- - - -
- -
- -
- - -
- -

- Special Reports -

- - -
- - - - -
- - - - - - - - - - - - - - -

- Kate Middleton's engagement ringBritain's Royal Wedding -

-

News and features on the royal engagement

- - -
- -
- - -
- -
-

More Special Reports:

- -
-
- -
- - - - - - - -
-

BBC World Service

-

News and analysis in 32 languages

- -
Languages continued (2 of 4)
- -
Languages continued (3 of 4)
- -
Languages continued (4 of 4)
- - -
- - -
- - -
- -
- -
- -
- - - -
- - -
- -

Watch/Listen

- -
- - - -
- -
- - - - - -
- - - - -
- - - -
-
- - -
- - -
- -
- - -
- - -
-

Features & Analysis

- -
    - - - - - - - - - - -
  • - - - - - - - - - - - - - - -

    - An Iron Dome battery outside Ashkelon (4 April 2011)'Iron Dome' -

    - -

    Israel's missile defence system may be a game changer

    - -
    -
  • - - -
  • - - - - - - - - - - - - - - -

    - A Humboldt penguin swims at a zoo in Lusisenpark, Mannheim, Germany, on 8/4/11Day in pictures -

    - -

    Striking images from around the world

    - -
    -
  • - - -
  • - - - - - - - - - - - - - - -

    - Man holding wedding ringRing thing -

    - -

    When did most men start wearing wedding bands?

    - -
    -
  • - - -
  • - - - - - - - - - - - - - - -

    - ArnieIt's quiz time! -

    - -

    Arnie said he'd be back - but what as?

    - -
    -
  • - - - - - - - - - - - - - - - - -
  • - - - - - - - - - - - - - - -

    - LOL's triumph -

    - -

    How did a little web acronym spread so fast?

    - -
  • - - -
  • - - - - - - - - - - - - - - -

    - Driving on ice -

    - -

    No seatbelts allowed on Europe's longest road over frozen sea From our own correspondent -

    - -
  • - - -
  • - - - - - - - - - - - - - - -

    - Unloved US -

    - -

    Rage against America breaks out in Afghanistan and Pakistan

    - -
  • - - - - - - -
-
- - -
- - - - - -
-
- -

Elsewhere on BBC News

- -
    - - - -
  • - - - - - - - - - - - - - -

    - AppsAn app for that -

    -

    In a competitive, developing marketplace will apps remain a feature of business?

    -
  • -
- -
- -
- - -
- - - -
- -
- -
-
-

Market Data

-

Last Updated at 17:56 ET

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Market indexCurrent valueTrendVariation% variation
Dow Jones12380.05Down-29.44-0.24%
Nasdaq2780.41Down-15.72-0.56%
S&P 5001328.17Down-5.34-0.40%
FTSE 1006055.75Up48.380.81%
Dax7217.02Up38.240.53%
BBC Global 305727.44Up2.060.02%
- - -
- - -
- -
- - -
- - - - -
- - - - - -
- - - - -
-

Programmes

- - - -
    - - - -
  • - - - - - - - - - - - - - -

    - A scientist monitors radiationClick Listen -

    -

    How radiation level readings from Japan are being crowd-sourced

    -
    -
  • -
- -
-

BBC World Service

- -
- -
- - -
- -
- - -
- -
- - -
- - - -
- - -
- -
- - - - - - -

bbc.co.uk navigation

BBC © 2011 The BBC is not responsible for the content of external sites. Read more.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/blst.msn.com/as/wea3/i/en-us/law/30.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/blst.msn.com/as/wea3/i/en-us/law/30.gif deleted file mode 100755 index 992699f4d..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/blst.msn.com/as/wea3/i/en-us/law/30.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/23/6B8E88315584A40B04E32D89551E.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/23/6B8E88315584A40B04E32D89551E.jpg deleted file mode 100755 index e37353323..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/23/6B8E88315584A40B04E32D89551E.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/2F/9EFAECEC174B21FB83D10C82522D2.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/2F/9EFAECEC174B21FB83D10C82522D2.jpg deleted file mode 100755 index a2dd41298..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/2F/9EFAECEC174B21FB83D10C82522D2.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/38/FAF3346E94CF4579ECAB641703868.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/38/FAF3346E94CF4579ECAB641703868.jpg deleted file mode 100755 index 4b3ccca52..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/38/FAF3346E94CF4579ECAB641703868.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/5B/CC662FC6233C7449D9C7F9796801D.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/5B/CC662FC6233C7449D9C7F9796801D.jpg deleted file mode 100755 index 53cf4bdbb..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/5B/CC662FC6233C7449D9C7F9796801D.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/76/CAF5FAB7F245F96327F2B4C806D.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/76/CAF5FAB7F245F96327F2B4C806D.jpg deleted file mode 100755 index c9aa55971..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/76/CAF5FAB7F245F96327F2B4C806D.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/80/82E2A652E4A790B140675E74293AD6.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/80/82E2A652E4A790B140675E74293AD6.jpg deleted file mode 100755 index 75bd58519..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/80/82E2A652E4A790B140675E74293AD6.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/B7/EB75D45B8948F72EE451223E95A96.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/B7/EB75D45B8948F72EE451223E95A96.gif deleted file mode 100755 index d316f8451..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/B7/EB75D45B8948F72EE451223E95A96.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/CE/19F603C3122D48B6554BBD495195.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/CE/19F603C3122D48B6554BBD495195.jpg deleted file mode 100755 index d65e93190..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/CE/19F603C3122D48B6554BBD495195.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/CF/59B3CB34EF11B221719175143187.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/CF/59B3CB34EF11B221719175143187.jpg deleted file mode 100755 index dd51c1c30..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/CF/59B3CB34EF11B221719175143187.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/D8/41FF8CA0A47CC8208E684FA1BE6D6.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/D8/41FF8CA0A47CC8208E684FA1BE6D6.jpg deleted file mode 100755 index 8f8798743..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/D8/41FF8CA0A47CC8208E684FA1BE6D6.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/E2/37BA92E210D341BFDBF4126422A3D2.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/E2/37BA92E210D341BFDBF4126422A3D2.gif deleted file mode 100755 index 3abac737e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/E2/37BA92E210D341BFDBF4126422A3D2.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/EA/9BECE90994978BFAE6F38561515E8.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/EA/9BECE90994978BFAE6F38561515E8.jpg deleted file mode 100755 index b499cbd70..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/EA/9BECE90994978BFAE6F38561515E8.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/FF/6B3EB94D554DA0488C66DC31482D48.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/FF/6B3EB94D554DA0488C66DC31482D48.jpg deleted file mode 100755 index 0505af37b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stb.s-msn.com/i/FF/6B3EB94D554DA0488C66DC31482D48.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/gbl/lg/csl/favicon.ico b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/gbl/lg/csl/favicon.ico deleted file mode 100755 index a7e042d65..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/gbl/lg/csl/favicon.ico and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/css/1d/b0ebeba5ed4ca3c158e6d6059f5074.css b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/css/1d/b0ebeba5ed4ca3c158e6d6059f5074.css deleted file mode 100755 index 86da9d146..000000000 --- a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/css/1d/b0ebeba5ed4ca3c158e6d6059f5074.css +++ /dev/null @@ -1 +0,0 @@ -#wrapper .w12,#wrapper.w12{min-width:972px;width:81em}.pa{margin:0 auto;padding:1em .5em}.pa #content,.pa #area1,.pa #area2,.pa #area3{float:left}.pa #subfoot{clear:both}.pa #area2,.pa #area3{margin-left:1em}.pa #page:after{clear:both;content:".";display:block;height:0;visibility:hidden}#wrapper{padding:1em 0;text-align:left;margin:0 auto}#wrapper .w1{min-width:70px;width:5.833em}#wrapper .w2{min-width:152px;width:12.667em}#wrapper .w3{min-width:234px;width:19.5em}#wrapper .w3 .w50{min-width:111px;width:9.25em}#wrapper .w4{min-width:316px;width:26.333em}#wrapper .w4 .w33{min-width:97px;width:8.083em}#wrapper .w4 .ce3.w33{min-width:98px;width:8.167em}#wrapper .w5{min-width:398px;width:33.167em}#wrapper .w5 .w33{min-width:124px;width:10.333em}#wrapper .w5 .ce2.w33,#wrapper .w5 .ce3.w33{min-width:125px;width:10.417em}#wrapper .w5 .w50{min-width:193px;width:16.083em}#wrapper .w6{min-width:480px;width:40em}#wrapper .w7{min-width:562px;width:46.833em}#wrapper .w7 .w33{min-width:179px;width:14.917em}#wrapper .w7 .ce3.w33{min-width:180px;width:15em}#wrapper .w7 .w50{min-width:275px;width:22.917em}#wrapper .w8{min-width:644px;width:53.667em}#wrapper .w8 .w33{min-width:206px;width:17.167em}#wrapper .w8 .ce1.w33,#wrapper .w8 .ce3.w33{min-width:206px;width:17.167em}#wrapper .w9{min-width:726px;width:60.5em}#wrapper .w9 .w50{min-width:357px;width:29.75em}#wrapper .w10{min-width:808px;width:67.333em}#wrapper .w10 .w33{min-width:261px;width:21.75em}#wrapper .w10 .ce3.w33{min-width:262px;width:21.833em}#wrapper .w11{min-width:890px;width:74.167em}#wrapper .w11 .w33{min-width:288px;width:24em}#wrapper .w11 .ce2.w33,#wrapper .w11 .ce3.w33{min-width:289px;width:24.083em}#wrapper .w11 .w50{min-width:439px;width:36.583em}#wrapper .w12{min-width:972px;width:81em}#head{min-width:972px;background:transparent}#page{min-width:972px;background:#fff}#nav{min-width:972px;background:transparent}#content{background:transparent}#foot{min-width:972px;background:transparent}#wrapper .wings{background-color:#009ad9;height:1.667em;min-width:81em;width:100%}a.more,div.br *,.cotb *,.coss *{font-family:arial,sans-serif}@media print{form,object{display:none}}a,a:link,a:visited{color:#333;text-decoration:none}a:hover,a:hover span{color:#000;text-decoration:underline}a img{border:none}input,select,textarea{font-size:15px;line-height:normal}big,div.h2,div.h3,h1,h2,h3,h4,h5,h6,small{font-family:arial,sans-serif;font-size:100%;margin:0;padding:0}.cf:after,ul.cf li:after,.ro:after{clear:both;content:".";display:block;height:0;visibility:hidden}.none{display:none}#wrapper .grsep{border-bottom:solid 1px #e1e1e1}#wrapper .headerbar2,#wrapper .breaknews1,#wrapper .ad1,#wrapper .alert1,#wrapper .hotmail1,#wrapper .spotlight1,#wrapper .msnfoot1,#wrapper #area2 .linkedimg1{margin:.667em}#wrapper .money1,#wrapper .sponad1{margin:0 0 0 .667em}#wrapper .shopping1 ul.linklist22 li.last{border-bottom:solid 1px #e1e1e1}#wrapper .local1 .simple8 div.loclist ul li{clear:both;float:none}body{background:transparent url(../../i/1a/57011fe37f98be0ee74ce87a62ba9b.png) no-repeat top center;color:#333;font-family:arial,sans-serif;font-size:75%;line-height:1.33em;margin:0;padding:0;text-align:center}#wrapper #hotmail{margin:.457em .667em 2.33em}#wrapper #content #stgsearch{margin-top:-.21em}#wrapper #content #gendermodule{margin-top:1.418em}.exphd .wlcard1 ul li.tolatino{float:right;border-left:none;border-right:1px solid #999;padding-right:5px}.localshopping h3.cf{border-bottom:1px solid #d7d7d7;padding-bottom:.8333em}.dating1 .complex1 fieldset.last input{padding-top:.167em;padding-bottom:.167em}.dating1 .complex1 fieldset.last input.button{background-color:#009ad9}.dating1 .complex1 fieldset.last input.button:hover{background-color:#33aee1;cursor:pointer}.dating1 .complex1 fieldset.last label,.dating1 .complex1 fieldset.last select{margin-top:.167em}.dating1 .br2 .complex1 label{color:#333}.dating1 .linkedimglinklist8 span{color:#666}.dating1 #cff1 select{height:21px;width:108px}.dating1 #agemin,.dating1 #agemax{height:21px;width:46px}#wrapper #area2 .dating1 .linkedimg1{margin-left:0;margin-right:0}.dating1 .complex1 fieldset.last #txtlocation{margin-right:.667em;width:4.333em}.dating1 .complex1 fieldset.last .button{width:8.333em}.w12 .generic1 div.br{margin:0}.w12 .generic1 .linkedimg1 img{vertical-align:top}.dating1 .br3 img{vertical-align:bottom}.dating1 .complex1 fieldset.last label{margin-right:.667em}#wrapper #tg{background:transparent url(../../i/62/b5797d19976f0955d6d5d5c87ec996.jpg) no-repeat top center}#stk_head .single2{margin:.6em 0 0 .4em}#stk_data .simple8 input.text{color:#666;margin:0 .167em 0 .083em}#stk_data .simple8 div div{padding:0 .083em .083em}#stk_data .simple8 .image{vertical-align:bottom}#wrapper .ce .sponad1{margin:0}.sponad1 .richtext p{margin:.583em 0 0}.sponad1 .m16{margin:.667em 0}#stk_data .linklist16{margin-top:-.5em}#stk_data .linklist16 li{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2236px;padding:.333em 0 .333em 1.583em}.headerbar_us .websearch2 .opt,.headerbar_us .websearch2 span{color:#666}.dating1 .linkedimglinklist8,.dating1 .br2,.dating1 .br3{margin-left:.333em}.dating1 .h3{background-color:#fff;padding-bottom:.5em}#nav .pa{padding-top:0}.headerbar_us .pgopt1{float:none}#page .menunavbar1{margin:0 auto .667em}#page .menunavbar1 .ntier1{background-color:#009ad9}.scp1 .headline .first .richtext{margin-top:1.167em}div.hlcpm1 .hcpep3 li{display:inline-block;float:none;vertical-align:top}.hlcpm1 .hcpep3 li,.hlcpm1 .hcpep3 li.media{line-height:1.5em;padding-top:.25em}.scp1 .npane span a,.scp1 .linkedimg span a{display:block}#wrapper .exphd{margin:0 0 22px}.exphd .wlcard1 ul li.first{border-left:0;line-height:20px}.exphd .wlcard1 ul li{border-left:solid 1px #999;display:inline;float:left;line-height:20px;margin-left:5px;padding-left:5px}.expblu .exphd .wlcard1 ul li,.expblu .exphd .wlcard1 ul li.myhp a{border-color:#fff}#wrapper .exphd .wlcard1 a{color:#999}.exphd .wlcard1 ul li.last{border-left:none;float:right}.exphd .wlcard1 ul{width:93%}.exphd .wlcard1 ul li.myhp a{padding-right:5px;border-right:solid 1px #999;font-weight:bold}.exphd .wlcard1 div{font-size:100%;float:left;margin-left:5px;padding-top:1px;line-height:16px}#wrapper #head .exphd .br4{clear:none;margin:0;padding-left:.417em;padding-top:1.25em}#wrapper #head .exphd .br2{display:block;float:left;min-width:16.7em;padding-top:0;width:200px}#wrapper .exphd .br1{width:100%;display:block;padding-bottom:.3em}#wrapper #head .exphd .br3{min-width:600px;padding-top:.9em;width:50em}.exphd .websearch2 .bi{padding:0 0 0 5px}#wrapper .exphd .websearch2 input.text{margin-top:7px;width:396px}.expfoot{min-width:600px;padding-top:.9em;width:50em}.expfoot .websearch2 .bi{padding:0 0 0 5px}#wrapper .expfoot .websearch2 input.text{margin-top:7px;width:396px}body.expht{background:none}.expht #wrapper{padding-top:0}.expht .headerbg,#wrapper #tg{background:transparent url(../../i/94/8b0fe9bcd1399077fdc9374e5f314d_1.png) no-repeat 0 0}.expht .exphd{padding-top:1em}.expht #head .ro .ce{position:relative;z-index:51}.expht .exphd .imgloaddisabledla{position:absolute;z-index:-1;top:0;left:0}.expht .exphd .br5{margin:5px 0 0 21.2%}.expht .exphd .br5 .richtext p{background:transparent url(../../i/11/999518480e3c07301320f84f4bd855.png) no-repeat scroll 0 0;padding-left:20px;margin:0}.thumb_h ul{padding-left:0;width:100%;height:6.2em;margin:0}.thumb_h ul li{background-color:#f1f1f1;margin:3px 2px 0 0;list-style:none;width:23%;float:left;padding:.44em;min-height:60px}.thumb_h ul .last{margin-right:0}.thumb_h a p{margin:0;height:5em}.thumb_h a img{float:left;margin-right:10px}.thumb_h ul li.selected{border:1px solid #009ad9;border-top-width:3px;margin-top:0;height:4.9em;background-color:#fff}.tfh .scp1 .npane li img{padding-bottom:8px}.tfh .scp1 .npane ul li{margin:3px 9px 0 0}.tfh .scp1 .npane ul .last{margin-right:0}.tfh .scp1 .npane ul a{font-size:1.2em;font-weight:bold;padding-bottom:1px}.tfh .scp1 .headline ul{padding-left:1.6em}.tfh .scp1 .npane,.tfh .scp1 .linkedimg{text-align:center}.tfh .co1b1{min-height:191px}.thumb_h ul li a{height:5em;display:block;color:#666}.thumb_h ul li.selected a{color:#333}.thumb_h ul li.selected a:hover span,.thumb_h ul li.selected a:hover{text-decoration:none}.thumb_v{float:left;margin-right:.75em}.thumb_v ul{padding:0;margin:0;width:100%}.thumb_v ul li{list-style:none;height:5em;min-height:60px;margin:0 0 1px 2px;background:#f1f1f1;width:17.9em;border:1px solid #f1f1f1}.thumb_v ul li a{height:5em;display:block;color:#666}.thumb_v ul li a span{display:block;padding-top:1.1em}.thumb_v ul li.selected a:hover span,.thumb_v ul li.selected a:hover{text-decoration:none}.thumb_v ul li.selected a{color:#333}.thumb_v ul .selected{border:1px solid #009ad9;border-left-width:3px;margin-left:0;background-color:#fff}.thumb_v ul li img{float:left;margin-right:.75em}.tfv .scp1 .npane li img{padding-bottom:8px}.tfv .scp1 .npane ul li{margin-right:10px}.tfv .scp1 .npane ul .last{margin-right:0}.tfv .scp1 .npane ul a{font-size:1.2em;font-weight:bold;text-align:left}.tfv .scp1 .headline ul{padding-left:20.6em}.tfv .scp1 .linkedimg .richtext{margin-bottom:3px}.tfv .scp1 .npane.n3{text-align:left}.tfv .scp1 .headline li{padding-top:0}.tfv .scp1 .linkedimg{margin-left:19em}#wrapper #content .cogr{margin:.6em 0 1.2em .4em}.tfv .headline div a,.tfh .headline div a{float:left}.tfv .headline div p a,.tfh .headline div p a{float:none}#infopane_hc .tfh div.co,#infopane_vc .tfv div.co{display:none}#infopane_hc .cof div.co,#infopane_vc .cof div.co{display:block}#wrapper #head .expsh{margin-bottom:17px}#wrapper #head .ro .expsh .br4{display:none;margin:0 auto;min-width:582px;padding:0 0 0 1.5em;width:50.4em}#wrapper #head .expsh .br3{margin-bottom:3px}#wrapper .expsh .br4 .richtext p{float:left;margin-bottom:0;margin-right:2px}#wrapper .expsh .br4 .prefix{float:left;margin-right:3px}#wrapper .expsh .br4 .resultlist{margin:0;padding:0}#wrapper .expsh .br4 .resultlist li{float:left;list-style:none}#wrapper .expsh .br4 .resultlist li.last{float:right}#wrapper .expsh .br4 .resultlist li.last a{color:#666}#wrapper .expsh .br4 .resultlist li a,#wrapper .headerbar2 .br5 .richtext p a{text-decoration:none}#wrapper .expsh .br4 .resultlist li a:hover,#wrapper .headerbar2 .br5 .richtext p a:hover{color:#000;text-decoration:underline}#wrapper .exphd .websearch2 .opt{position:absolute;margin-left:0}#wrapper .exphd .websearch2 .opt a{margin:0 3px}#wrapper .exphd .websearch2 .opt a.first{margin:0}#mq1 #msd{float:left;margin:-6.215em 0 0 17.8em}#mq1 br{display:none}#mq1 .br4{float:none;margin:-4.75em 0 0 35.2em}#mq1 .br3 .simple8 input.text{color:#666;width:12.55em;margin-left:6px}#mq1 .br3 .co3b1 .br2{float:left;margin-top:1.65em}#mq1 .br3 .co3b1 .br3{clear:none;float:left;margin-top:1.3em}#mq1 .br1 table{width:15.3em}#mq1 .br1 table td{line-height:1.16em;width:4.4em}#mq1 .br1 td.siidx{font-weight:bold;padding:0 0 .25em;width:auto}#mq1 .br1 td.silast{width:auto}#mq2 .br4{margin-left:.67em;margin-top:-6.92em}#mq2 .indices1 table{width:25.08em}#mq2 .indices1 td{margin:0;padding:0;width:6.17em}#mq2 .indices1 .siidx{font-weight:bold;width:6.58em}#mq2 .simple8 input.text{color:#666;margin-left:6px;width:22.42em}#mq2 .br3 .co3b1 .br2{float:left;margin-top:1.42em}#mq2 .br3 .co3b1 .br3{clear:none;margin-top:.58em}#mq1 .h2,#mq2 .h2{margin:0 0 .65em;width:98.8%}#mq1 .linklist16 li,#mq2 .linklist16 li{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2236px;display:list-item;line-height:1.98em;margin:0;padding:.083em 0 .083em 19px}#mq1 .simple8 div div,#mq2 .simple8 div div{border-color:#ccc;height:24px;padding:0}#mq1 .br2 .richtext,#mq2 .br2 .richtext{color:#707070;font-size:83%}#mq1 .br3 .co3b1 .br2 .richtext,#mq2 .br3 .co3b1 .br2 .richtext{color:#333;font-size:100%;padding-right:.4em}#mq1 .br3 .co3b1 .br2 .richtext{font-size:79%}#mq1 .simple8 input.image,#mq2 .simple8 input.image{margin-right:1px}#mq1 .linklist16 li span.media,#mq2 .linklist16 li span.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2351px;display:block;margin-left:-19px}#mq1 .linklist16 li span.media a,#mq2 .linklist16 li span.media a{display:block;margin-left:19px}.bottomline{border-bottom:solid 1px #bcbcbc}#wrapper div.scrollhead{background-color:#fff;min-width:972px;position:fixed;top:0;width:81em;z-index:60}.scrollheadheight{padding-top:14em}.scrollhead #nav .ro div.ce{position:static}.msnvideooverlayplayer{z-index:16777271}#heroplayer1internalgallerydiv_content object{visibility:visible!important}#popsrchnew .coa2 div.hr{margin:.7em 0}#popsrchnew .alist1 div.br2 h3,#popsrchnew .alist1 div.br3 h3,#popsrchnew .alist1 div.br4 h3{margin-bottom:0}#popsrchnew .hlcp2 .sec img.landscape{margin-bottom:.35em}#head .shortersrch #q{width:316px}.shortersrch .search{margin-top:1.4em}#wrapper .minihead{background-color:#009ad9;left:0;padding:.6em 0 1em;position:fixed;top:0;width:100%;z-index:60}#wrapper .minihead #tg{background:none}.minihead .headerbar_us{height:auto;min-height:0;width:81em;min-width:972px;margin:0 auto}.minihead .headerbar_us .br1,.minihead .headerbar_us .br2,.minihead .headerbar_us .scopes,.minihead .headerbar_us .br4 img,.minihead .headerbar_us .opt,.minihead .condbanner1{display:none}.minihead .headerbar_us .br4 a{background:transparent url(../../i/61/def0ebad64d00fda0702cb7b8179ea.png) no-repeat scroll 0 -132px;display:block;height:34px;width:77px}.minihead .headerbar_us .br3{height:0}.minihead .headerbar_us .br3 a{color:#fff;display:block;font-weight:normal;margin-top:10px}.minihead .headerbar_us .br3 a:link{font-weight:normal}.minihead .headerbar_us .br4{min-width:179px;padding-top:0;width:179px}.miniheadpageheight{padding-top:9.8em}#wrapper .minihead .w12{width:100%}#wrapper .minihead .headerbar_us .br5{padding-top:0;width:auto}#headl .headerbar_us .br4{padding-top:0;margin-bottom:.5em}#headl .headerbar_us .br5{margin:0}.lhemhp,.lhe{background-color:#009ad9;height:5.6em;left:0;position:fixed;top:0;width:100%;z-index:60}.lhe{height:4.5em}#wrapper .lhemhp #tg,#wrapper .lhe #tg{background:none}.lhemhp .headerbar_us,.lhe .headerbar_us{height:auto;margin:0 auto;min-height:0;min-width:972px;width:81em}.lhemhp .headerbar_us .br1,.lhemhp .headerbar_us .br2,.lhemhp .headerbar_us .br3,.lhemhp .headerbar_us .scopes,.lhemhp .headerbar_us .br4 img,.lhemhp .headerbar_us .opt,.lhemhp #nav,.lhe .headerbar_us .br1,.lhe .headerbar_us .br2,.lhe .headerbar_us .br3,.lhe .headerbar_us .scopes,.lhe .headerbar_us .br4 img,.lhe .headerbar_us .opt,.lhe #nav,.scrollhead .expandbuttoncontainer,.scrollhead .msnheadlogo,.scrollhead .mkhmhead a,.scrollhead #nav .ro,.lhe .condbanner1{display:none}.lhemhp #nav .ntier1,.lhe #nav .ntier1{background-color:transparent;display:none}.lhemhp .headerbar_us .br4,.lhe .headerbar_us .br4{margin-top:.5em;min-width:0;width:12em}.lhemhp .headerbar_us .br4{margin:1.2em 0 1.7em 0;padding-top:0}#wrapper .lhemhp .w12,#wrapper .lhe .w12{width:100%}.lhemhp .headerbar_us .br5{padding-top:0;margin-top:1.23em}.lhemhp .headerbar_us a.expandnavigation,.lhe .headerbar_us a.expandnavigation{border:solid 1px #fff;color:#fff;display:block;float:left;padding:6px 17px;margin-top:7px}.lhemhp .mhexpandhead{min-height:8px;margin-top:-.2em;padding-top:.8em}.lhemhp .headerbar_us .mhexpandhead a{color:#fff;display:block;font-weight:normal}.lhemhp .msnheadlogo,.lhemhp .headerbar_us .br4 a,.lhe .msnheadlogo,.lhe .headerbar_us .br4 a{background:transparent url(../../i/61/def0ebad64d00fda0702cb7b8179ea.png) no-repeat scroll 0 -132px;display:block;height:34px;width:77px}.lhe .headerbar_us .br5{margin-top:.6em}.expandbuttoncontainer{float:right;margin-right:.5em}.lhe .expandbuttoncontainer{margin-top:.5em}#subfoot .bingpulse1{margin-bottom:2.917em;overflow:hidden;padding-top:.833em}.bingpulse1 .br{display:inline;float:left;margin-left:10px;min-width:237px;width:19.75em}.bingpulse1 .br2,.bingpulse1 .br3{min-width:236px;width:19.667em}.bingpulse1 .br2,.bingpulse1 .br3,.bingpulse1 .br4{margin-left:0}.bingpulse1 .linklist1 li{background:url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2241px;color:#333;line-height:1.333em;margin-bottom:0;padding:0 0 .333em 12px}.bingpulse1 .linklist1 li.first{background:none;font-weight:bold;font-size:130%;margin-bottom:.416em;margin-left:-13px;padding-top:0}#subfoot .bingpulse1 .h2{margin-bottom:.5em;min-width:956px;width:79.667em}.srchhs{width:610px}.srchhs span{color:#333;float:left;font-weight:bold;margin-bottom:1.08em;padding-top:.21em}.srchhs ul{list-style:none outside none;margin:0;padding:0}.srchhs li{color:#333;float:left;margin:.23em 0 0 5px}.srchhs ul .last{float:right}.minihead .websearch2 .srchhs{margin-top:0;padding-top:4px}.minihead .websearch2 .srchhs span{margin:0}.minihead .headerbar_us .srchhs a,.minihead .websearch2 .srchhs span,.minihead .headerbar_us .srchhs li,.minihead .headerbar_us .srchhs a:hover{color:#fff}.srchhs.husearchbox,.minihead .srchhs.hlockedheader{display:none}.minihead div.srchhs{display:block}#head .headerbar_us{margin-top:0}.coa2.coc1 .h2,.cogr ul.cotb.coc1 li.tabsel span,.cogr ul.cotb.coc1{border-color:#009ad9}.coa2.coc1 div.hr,.coa3.coc1 div.hr,.coa3.coc1 .h2,.coa3.coc1 .h3{border-color:#ccebf7}.coa2.coc2 .h2,.cogr ul.cotb.coc2 li.tabsel span,.cogr ul.cotb.coc2{border-color:#89c655}.coa2.coc2 div.hr,.coa3.coc2 div.hr,.coa3.coc2 .h2,.coa3.coc2 .h3{border-color:#e2f1d4}.coa2.coc3 .h2,.cogr ul.cotb.coc3 li.tabsel span,.cogr ul.cotb.coc3{border-color:#bdbdbd}.coa2.coc3 div.hr,.coa3.coc3 div.hr,.coa3.coc3 .h2,.coa3.coc3 .h3{border-color:#e3e3e3}.m1{margin:.667em 0 0 0}.m2{margin:0 .5em 0 0}.m3{margin:0 0 .667em 0}.m4{margin:0 0 0 .5em}.m5{margin:.667em 0 .667em 0}.m6{margin-bottom:0;margin-top:0}.m7{margin:0 .5em 0 .5em}.m8{margin-left:0;margin-right:0}.m9{margin:.667em 0 0 .5em}.m10{margin:.667em .5em 0 0}.m11{margin:0 0 .667em .5em}.m12{margin:0 .5em .667em 0}.m13{margin:0 .5em .667em .5em}.m14{margin:.667em 0 .667em .5em}.m15{margin:.667em .5em 0 .5em}.m16{margin:.667em .5em .667em 0}.m17{margin:.667em .5em .667em .5em}.coa2.ruled{border-bottom:solid 1px #e1e1e1}.coa2 .h3{color:#333;font-weight:bold;line-height:1.43em;margin:0 0 .833em 0}.coa2 .h2 a,.coa2 .h2 a:link,.coa2 .h2 a:visited{color:#333}.coa2 .h2 a:hover,.coa2 .h2 a:active{color:#000}.coa2 .h3 a,.coa2 .h3 a:link,.coa2 .h3 a:visited{color:#333}.coa2 .h3 a:hover,.coa2 .h3 a:active{color:#000}.coa2 .h2 span.icon,.cogr ul.cotb li span.icon,.cogr ul.cotb li.tabsel span.icon{padding-left:.333em}.coa2 .h2 a span,.coa2 .h2 span span{padding:0}.coa2 .h2 a,.coa2 .h2 span{display:block;float:left;padding:0 0 .333em 0}#wrapper .coa2 .attr{border:0;bottom:-3px;float:right;position:relative}#wrapper .coa2 .attr,#wrapper .coa2 a.attr:link,#wrapper .coa2 a.attr:visited,#wrapper .coa2 a.more,#wrapper .coa2 a.more:link,#wrapper .coa2 a.more:visited{color:#666;font-size:92%;font-weight:normal}#wrapper .coa2 a.attr:hover,#wrapper .coa2 a.attr:active,#wrapper .coa2 a.more:hover,#wrapper .coa2 a.more:active{color:#333}.coa2 div.hr{border-top:solid 2px;margin:.833em 0}.cogr ul.cotb,.coa2 .h2{clear:both;font-weight:bold;line-height:normal;list-style-type:none;margin:0 0 .833em 0;padding:0;width:100%}.coa2 .h2{border-bottom:solid 3px;color:#333;font-weight:bold;line-height:normal}.cogr ul.cotb{border-bottom:solid 1px;background-color:#f1f1f1}.cogr ul.cotb li{float:left;list-style-type:none}.cogr ul.cotb li a,.cogr ul.cotb li span{display:block;float:left;font-size:100%;line-height:normal}.cogr ul.cotb li span span,.cogr ul.cotb li.tabsel span span,.cogr ul.cotb li a span{border:0;bottom:0;padding:0;margin:0;top:0}.cogr ul.cotb li span span span,.cogr ul.cotb li.tabsel span span span,.cogr ul.cotb li a span span{padding-left:.333em}.cogr ul.cotb li a{background-color:#f1f1f1;border-width:0 1px;border-color:#fff;border-style:solid;padding:.5em 1.333em .25em 1.333em;text-decoration:none}.cogr ul.cotb li a,.cogr ul.cotb li a:link,.cogr ul.cotb li a:visited{color:#666}.cogr .js ul.cotb li a:hover{color:#666;text-decoration:none}.cogr ul.cotb li a:hover,.cogr ul.cotb li a:active{color:#333;text-decoration:none}.cogr .js ul.cotb li a.hover{color:#333;text-decoration:none}.cogr ul.cotb li.tabsel span{background-color:#fff;border-style:solid;border-width:4px 1px 0 1px;bottom:-1px;color:#333;cursor:default;margin-left:-1px;margin-top:-4px;padding:.417em 1.333em .417em 1.333em;position:relative}.coa2 .h2 a span,.coa2 .h3 a span,.cogr ul.cotb li span{cursor:pointer}.cogr ul.cotb li.first a{border-left:0}.cogr ul.cotb li.last a{border-right:0}.cogr ul.cotb li a.hover,.cogr ul.cotb li a:hover{text-decoration:none}.coa2 .h2 img,.cogr ul.cotb li img{display:block;float:left;margin-bottom:.083em}.coa3.ruled{border-bottom:solid 1px #e1e1e1}.coa3 .h2,.coa3 .h3{border-style:solid;line-height:normal}.coa3 .h2{border-width:0 0 2px 0;font-weight:bold;font-size:117%}.coa3 .h3{border-width:0 0 1px 0;font-weight:normal}.coa3 .h2 a,.coa3 .h3 a,.coa3 .h2 span,.coa3 .h3 span{display:block;float:left}.coa3 .h2 span span,.coa3 .h2 a span,.coa3 .h3 span span,.coa3 .h3 a span{padding:0}.coa3 .h2 a,.coa3 .h2 span{padding:.47em 0}.coa3 .h3 a,.coa3 .h3 span{padding:.8em 0}#wrapper .coa3 .attr,#wrapper .coa3 a.attr:link,#wrapper .coa3 a.attr:visited{color:#666;font-size:86%;font-weight:normal;float:right}#wrapper .coa3 a.attr:hover,#wrapper .coa3 a.attr:active{color:#333}.coa3 a.more{display:block;float:none;padding:.58em 0 0 0}.coa3 div.hr{border-top:solid 2px;margin:.833em 0}.coa3 .h2 a span,.coa3 .h3 a span{cursor:pointer}.coa3 .h2 a,.coa3 .h2 a:link,.coa3 .h2 a:visited,.coa3 .h2 span{color:#333}.coa3 .h3 a,.coa3 .h3 a:link,.coa3 .h3 a:visited,.coa3 .h3 span{color:#333}.coa3 .more,.coa3 a.more,.coa3 a.more:link,.coa3 a.more:visited{color:#333}.coa3 .h2 a:hover,.coa3 .h2 a:active{color:#000}.coa3 .h3 a:hover,.coa3 .h3 a:active{color:#000}.coa3 a.more:hover,.coa3 a.more:active{color:#000}.coa4.ruled{border-bottom:solid 1px #e1e1e1}.coa4 .h2,.coa4 .h3{line-height:normal}.coa4 .h2 a,.coa4 .h3 a,.coa4 .h2 span,.coa4 .h3 span{display:block;float:left;padding:.5em .86em .286em .86em}.coa4 .h2 a,.coa4 .h2 span{font-weight:normal}.coa4 .h3 a,.coa4 .h3 span{padding:0;font-weight:normal}#wrapper .coa4 .attr{font-size:92%;font-weight:normal;float:right}.coa4 a.more{display:block;float:none}.coa4 div.hr{border-top:solid 2px;margin:.833em 0}.coa4 .h2 a span,.coa4 .h3 a span{cursor:pointer}#wrapper .headerbar2 .br2{clear:none;padding-left:.417em}#wrapper .headerbar2 .br2,#wrapper .headerbar2 .br3{padding-top:1.25em;margin:0}.headerbar2 .br3 .wlcard1{margin-left:1.833em}#wrapper .headerbar2 .br4{clear:both;float:none}.headerbar2 .websearch2 input.text{width:350px}.co4b11 .b3{display:none}.co4b11 .br{display:block;float:left}.co4b11 .br2{clear:left}.co4b11 .more{clear:both}.co4b11 .br .more{clear:none}#sw_as{display:none;position:relative;z-index:100}input.text{-webkit-appearance:none;-webkit-border-radius:0}.websearch2 h2,.websearch2 label.hide{display:none}.websearch2 form{margin:0}.websearch2 input.image{border:0;cursor:pointer;display:block;float:left;margin:0;margin-left:3px;padding:0;text-align:right}.websearch2 input.text,.websearch2 select.dd{border:0;color:#333;display:block;float:left;margin:0;margin-top:7px;outline:none;padding:0;text-align:left;width:429px}.websearch2 input.txt1{border:solid 1px #c0c0c0;padding:5px 0 3px 3px;margin:1px 1px 0 -3px}.websearch2 input.txt2{border:solid 1px #c0c0c0;padding:5px 0 3px 3px;margin:1px 0 0 1px}.websearch2 select.dd{border:solid 1px #c0c0c0;border-top:solid 1px #a0a0a0;margin:1px 0 1px 1px;padding:3px 3px 3px 0}.websearch2 .opt,.websearch2 .scopes{font-family:verdana,sans-serif;font-size:100%}.websearch2 a,.websearch2 a:link,.websearch2 a:visited,.websearch2 a:hover,.websearch2 a:active,.websearch2 label,.websearch2 span,.websearch2 a:hover span{color:#fff}.websearch2 a:hover span{text-decoration:underline}.websearch2 span.bi{background-color:#fff;border:1px solid #2e6ba5;display:block;float:left;padding:0 0 0 1px}.websearch2 span.bo{border:2px solid #c7d9e9;clear:both;display:block;float:left}.websearch2 .opt{clear:both;color:#fff;margin-top:5px}.websearch2 .opt a,.websearch2 .opt label{margin:0 2px}.websearch2 .opt label{margin-left:5px;margin-right:11px}.websearch2 .opt a.first{margin:0}.websearch2 .opt input{margin:0 0 4px 0;padding:0;vertical-align:middle}.websearch2 .opt .delimited{display:inline}.websearch2 .opthide input,.websearch2 .opthide label{display:none}.websearch2 .scopes a{display:block;float:left;padding:2px 6px 4px 6px}.websearch2 .scopes a.selected,.websearch2 .scopes a.selected:hover{background:transparent url(../../i/07/617475cf39bf6f5c0bd6ecb985335c.gif) no-repeat 53% bottom;margin-bottom:0;padding-bottom:6px}.websearch2 .scopes a.selected,.websearch2 .scopes a.selected:hover,.websearch2 .scopes a.selected span,.websearch2 .scopes a.selected:hover span{color:#faae32;cursor:default;font-weight:bold;position:relative;text-decoration:none}.websearch2 .scopes span{display:inline;float:left;margin-top:1px}.websearch2 .scopes a span{display:inline-block;float:none;font-size:100%;margin-top:0;cursor:pointer}.websearch2 .scopes a span.icon1{background:transparent url(../../i/50/f63ed0301e8b02a8a42d8590a46291.gif) no-repeat right center;padding-right:30px}.websearch2 .scopes a span.icon2{background:transparent url(../../i/50/f63ed0301e8b02a8a42d8590a46291.gif) no-repeat right center;padding-right:30px}.websearch2 .scopes a span.icon3{background:transparent url(../../i/50/f63ed0301e8b02a8a42d8590a46291.gif) no-repeat right center;padding-right:30px}.websearch2 .scopes a span.icon4{background:transparent url(../../i/50/f63ed0301e8b02a8a42d8590a46291.gif) no-repeat right center;padding-right:30px}.websearch2 .scopes a span.icon5{background:transparent url(../../i/50/f63ed0301e8b02a8a42d8590a46291.gif) no-repeat right center;padding-right:30px}.wlcard1 div{font-size:117%;line-height:normal;text-align:right}.wlcard1 ul{float:left;list-style-type:none;margin:0;padding:0}.wlcard1 ul li{padding:0}.wlcard1 ul li.first{padding:0 0 .417em 0}.wlcard1 a,.wlcard1 a:link,.wlcard1 a:visited{color:#666}.wlcard1 a:hover,.wlcard1 a:active{color:#333}.wlcard1 ul li a span{color:#74a0c9}.linkedimglinklist8{list-style-type:none;margin:0;padding:0}.linkedimglinklist8 a{float:left}.linkedimglinklist8 a:hover{text-decoration:none}.linkedimglinklist8 img{border:none;margin-bottom:.4em}.linkedimglinklist8 li{float:left;margin:0 auto;padding:0 .5em;text-align:center}.linkedimglinklist8 a span{display:block}.richtext a,.richtext a:link,.richtext a:visited{text-decoration:underline}.richtext cite,.richtext dfn{font-style:normal}.richtext h4{margin:0 0 3px 0}.richtext p{margin:0 0 1em 0}.richtext code,.richtext samp,.richtext kbd{font-family:"courier new",courier,monospace;vertical-align:baseline}.ro{clear:left}.ro .ce{float:left;margin-left:.5em;margin-right:.5em;min-width:70px;width:5.833em}#wrapper .ro .ce1{margin-left:0}#wrapper .ro .cel{margin-right:0}.ro.m1,.ro .ce.m1{margin-top:1em}.ro.m3,.ro .ce.m3{margin-bottom:1em}.ro.m5,.ro .ce.m5{margin-bottom:1em;margin-top:1em}#wrapper .cogr .co{margin:0}#wrapper .cogr{margin:.667em}#wrapper .llmsg{text-align:center;padding-top:5em}#wrapper #page div.cotc{margin-bottom:18em}#wrapper div.tab h2{float:left}#wrapper div.tab div.tabchild{display:none;left:0;position:absolute;padding-top:.833em;top:2.167em}#wrapper div.cof div.tabchild{display:block}#wrapper div.cotc.cotch:hover div.cof div.tabchild{display:none}#wrapper div.cotc.cotch div.tab:hover div.tabchild{display:block}#wrapper div.cotc{background-color:#f1f1f1;border-bottom:1px solid;border-color:#009ad9;border-top:1px solid #f1f1f1;padding:.417em 0;position:relative}#wrapper div.cotc div.tab h2 span,#wrapper div.cotc.cotch:hover div.cof h2 span{background-color:#f1f1f1;border-color:#fff;border-style:solid;border-width:0 1px;bottom:-1px;padding:.5em 1.333em .25em;position:relative}#wrapper div.cotc div.cof h2 span,#wrapper div.cotc.cotch div.tab:hover h2 span{background-color:#fff;border-color:#009ad9;border-style:solid;border-width:4px 1px 0;bottom:-1px;color:#333;cursor:default;padding:.45em 1.333em;position:relative}#wrapper div.cotc div.tab h2 span span,#wrapper div.cotc.cotch:hover div.cof h2 span span,#wrapper div.cotc div.tab.cof h2 span span,#wrapper div.cotc.cotch div.tab:hover h2 span span{border:0 none;bottom:0;margin:0;margin-right:1px;padding:0;top:0}#wrapper #content .cossf{margin-bottom:3.33em}#wrapper #content .cossf .coss{margin-bottom:-25px}.cogr .coss ul{list-style-type:none;margin:0;padding:1px 0 0 0}.cogr .coss ul li{float:left;list-style-type:none}.cogr .coss ul li a{border:solid 1px #fff;display:block;height:19px;padding:0;text-decoration:none;width:18px}.cogr .coss ul li a.prev{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -730px}.cogr .coss ul li a.prev:hover{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -849px}.cogr .coss ul li a.next{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -968px}.cogr .coss ul li a.next:hover{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -1087px}.cogr .coss ul li a.pause{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -1206px;border-width:1px 0 1px 0;width:17px}.cogr .coss ul li a.pause:hover{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -1325px}.cogr .coss ul li a.play{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -1444px;border-width:1px 0 1px 0;width:17px}.cogr .coss ul li a.play:hover{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -1563px}.cogr .coss ul li a span{display:none;left:-10000px;position:relative}.cogr .coss ul li.last{color:#666;line-height:normal;padding:2px 0 4px;padding-left:12px}.ssa .as{background-color:#fff;left:54.5em;position:absolute;top:0;width:100%;z-index:1}.ssa .cof{left:0;z-index:2}.ssa{position:relative;overflow:hidden}.ssa .asn{left:0;position:absolute;z-index:3}.ssa .act{z-index:2}.ssa .nact{z-index:1}.date1{line-height:1.25em;margin:1.333em .667em .667em .667em}.date1 a,.date1 a:link,.date1 a:visited{color:#666}.date1 a:hover,.date1 a:active{color:#333}.blowoutmod1 .blowout1 h3{margin:0}.blowout1{border-bottom:solid 1px #ccc;padding:0 2em 1.333em 2em}.blowout1 div div{text-align:center}.blowout1 div div div{padding:.583em 0 0 0}.blowout1 h2{font-size:133%;line-height:1.13em;margin:0 0 .188em 0}.blowout1 h3{font-size:267%;font-weight:bold;line-height:1.09em}.blowout1 h3 a,.blowout1 h3 a:link,.blowout1 h3 a:visited{color:#333}.blowout1 h3 a:hover,.blowout1 h3 a:active{color:#000}.blowout1 p{color:#ccc;line-height:1.5em;margin:0;padding:0}.blowout1 ul{list-style-type:none;margin:.833em 0;padding:0}.blowout1 ul li{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -3683px;line-height:1.5em;padding:0 0 0 .75em}.breaknews1{font-size:133%;line-height:normal;padding:.625em .75em;text-align:center;margin:0 0 .667em}.breaknews1,.breaknews1 .richtext a,.breaknews1 .richtext a:link,.breaknews1 .richtext a:visited,.breaknews1 .richtext h4,.breaknews1 .richtext p,.breaknews1 .richtext span.custom{background-color:#ba1010;color:#fff;font-weight:bold}.breaknews1 .richtext h4{display:inline;margin:0 1em 0 0}.breaknews1 .richtext p{display:inline;margin:0}.navbar2 .br1 .menubar2{margin:0 0 0 8px}.navbar2 .br2 .menubar2{margin:0 0 0 9px}.navbar2 .br2 .menubar2 li.first{min-width:202px;width:16.833em}.navbar2 .br2 .menubar2 li.last{min-width:102px;width:8.5em}#wrapper .navbar2 .br2{min-width:316px;width:auto}.navbar2 .br2 .menubar2 li li.first,.navbar2 .br2 .menubar2 li li.last{min-width:142px;width:11.83em}.navbar2 .br2 .menubar2 li.fluid:hover ul,.navbar2 .br2 .menubar2 ul.js #hover.fluid ul{min-width:302px;width:25.167em}.navbar2 .br2 .menubar2 li.fluid ul li{min-width:0}.navbar2 .br2 .menubar2 li.fluid ul.mod2 li{width:50%}.navbar2 .br2 .menubar2 li.fluid ul.mod3 li{width:33.3%}.navbar2 .br2 .menubar2 li.fluid ul.mod4 li{width:25%}.navbar2 .br2 .menubar2 li.fluid ul.mod5 li{width:20%}.navbar2 .br2 .menubar2 li.fluid li a,.navbar2 .br2 .menubar2 li.fluid li a:link,.navbar2 .br2 .menubar2 li.fluid li a:hover,.navbar2 .br2 .menubar2 li.fluid li a:active,.navbar2 .br2 .menubar2 li.fluid li a:visited{font-size:100%;padding:.5em .25em .5em .571em}.co2b1 .br{float:left}.co2b1 .more{clear:both}.co2b1 .br .more{clear:none}.menubar2 ul,.menubar2 li{display:block;float:left;list-style:none;position:relative}.menubar2 ul{margin:0;padding:0;z-index:50}.menubar2 li{background-color:transparent;margin-right:1px;text-align:center}.menubar2 .snap li{min-width:102px;width:8.5em}.menubar2 .snap li.last{min-width:105px;width:8.75em}.menubar2 ul li.fluid:hover ul,.menubar2 ul.js #hover.fluid ul{left:auto;right:0;min-width:616px;width:51.333em}.menubar2 li a{outline:none}.menubar2 a:link,.menubar2 a:visited,.menubar2 a:active,.menubar2 a:hover,.menubar2 span{border-bottom:solid 4px;display:block;font-size:117%;font-weight:bold;line-height:normal;padding:.5em .571em}.menubar2 a:active,.menubar2 a:hover,.menubar2 a:hover span,.menubar2 span{text-decoration:none}.menubar2 span{cursor:default}.menubar2 li ul,.menubar2 ul.js li:hover ul,.menubar2 li ul li,.menubar2 .snap ul li.last{min-width:142px;width:11.833em}.menubar2 li ul,.menubar2 ul.js li:hover ul,.menubar2 ul.js li.last:hover ul{left:-999em;position:absolute;z-index:50}.menubar2 li ul{background-color:#fff;border:solid 1px}.menubar2 li li,.menubar2 .snap li li{margin:0;min-width:142px;position:static;text-align:left;width:11.833em}.menubar2 ul li:hover ul,.menubar2 ul.js #hover ul{left:0}.menubar2 li li:hover,.menubar2 ul.js li #hover,.menubar2 ul.js li li.focus{background-color:#e5e5e5}.menubar2 li li a:link,.menubar2 li li a:visited,.menubar2 li li a:active,.menubar2 li li a:hover{border:solid 1px #fff;font-weight:normal}.menubar2 li li span{font-weight:normal}.menubar2 .coc1 li a,.menubar2 .coc1 li span,.menubar2 .coc2 li a,.menubar2 .coc2 li span,.menubar2 .coc3 li a,.menubar2 .coc3 li span,.menubar2 .coc4 li a,.menubar2 .coc4 li span,.menubar2 .coc5 li a,.menubar2 .coc5 li span,.menubar2 .coc6 li a,.menubar2 .coc6 li span,.menubar2 .coc7 li a,.menubar2 .coc7 li span,.menubar2 .coc8 li a,.menubar2 .coc8 li span{color:#525151}.menubar2 .coc1 a,.menubar2 .coc1 span{border-color:#f57325;color:#f57325}.menubar2 .coc2 a,.menubar2 .coc2 span{border-color:#e44097;color:#e44097}.menubar2 .coc3 a,.menubar2 .coc3 span{border-color:#6a439c;color:#6a439c}.menubar2 .coc4 a,.menubar2 .coc4 span{border-color:#0253a2;color:#0253a2}.menubar2 .coc5 a,.menubar2 .coc5 span{border-color:#0191ce;color:#0191ce}.menubar2 .coc6 a,.menubar2 .coc6 span{border-color:#00aeff;color:#0296db}.menubar2 .coc7 a,.menubar2 .coc7 span{border-color:#58de81;color:#43ac63}.menubar2 .coc8 a,.menubar2 .coc8 span{border-color:#89c655;color:#73a846}.menubar2 .coc1 ul{border-color:#fde5d6}.menubar2 .coc2 ul{border-color:#ecd7e2}.menubar2 .coc3 ul{border-color:#e3dcec}.menubar2 .coc4 ul{border-color:#cfdfed}.menubar2 .coc5 ul{border-color:#cfeaf6}.menubar2 .coc6 ul{border-color:#cff0ff}.menubar2 .coc7 ul{border-color:#d5f7df}.menubar2 .coc8 ul{border-color:#cff4ec}.menubar2 ul ul span.custom{color:#333}.menubar2 li.last:hover ul,.menubar2 ul.js #hover.last ul{left:auto;right:0}.menubar2 .snap a:link,.menubar2 .snap a:visited,.menubar2 .snap a:active,.menubar2 .snap a:hover{padding:.5em 0}.menubar2 a span{padding:0;border:0;cursor:pointer;font-size:100%}.menubar2 .snap li li a:link,.menubar2 .snap li li a:visited,.menubar2 .snap li li a:active,.menubar2 .snap li li a:hover{padding:.5em .571em}.menubar2 li.fluid li a:link,.menubar2 li.fluid li a:visited,.menubar2 li.fluid li a:active,.menubar2 li.fluid li a:hover{border-top:none;border-left:none}.menubar2 li.fluid ul{padding-top:1px;padding-left:1px}.menubar2 li ul.mod2 li,.menubar2 .snap li ul.mod2 li.last{min-width:0;width:50%}.menubar2 li ul.mod3 li,.menubar2 .snap li ul.mod3 li.last{min-width:0;width:33.3%}.menubar2 li ul.mod4 li,.menubar2 .snap li ul.mod4 li.last{min-width:0;width:25%}.menubar2 li ul.mod5 li,.menubar2 .snap li ul.mod5 li.last{min-width:0;width:20%}.menubar2 li li.new a{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -232px}.menubar2 li li.beta a{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -344px}.menubar2 li li.new a,.menubar2 .snap li li.new a:link,.menubar2 .snap li li.new a:visited,.menubar2 .snap li li.new a:hover,.menubar2 .snap li li.new a:active{padding-right:33px}.menubar2 li li.beta a,.menubar2 .snap li li.beta a:link,.menubar2 .snap li li.beta a:visited,.menubar2 .snap li li.beta a:hover,.menubar2 .snap li li.beta a:active{padding-right:33px}.searchbar1{text-align:left}#wrapper .searchbar1 .br{margin:0;width:628px}.searchbar2{clear:both;text-align:center}#wrapper .searchbar2 .br{margin:0 auto;width:550px}.msnfoot1{border-top:solid 1px #cdcdcd;font-size:92%;line-height:normal;margin:1.083em .667em .667em .667em;padding:.5em 0 0 0}.msnfoot1 a,.msnfoot1 a:link,.msnfoot1 a:visited{color:#999}.msnfoot1 a:hover,.msnfoot1 a:active{color:#333}.msnfoot1 .primary li{float:left;display:block;padding:0 .833em}.msnfoot1 .primary li.first{padding-left:0}.msnfoot1 .secondary{text-align:right}.msnfoot1 .secondary a{white-space:pre}.msnfoot1 .secondary li{float:right;display:block;padding:0 .833em}.msnfoot1 .secondary li.first{padding-right:0}.msnfoot1 ul{list-style-type:none;margin:0;padding:0}.msnfoot1 .copyright{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right 0;clear:right;color:#999;float:right;margin:1.5em 0 0 0}.msnfoot1 .copyright span{border-right:solid 1px #999;display:block;line-height:20px;margin-right:133px;padding-right:10px}.ad1 .adfb a,.ad1 .adfb a:link,.ad1 .adfb a:visited{color:#666;font-size:83%;line-height:1.5em}.ad1 .adfb a:hover,.ad1 .adfb a:active{color:#333}.adfb.left span,.adfb.left a.adch{float:left}.adfb.left a,.adfb.right a.adch{float:right}.adfb{color:#666;text-align:center;width:100%}.alert1 a,.alert1 a:link,.alert1 a:visited{color:#333}.alert1 a:hover,.alert1 a:active{color:#000}.linkedimglink1{display:block;margin:0;padding:0}.linkedimglink1 a{clear:right;display:block;float:left}.linkedimglink1 a span{cursor:pointer;float:left;padding-top:8px}.linkedimglink1 img{border:none;float:left;margin-right:6px}.linkedimglink2{margin:0;padding:0}.linkedimglink2 a{display:block}.linkedimglink2 a span{cursor:pointer;float:right;text-align:right;padding-top:8px}.linkedimglink2 img{border:none;margin-left:6px;float:right}.hlcp2 .pri .piped,.hlcp2 .pri a,.hlcp2 .pri a:link,.hlcp2 .pri a:visited{color:#333;font-size:150%;line-height:1.22em}.hlcp2 .pri a:hover,.hlcp2 .pri a:active{color:#000}.hlcp2 .sec .piped,.hlcp2 .sec a,.hlcp2 .sec a:link,.hlcp2 .sec a:visited{color:#333;font-size:117%;line-height:1.07em}.hlcp2 .sec a:hover,.hlcp2 .sec a:active{color:#000}#wrapper .hlcp2 p a,#wrapper .hlcp2 p a:link,#wrapper .hlcp2 p a:visited,#wrapper .hlcp2 p a:hover,#wrapper .hlcp2 p a:active{font-size:100%;line-height:100%;text-decoration:underline}.hlcp2 .pri .piped a,.hlcp2 .pri .piped a:link,.hlcp2 .pri .piped a:hover,.hlcp2 .pri .piped a:visited,.hlcp2 .pri .piped a:active,.hlcp2 .sec .piped a,.hlcp2 .sec .piped a:link,.hlcp2 .sec .piped a:hover,.hlcp2 .sec .piped a:visited,.hlcp2 .sec .piped a:active{font-size:100%;line-height:100%}.hlcp2 .pri div{margin:.833em 0 0 0}.hlcp2 .cf{margin:0 0 .583em}.hlcp2 .pri div div,.hlcp2 .pri .first{margin:0}.hlcp2 img{border:0;display:block}.hlcp2 .pri img.landscape{margin:0 0 .333em 0}.hlcp2 .sec img.landscape{margin:0 .833em .833em 0}.hlcp2 ul.right .sec img{float:right}.hlcp2 ul.left .sec img{float:left}.hlcp2 .richtext p{margin:0}.hlcp2 .pri .richtext{margin:.333em 0 0 0}.hlcp2 .sec .richtext{margin:.083em 0 0 0}.hlcp2 ul{list-style-type:none;margin:0;padding:0}.hlcp2 li.sec{display:inline-block;padding:0 0 1.167em 0}.hlcp2 li.sec.last{padding:0 0 1.167em}.hlcp2 li.ter,.hlcp2 li.media{border-top:solid 1px #e1e1e1;display:list-item;line-height:1.25em;margin:0;padding:.583em 0}.hlcp2 li.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2347px;padding-left:19px}.hlcp2 span.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2355px}.hlcp2 .pri span.media{background-image:none}.hlcp2 .pri span.piped span.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2351px}.hlcp2 .pri span.media a{margin-left:0}.hlcp2 span.media a,.hlcp2 .pri span.piped span.media a{margin-left:19px}.hlcp2 .date{color:#999;clear:both;float:left;padding:.938em 0 1.667em 0}.hlcp2 span.icon{display:inline-block;font-size:75%;margin-left:.25em;text-decoration:none}.hlcp2 .pri .piped span.icon{font-size:50%}.hlcp2 span.new{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:12px;padding-top:.417em}.hlcp2 span.fresh1{background:transparent url(../../i/d7/fb6441a4c45cb3a3b2f592d914a3cd.gif) no-repeat right center;padding-right:31px;padding-top:.417em}.hlcp2 span.fresh2{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:12px;padding-top:.417em}.hlcp2 span.fresh3{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:12px;padding-top:.417em}.hlcp2 span.photo{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:12px;padding-top:.417em}.hlcp2 span.dest1{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:10px;padding-top:.417em}.hlcp2 span.dest2{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:10px;padding-top:.417em}.hlcp2 span.dest3{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:10px;padding-top:.417em}.hlcp2 .pri span.new{padding-top:.667em}.hlcp2 .pri span.fresh1{padding-top:.667em}.hlcp2 .pri span.fresh2{padding-top:.667em}.hlcp2 .pri span.fresh3{padding-top:.667em}.hlcp2 .pri span.photo{padding-top:.667em}.hlcp2 .pri span.dest1{padding-top:.667em}.hlcp2 .pri span.dest2{padding-top:.667em}.hlcp2 .pri span.dest3{padding-top:.667em}.menunavbar1{height:3.5em;margin-top:-1.667em;position:relative;width:100%}.menunavbar1 ul,.menunavbar1 li{display:block;float:left;list-style:none}.menunavbar1 ul{margin:0;padding:0;width:100%}.menunavbar1 li{text-align:center}.menunavbar1 ul li a{display:block;outline:none}.menunavbar1 a:link,.menunavbar1 a:visited,.menunavbar1 a:active{color:#fff;display:block;font-size:100%;font-weight:bold;line-height:normal;padding:.25em .8em;text-decoration:none}.menunavbar1 .ntier2 li{height:1.8em}.menunavbar1 ul .ntier2 li a{padding:0 .5em;color:#666;display:block}.menunavbar1 .ntier1 .ntier2{background-color:#fff;padding:0 1.5em 1.083em 0;padding-bottom:.3em;padding-top:.25em;width:79.5em}.menunavbar1 li ul,.menunavbar1 ul li:hover ul,.menunavbar1 ul li.last:hover ul{left:-999em;position:absolute}.menunavbar1 li li a:link,.menunavbar1 li li a:visited,.menunavbar1 li li a:hover,.menunavbar1 li li a:active{font-size:145%;font-weight:normal}.menunavbar1 ul.js li .showsm{display:block;z-index:10}.menunavbar1 ul.js li .hidesm{display:none;z-index:0}.menunavbar1 ul.js ul.notier li a{display:none}.menunavbar1 .ntier1 li:hover .ntier2,.menunavbar1 ul.js li.hover .ntier2,.menunavbar1 .ntier1 li.selected .ntier2{left:0;z-index:0}.menunavbar1 .js li:hover .ntier2{left:-999em}.menunavbar1 .ntier1 li:hover .ntier2{z-index:10}.menunavbar1 .ntier1 li:hover a,.menunavbar1 ul.js li.hover a,.menunavbar1 ul.ntier1 li.selected a{background-color:#fff;color:#666;outline:0}.menunavbar1 .js li:hover a{background-color:transparent;color:#fff}.menunavbar1 .js li:hover .ntier2 li a{background-color:#fff;color:#666}.menunavbar1 .ntier1 li .ntier2 li:hover a,.menunavbar1 ul.js li.hover .ntier2 li.focus a,.menunavbar1 .ntier1 li.selected .ntier2 li.highlighted a,.menunavbar1 .ntier1 li.selected .ntier2 li.focus a{color:#000;outline:0}.menunavbar1 .js li .ntier2 li:hover a{color:#666}.co4b5 .b3{display:none}.headlinelist2 div{float:left}.headlinelist2 ul{margin:0;padding:0}.headlinelist2 ul li{display:list-item;list-style-type:none;margin:0;padding:.417em 0}.headlinelist2 ul li.first{border-top:none;padding-top:0}.headlinelist2 ul li a{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2241px;display:block;line-height:1.25em;padding:0;padding-left:18px}.headlinelist2 span.media a{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2355px}.headlinelist3 div{float:left}.headlinelist3 ul{margin:0;padding:0}.headlinelist3 ul li{display:list-item;list-style-type:none;margin:0;padding:.417em 0}.headlinelist3 ul li.first{border-top:none;padding-top:0}.headlinelist3 ul li.first a{background-image:none;font-size:117%;font-weight:bold;padding-left:0}.headlinelist3 ul li a{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2241px;display:block;line-height:1.25em;padding:0;padding-left:18px}.headlinelist3 span.media a{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2355px}.imglinkabs1 img{float:left;margin-bottom:3px;margin-right:10px}.imglinkabs1 .media{display:inline}.imglinkabs1 p{margin:.2em 0 0 0}.imglinkabslist1{list-style-type:none;margin:0;padding:0}.imglinkabslist1 img{float:left;margin:0;margin-bottom:3px;margin-right:6px}.imglinkabslist1 li{margin:0 0 .9em 0}.imglinkabslist1 li.last{margin:0}.imglinkabslist1 .media{display:inline}.imglinkabslist1 div.richtext{margin:.2em 0 0 0}.imglinkabslist1 div.richtext p{margin:0}.imglinkabslist2{list-style-type:none;margin:0;padding:0}.imglinkabslist2 img{float:right;margin:0;margin-bottom:3px;margin-left:6px}.imglinkabslist2 li{margin:0 0 .9em 0}.imglinkabslist2 li.last{margin:0}.imglinkabslist2 div.richtext{margin:.2em 0 0 0}.imglinkabslist2 div.richtext p{margin:0}.imglinkabslist3{list-style-type:none;margin:0;padding:0}.imglinkabslist3 img{float:left;margin:0;margin-bottom:3px;margin-right:6px}.imglinkabslist3 li{margin:0 0 .9em 0}.imglinkabslist3 li.last{margin:0}.imglinkabslist3 .media{display:inline}.imglinkabslist3 div.richtext{border-top:solid 1px #ace;margin:.2em 0 0 0;padding:.3em 0 0 0}.imglinkabslist3 div.richtext p{margin:0}.imglinkabslist4{list-style-type:none;margin:0;padding:0}.imglinkabslist4 img{float:right;margin:0;margin-bottom:3px;margin-left:6px}.imglinkabslist4 li{margin:0 0 .9em 0}.imglinkabslist4 li.last{margin:0}.imglinkabslist4 div.richtext{border-top:solid 1px #ace;margin:.2em 0 0 0;padding:.3em 0 0 0}.imglinkabslist4 div.richtext p{margin:0}.imglinkabslist5{list-style-type:none;margin:0;padding:0}.imglinkabslist5 a,.imglinkabslist5 img{display:block;margin:0 0 3px 0}.imglinkabslist5 li{margin:0 0 .9em 0}.imglinkabslist5 li.last{margin:0}.imglinkabslist5 a{display:inline}.imglinkabslist5 div.richtext p{margin:0}.imglinkabslist6{list-style-type:none;margin:0;padding:0}.imglinkabslist6 a,.imglinkabslist6 img{display:block;margin:0 0 3px 0}.imglinkabslist6 li{margin:0 0 .9em 0}.imglinkabslist6 li.last{margin:0}.imglinkabslist6 div.richtext{border-top:solid 1px #ace;margin:0;padding:.3em 0 0 0}.imglinkabslist6 div.richtext a{display:inline}.imglinkabslist6 div.richtext p{margin:0}.imglinkabslist7{list-style-type:none;margin:0;padding:0}.imglinkabslist7 img{float:left;margin:0;margin-bottom:3px;margin-right:6px}.imglinkabslist7 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;width:47%}.imglinkabslist7 .media{display:inline}.imglinkabslist7 div.richtext{margin:.2em 0 0 0}.imglinkabslist7 div.richtext p{margin:0}.imglinkabslist8{list-style-type:none;margin:0;padding:0}.imglinkabslist8 img{float:right;margin:0;margin-bottom:3px;margin-left:6px}.imglinkabslist8 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;width:47%}.imglinkabslist8 div.richtext{margin:.2em 0 0 0}.imglinkabslist8 div.richtext p{margin:0}.imglinkabslist9{list-style-type:none;margin:0;padding:0}.imglinkabslist9 img{float:left;margin:0;margin-bottom:3px;margin-right:6px}.imglinkabslist9 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;width:47%}.imglinkabslist9 .media{display:inline}.imglinkabslist9 div.richtext{border-top:solid 1px #ace;margin:.2em 0 0 0;padding:.3em 0 0 0}.imglinkabslist9 div.richtext p{margin:0}.imglinkabslist10{list-style-type:none;margin:0;padding:0}.imglinkabslist10 img{float:right;margin:0;margin-bottom:3px;margin-left:6px}.imglinkabslist10 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;width:47%}.imglinkabslist10 div.richtext{border-top:solid 1px #ace;margin:.2em 0 0 0;padding:.3em 0 0 0}.imglinkabslist10 div.richtext p{margin:0}.imglinkabslist11{list-style-type:none;margin:0;padding:0}.imglinkabslist11 a,.imglinkabslist11 img{display:block;margin:0 0 3px 0}.imglinkabslist11 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;width:47%}.imglinkabslist11 div.richtext a{display:inline}.imglinkabslist11 div.richtext p{margin:0}.imglinkabslist12{list-style-type:none;margin:0;padding:0}.imglinkabslist12 a,.imglinkabslist12 img{display:block;margin:0 0 3px 0}.imglinkabslist12 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;width:47%}.imglinkabslist12 div.richtext{border-top:solid 1px #ace;margin:0;padding:.3em 0 0 0}.imglineabslist12 div.richtext a{display:inline}.imglinkabslist12 div.richtext p{margin:0}.imglinkabslist13{list-style-type:none;margin:0;padding:0}.imglinkabslist13 img{float:left;margin:0;margin-bottom:3px;margin-right:6px}.imglinkabslist13 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:28%}.imglinkabslist13 .media{display:inline}.imglinkabslist13 div.richtext{margin:.2em 0 0 0}.imglinkabslist13 div.richtext p{margin:0}.imglinkabslist14{list-style-type:none;margin:0;padding:0}.imglinkabslist14 img{float:right;margin:0;margin-bottom:3px;margin-left:6px}.imglinkabslist14 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:28%}.imglinkabslist14 div.richtext{margin:.2em 0 0 0}.imglinkabslist14 div.richtext p{margin:0}.imglinkabslist15{list-style-type:none;margin:0;padding:0}.imglinkabslist15 img{float:left;margin:0;margin-bottom:3px;margin-right:6px}.imglinkabslist15 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:28%}.imglinkabslist15 .media{display:inline}.imglinkabslist15 div.richtext{border-top:solid 1px #ace;margin:.2em 0 0 0;padding:.3em 0 0 0}.imglinkabslist15 div.richtext p{margin:0}.imglinkabslist16{list-style-type:none;margin:0;padding:0}.imglinkabslist16 img{float:right;margin:0;margin-bottom:3px;margin-left:6px}.imglinkabslist16 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:28%}.imglinkabslist16 div.richtext{border-top:solid 1px #ace;margin:.2em 0 0 0;padding:.3em 0 0 0}.imglinkabslist16 div.richtext p{margin:0}.imglinkabslist17{list-style-type:none;margin:0;padding:0}.imglinkabslist17 a,.imglinkabslist17 img{display:block;margin:0 0 3px 0}.imglinkabslist17 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:28%}.imglinkabslist17 div.richtext a{display:inline}.imglinkabslist17 div.richtext p{margin:0}.imglinkabslist18{list-style-type:none;margin:0;padding:0}.imglinkabslist18 img{display:block;margin:0 0 3px 0}.imglinkabslist18 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:28%}.imglinkabslist18 div.richtext{border-top:solid 1px #ace;margin:0;padding:.3em 0 0 0}.imglinkabslist18 div.richtext p{margin:0}.imglinkabslist19{list-style-type:none;margin:0;padding:0}.imglinkabslist19 img{float:left;margin:0;margin-bottom:3px;margin-right:6px}.imglinkabslist19 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:21%}.imglinkabslist19 .media{display:inline}.imglinkabslist19 div.richtext{margin:.2em 0 0 0}.imglinkabslist19 div.richtext p{margin:0}.imglinkabslist20{list-style-type:none;margin:0;padding:0}.imglinkabslist20 img{float:right;margin:0;margin-bottom:3px;margin-left:6px}.imglinkabslist20 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:21%}.imglinkabslist20 div.richtext{margin:.2em 0 0 0}.imglinkabslist20 div.richtext p{margin:0}.imglinkabslist21{list-style-type:none;margin:0;padding:0}.imglinkabslist21 img{float:left;margin:0;margin-bottom:3px;margin-right:6px}.imglinkabslist21 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:21%}.imglinkabslist21 .media{display:inline}.imglinkabslist21 div.richtext{border-top:solid 1px #ace;margin:.2em 0 0 0;padding:.3em 0 0 0}.imglinkabslist21 div.richtext p{margin:0}.imglinkabslist22{list-style-type:none;margin:0;padding:0}.imglinkabslist22 img{float:right;margin:0 0 3px 0;margin-left:6px}.imglinkabslist22 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:21%}.imglinkabslist22 div.richtext{border-top:solid 1px #ace;margin:.2em 0 0 0;padding:.3em 0 0 0}.imglinkabslist22 div.richtext p{margin:0}.imglinkabslist23{list-style-type:none;margin:0;padding:0}.imglinkabslist23 a,.imglinkabslist23 img{display:block;margin:0 0 3px 0}.imglinkabslist23 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;min-width:90px;width:21%}.imglinkabslist23 div.richtext a{display:inline}.imglinkabslist23 div.richtext p{margin:0}.imglinkabslist24{list-style-type:none;margin:0;padding:0}.imglinkabslist24 a,.imglinkabslist24 img{display:block;margin:0 0 3px 0}.imglinkabslist24 li{display:block;float:left;margin:0;margin-bottom:.9em;margin-right:3%;width:21%}.imglinkabslist24 div.richtext{border-top:solid 1px #ace;margin:0;padding:.3em 0 0 0}.imglinkabslist24 div.richtext a{display:inline}.imglinkabslist24 div.richtext p{margin:0}.linkedimglinklist13{list-style-type:none;margin:0;padding:0}.linkedimglinklist13 li{display:block;float:left;margin-bottom:.9em;margin-right:3%;position:relative;width:47%}.linkedimglinklist13 a{display:block}.linkedimglinklist13 a:after{content:".";clear:both;display:block;height:0;visibility:hidden}.linkedimglinklist13 img{border:none;float:left;margin-bottom:.4em;margin-right:.4em}.linkedimglinklist13 a span{cursor:pointer;padding-top:6px}.linklist9{list-style-type:none;margin:0;padding:0}.linklist9 a{white-space:pre}.linklist9 li{background:transparent url(../../i/f8/614595fba50d96389708a4135776e4.gif) repeat-y 100% 0;float:left;margin:0 0 2px 0;margin-right:.7em;padding:0;padding-right:.7em}.linklist9 li.last{background-image:none;margin:0;padding:0}.linklist16{list-style-type:none;margin:0;padding:0}.linklist16 li{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -3681px;margin:0;padding:.25em 0 .2em 9px}.linkimgabs1 a{display:block;margin:0 0 .4em 0}.linkimgabs1 br{display:none}.linkimgabs1 div.richtext br{display:inline}.linkimgabs1 img{display:block;float:left;margin-bottom:3px;margin-right:6px}.linkimgabs1 div.richtext a{display:inline}.conban1{position:relative}.conban1 .close{left:980px;top:0}.headerbar_us{height:9.833em;min-height:118px}.headerbar_us .pageoptions1 .welcome{text-align:right}.headerbar_us a,.headerbar_us a:link,.headerbar_us a:visited,.headerbar_us a:hover,.headerbar_us a:active,.headerbar_us label,.headerbar_us span,.headerbar_us a:hover span,.headerbar_us .br2 .welcome{color:#666}.headerbar_us .br1{float:left;width:54em}.headerbar_us .br1 .linklist1 li{float:left;padding:.25em 1.5em .2em 0}.headerbar_us .br2{float:right}.headerbar_us .br3{float:right;margin-right:.5em}.headerbar_us .br4{clear:both;float:left;min-width:208px;padding-top:.5em;width:17.33em}.headerbar_us .br5{float:left}.headerbar_us .br3 a,.headerbar_us .br3 a:link,.headerbar_us .br2 .welcome{font-weight:bold}.headerbar_us .m2{margin-top:.25em}.rstkq1 .rstockq1 h4{float:left;margin-right:.333em}.rstkq1 a,.rstkq1 a:link,.rstkq1 a:visited{color:#666}.co3b5 .br{float:left}.co3b5 .br2{clear:right;float:right}.co3b5 .br3,.co3b5 .more{clear:left}.co3b5 .br .more{clear:none}.co3b6 .br{clear:right;float:right}.co3b6 .br1{float:left}.co3b6 .more{clear:both;float:none}.co3b6 .br .more{clear:none}.co4b1 .br{float:left}.co4b1 .br2{clear:right}.co4b1 .br3{clear:left}.co4b1 .more{clear:both}.co4b1 .br .more{clear:none}.co4b1 .b3{display:block}.co4b2 .b3{display:none}.co4b2 .br{float:left}.co4b2 .more{clear:both}.co4b2 .br .more{clear:none}.co4b8 .b3{display:none}.co4b8 .br{float:left}.co4b8 .br3,.co4b8 .br4{clear:both;display:block;float:none}.co4b8 .more{clear:both}.co5b9 .b3,.co5b9 .b4{display:none}.co6b1 .b3,.co6b1 .b5{display:none}.co6b1 .b4{display:block}.co6b1 .br{float:left}.co6b1 .br4{clear:left}.co6b1 .more{clear:left}.co6b1 .br .more{clear:none}.hlcp1 .pri .piped,.hlcp1 .pri a,.hlcp1 .pri a:link,.hlcp1 .pri a:visited{color:#333;font-size:150%;line-height:1.22em}.hlcp1 .pri a:hover,.hlcp1 .pri a:active{color:#000}.hlcp1 .sec .piped,.hlcp1 .sec a,.hlcp1 .sec a:link,.hlcp1 .sec a:visited{color:#333;font-size:117%;line-height:1.07em}.hlcp1 .sec a:hover,.hlcp1 .sec a:active{color:#000}#wrapper .hlcp1 p a,#wrapper .hlcp1 p a:link,#wrapper .hlcp1 p a:visited,#wrapper .hlcp1 p a:hover,#wrapper .hlcp1 p a:active{font-size:100%;line-height:100%;text-decoration:underline}.hlcp1 .pri .piped a,.hlcp1 .pri .piped a:link,.hlcp1 .pri .piped a:hover,.hlcp1 .pri .piped a:visited,.hlcp1 .pri .piped a:active,.hlcp1 .sec .piped a,.hlcp1 .sec .piped a:link,.hlcp1 .sec .piped a:hover,.hlcp1 .sec .piped a:visited,.hlcp1 .sec .piped a:active{font-size:100%;line-height:100%}.hlcp1 .pri div{margin:.833em 0 0 0}.hlcp1 .cf{margin:0 0 .583em}.hlcp1 .pri div div,.hlcp1 .pri .first{margin:0}.hlcp1 img{border:0;display:block}.hlcp1 .pri img.landscape{margin:0 0 .333em 0}.hlcp1 .sec img.landscape{margin:0 .833em .833em 0}.hlcp1 ul.right .sec img{float:right}.hlcp1 ul.left .sec img{float:left}.hlcp1 .richtext p{margin:0}.hlcp1 .pri .richtext{margin:.333em 0 0 0}.hlcp1 .sec .richtext{margin:.083em 0 0 0}.hlcp1 ul{list-style-type:none;margin:0;padding:0}.hlcp1 li.sec{display:inline-block;padding:0 0 1.167em 0}.hlcp1 li.sec.last{padding:0 0 1.167em}.hlcp1 li.ter,.hlcp1 li.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2236px;display:list-item;line-height:1.333em;margin:0;padding:.333em 0 .333em 1.583em}.hlcp1 li.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2350px}.hlcp1 span.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2355px}.hlcp1 .pri span.media{background-image:none}.hlcp1 .pri span.piped span.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2351px}.hlcp1 .pri span.media a{margin-left:0}.hlcp1 span.media a,.hlcp1 .pri span.piped span.media a{margin-left:19px}.hlcp1 .date{color:#999;clear:both;float:left;padding:.938em 0 1.667em 0}.hlcp1 span.icon{display:inline-block;font-size:75%;margin-left:.25em;text-decoration:none}.hlcp1 .pri .piped span.icon{font-size:50%}.hlcp1 span.new{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:12px;padding-top:1px}.hlcp1 span.fresh1{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:12px;padding-top:1px}.hlcp1 span.fresh2{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:12px;padding-top:1px}.hlcp1 span.fresh3{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:12px;padding-top:1px}.hlcp1 span.photo{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:10px;padding-top:.25em}.hlcp1 span.dest1{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:12px;padding-top:.25em}.hlcp1 span.dest2{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:12px;padding-top:.25em}.hlcp1 span.dest3{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:12px;padding-top:.25em}.hlcp1 .pri span.new{padding-top:.667em}.hlcp1 .pri span.fresh1{padding-top:.667em}.hlcp1 .pri span.fresh2{padding-top:.667em}.hlcp1 .pri span.fresh3{padding-top:.667em}.hlcp1 .pri span.photo{padding-top:.667em}.hlcp1 .pri span.dest1{padding-top:.667em}.hlcp1 .pri span.dest2{padding-top:.667em}.hlcp1 .pri span.dest3{padding-top:.667em}.imgmap1 img{border:none}.linklist1{list-style-type:none;margin:0;padding:0}.linklist1 li{margin:0;padding:.25em 0 .2em 0}.linklist2{list-style-type:square;margin:0;margin-left:18px;padding:0}.linklist2 li{margin:0;padding:.25em 0 .2em 0}.linklist13{list-style-type:none;margin:0;padding:0}.linklist13 li{display:block;float:left;margin:0;margin-right:1%;padding:.25em 0 .2em 0;width:29%}.linklist14{list-style-type:none;margin:0;padding:0}.linklist14 li{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -3681px;display:block;float:left;margin:0 1% 0 0;padding:.25em 0 .2em 9px;width:44%}.linklist15{list-style-type:none;margin:0;padding:0}.linklist15 li{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -3681px;display:block;float:left;margin:0 1% 0 0;padding:.25em 0 .2em 9px;width:27%}.condbanner1 a.close{display:inline;padding:0 32px 32px 0;position:absolute;margin:0 0 0 -32px}.condbanner1 a.white{background:0 -466px transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat}.condbanner1 a.black{background:0 -598px transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat}.pgopt1{float:right;clear:both}.pgopt1 .opt,.pgopt1 .signin{display:inline;float:left;font-size:83.33%;line-height:1.6em;height:1.6em;min-height:16px}.pgopt1 li a,.pgopt1 li span{border-bottom:solid 2px #fff}.pgopt1 li li a,.pgopt1 li li span{border-bottom:none}.pgopt1 .opt ul{font-size:120%;line-height:1.333em;top:1.333em}.pgopt1 .user ul{top:1.417em}.pgopt1 .user div a,.pgopt1 .user div span{font-size:100%;font-weight:bold}.pgopt1 .user div ul a{font-weight:normal}.pgopt1 ul,.pgopt1 li{display:block;margin:0;padding:0;text-align:right;list-style:none}.pgopt1 li li{background-color:#fff;display:block;width:100%;text-align:left}.pgopt1 li a,.pgopt1 .js li:hover a{border-color:#fff}.pgopt1 li a span,.pgopt1 li a:link,.pgopt1 li a:visited,.pgopt1 li a:active,.pgopt1 li a:visited,.pgopt1 .js li:hover a:link,.pgopt1 .js li:hover a:visited,.pgopt1 .js li:hover a:hover,.pgopt1 .js li:hover a:active{text-decoration:none}.pgopt1 .pipe{border-left:solid 1px #999;margin-left:.417em;padding-left:.417em}.pgopt1 li.signin:hover a,.pgopt1 .js li#hover.signin a:hover{text-decoration:underline}.pgopt1 li.signin:hover a,.pgopt1 li.signin a:hover,.pgopt1 .js li#hover.signin a{border-bottom-color:#fff}.pgopt1 li:hover a,.pgopt1 li a:hover,.pgopt1 .js #hover a{border-bottom-color:#666}.pgopt1 ul li:hover ul,.pgopt1 ul.js #hover ul{left:auto;right:0;z-index:110}.pgopt1 li li:hover,.pgopt1 .js li li#hover,.pgopt1 li li.focus{background-color:#f1f1f1}.pgopt1 li:hover li a,.pgopt1 li#hover li a{border:none}.pgopt1 .user div,.pgopt1 .opt div{position:relative}.pgopt1 li ul,.pgopt1 ul.js li:hover ul{left:-999em;right:auto;z-index:auto}.pgopt1 .user ul,.pgopt1 .opt ul{background-color:#fff;border:solid 1px #666;position:absolute}.pgopt1 li li a,.pgopt1 ul.js li li a{display:block;float:none;padding:.417em 1.417em;min-width:132px;white-space:nowrap}.pgopt1 li li a.checked{background:transparent url(../../i/ff/290e7f0b12fa8a201581c74c1ae75a.gif) no-repeat .417em center}.pgopt1 li li.separator#hover,.pgopt1 li li.separator:hover{background-color:transparent}.pgopt1 li li.separator{font-size:10%;height:1px;line-height:1px;min-height:1px;position:absolute;z-index:100}.pgopt1 li li.separator div{border:none;border-top:1px solid #666;height:1px;margin:0 17px}.rstockq1 a,.rstockq1 h4,.rstockq1 span{margin:0;padding:0}.esbm,.esb{display:none}.esh .esbm{display:block}.esh .esb{background:#b2bdc4;display:block;font-size:12px}.esh #head .ro .ce{position:inherit}.esh #srchfrm{position:relative;z-index:110}.esh .scopes a{color:#fff}.esh #srchfrm .opt{display:none}.headerbar_us .esbc span,.headerbar_us .esbc a:hover span{color:#fff}.esbm{background:#333;height:100%;position:absolute;width:100%;z-index:110}.esbtn{background-image:url("../../i/61/379589e51e05637f600f129f305b52.png");cursor:pointer;height:23px;position:absolute;right:-23px;top:0;width:23px}.esbc{background-color:#b2bdc4;position:relative}.esbc ul,.esbc ul{list-style:none outside none;margin:0;padding:0}.esbc .cbg{line-height:0}.esbc .mbg{background:none repeat scroll 0 0 #000;height:100%;position:absolute;width:100%;z-index:1}.esbc .mlogo{background:0 0 url(../../i/61/def0ebad64d00fda0702cb7b8179ea.png) no-repeat;float:left;height:32px;margin:14px 0 2px 14px;width:90px}.esbc .cmenu{height:100%;position:absolute;top:0;width:113px}.menus{top:48px;position:absolute;z-index:10}.esh .menus li a{color:#fff}.menus li a{display:block;padding:10px 14px}.menus li .sc_pc{background:#333;border:1px solid #777;display:block;left:105px;padding:.5em;position:absolute;margin-top:-45px;width:22em;white-space:nowrap}.menus li.col3 .sc_pc{margin-top:-55px}.menus li.col4 .sc_pc{margin-top:-65px}.menus li a span{background-color:#fff;display:block;height:26px;left:0;margin-top:-6px;position:absolute;width:100%}.menus .sc_pc a{padding:2px 5px}.menus .sc_pc h3{color:#999;padding:5px}.menus li .sc_pca{color:#fff;padding-top:10px}.menus li .sc_pca a{display:inline;padding:5px}.sl_sh{font-size:13px}.sh_hto{background:none repeat scroll 0 0 #000;height:37px;padding:1px;width:37px}.sh_hs p{color:#fff;margin:0 0 5px}.sh_hto div{border:1px solid #fff;float:left;height:35px;width:35px}.sh_hst{position:absolute;z-index:5}a.sh_hs{cursor:pointer;display:block;line-height:1.4em;padding:5px 5px 5px 10px;position:absolute;width:219px;z-index:15}a.sh_hs:hover{text-decoration:none}.sh_ho{background:none repeat scroll 0 0 #000;left:0;padding:1px;position:absolute;top:0;width:100%;z-index:-1}.sh_ho div{border:1px solid #fff}.sh_hq{text-decoration:underline}.sh_hs span.sh_hi,a.sh_hs:hover span.sh_hi{color:#ffa500;text-decoration:none}.sh_rdiv{bottom:10px;font-size:11px;position:absolute;right:5px}.sh_rdiv a{cursor:default;display:block;float:left;margin:0 3px;outline:medium none;position:relative;text-decoration:none}#head .sh_rdiv a:hover span{display:block;text-decoration:none}.sc_light{border:1px solid;cursor:pointer;display:block;text-indent:3px;height:18px;width:17px}.dis .sc_light{cursor:default}#head .sc_msg{color:#000}.sc_msg{background:none repeat scroll 0 0 #fff;border:1px solid #555;bottom:2em;display:none;padding:.2em .5em;position:absolute;right:.18em;white-space:nowrap}.sh_rdiv .copy{font-size:14px}.sh_rdiv .sh_igc{margin:1px 2px 0 5px}.sh_igc .sc_msg{bottom:1.82em;white-space:normal;width:300px}.esbf{background:none repeat scroll 0 0 #d0d9dd;padding:14px 4px 10px}.esbf h3{color:#737373;font-size:16px;font-weight:200;margin-left:6px}.esbf ul{margin:0;padding:9px 0 0;list-style:none outside none}.esbf li{float:left;font-size:14px;font-weight:700}.esb .esbf li a{color:#000}.esbf a,.esbf a:hover{line-height:1.2em;font-weight:200;margin:0 6px}.es2 .menus li a{padding:7px 14px}.es2 .menus .sc_pc a{padding:2px 5px}.esh .es2 #sa_drw li{padding:7px}.dating1{background-color:#f7f7f7;padding:0;margin:.667em 0 .667em .333em}#wrapper .dating1 .h2{border-bottom:none;margin:0 0 .83em;background-color:#fff;padding-bottom:.4em}.dating1 br{display:none}#wrapper .dating1 .br2{padding-top:0}.dating1 .linkedimglinklist8 img{margin-bottom:0}.dating1 .linkedimglinklist8 li{padding:0 .333em 0 0;margin:0;text-align:left}.dating1 .linkedimglinklist8 li.last{padding:0}.w4 .dating1 .linkedimglinklist8 li{width:6.32em}.w4 .dating1 .linkedimglinklist8 li.last{width:5em}.dating1 .linkedimglinklist8 a span{font-size:92%;line-height:1em}.dating1 .complex1 .dddiv1,.dating1 .complex1 .dddiv2{float:left}.dating1 .complex1 .dddiv1 select,.dating1 .complex1 .dddiv2 select,.dating1 .complex1 .dddiv3,.dating1 .complex1 .dddiv5{clear:left}.dating1 .complex1 .dddiv2{margin-left:1.5em}.dating1 .complex1 .dddiv3,.dating1 .complex1 .dddiv5{padding-top:.583em}.dating1 .complex1 .dddiv4{margin-top:0}.dating1 .complex1 .dddiv1 label,.dating1 .complex1 .dddiv2 label{margin-bottom:.25em}.dating1 .complex1 .dddiv3 label,.dating1 .complex1 .dddiv4 label,.dating1 .complex1 .dddiv5 label{margin-top:.167em}.dating1 .complex1 label,.dating1 .complex1 select{color:#666;margin-right:1.25em;margin-bottom:0}.dating1 .complex1 label{margin-top:0}.dating1 .complex1 .button{background-color:#36b701;border:solid 1px #92b0dd;color:#fff;font-weight:bold}#wrapper .dating1 .br4{padding-top:1.25em}.dating1 fieldset #mygender{clear:left}.dating1 fieldset #theirgenderlbl{float:none}.dating1 fieldset#cff1 label{margin-right:7.9em;margin-top:0}.dating1 fieldset#cff1 select{margin-right:1.667em}.dating1 fieldset{padding:.5em 0 0}.dating1 fieldset.last{padding-bottom:.5em}.dating1 fieldset.last select{width:auto}.dating2{background-color:#fff0fb;padding:0}#wrapper .dating2 .h2{border-bottom:0;margin:0 0 0 .641em}.dating2 br{display:none}.dating2 .br1,.dating2 .br2{padding:0 0 0 .75em}#wrapper .dating2 .br2{padding-top:0}.dating2 .linkedimglinklist8 li{padding:0 1.222em 0 0;margin:0;text-align:left}.dating2 .linkedimglinklist8 li.last{padding:0}.w4 .dating2 .linkedimglinklist8 li{width:5em}.w4 .dating2 .linkedimglinklist8 li.last{width:5em}.dating2 .linkedimglinklist8 a span{font-size:92%;line-height:1em}.dating2 .complex1 .dddiv1,.dating2 .complex1 .dddiv2{float:left}.dating2 .complex1 .dddiv1 select,.dating2 .complex1 .dddiv2 select,.dating2 .complex1 .dddiv3,.dating2 .complex1 .dddiv5{clear:left}.dating2 .complex1 .dddiv2{margin-left:1.5em}.dating2 .complex1 .dddiv3,.dating2 .complex1 .dddiv5{padding-top:.583em}.dating2 .complex1 .dddiv4{margin-top:0}.dating2 .complex1 .dddiv1 label,.dating2 .complex1 .dddiv2 label{margin-bottom:.25em}.dating2 .complex1 .dddiv3 label,.dating2 .complex1 .dddiv4 label,.dating2 .complex1 .dddiv5 label{margin-top:.167em}.dating2 .complex1 label,.dating2 .complex1 select{color:#666;margin-right:.667em;margin-bottom:0}.dating2 .complex1 .button{background-color:#36b701;border:solid 1px #92b0dd;color:#fff;font-weight:bold}#wrapper .dating2 .br4{padding-top:1.25em}.dating2 fieldset #mygender{clear:left}.dating2 fieldset #theirgenderlbl{float:none}.dating2 fieldset#cff1 label{margin-right:5.2em}.dating2 fieldset#cff1 select{margin-right:2.2em}.dating2 fieldset{padding:.5em 0 0}.dating2 fieldset.last{padding-bottom:.5em}.complex1,.complex1 p{margin:0;padding:0}.complex1 fieldset{border:none;clear:both}.complex1 fieldset.last div{margin-top:0}.complex1 cite{display:block;font-style:normal}.complex1 label,.complex1 select,.complex1 input,.complex1 textarea{float:left;margin-right:.2em}.complex1 cite,.complex1 div{margin-top:.4em}.complex1 select{font-size:100%}.complex1 input{font-size:100%;line-height:1.25em}.complex1 input.alt{float:right}.linkedimg1 a:hover{text-decoration:none}.dhppromo1 .adfb{color:#666;text-align:center;width:100%}.co5b18 .b3,.co5b18 .b4{display:none}.co5b18 .br{float:left}.co5b18 .br1,.co5b18 .br5{clear:both;display:block;float:none}.co5b18 .more{clear:both;float:none}#wrapper .hotmail1{margin:.667em .667em 1.667em .667em}#wrapper .hotmail1 .h2{margin:0}.hminbox1 .expands{display:none}.hminbox1 p{line-height:1.333em;margin:.833em 0}.hminbox1 table{border-collapse:collapse;border-bottom:solid 2px #ccebf7;width:100%}.hminbox1 caption,.hminbox1 thead{display:none}.hminbox1 td{border-bottom:solid 1px #e1e1e1;padding:6px 0}.hminbox1 td.rec{text-align:right}.hminbox1 td.msg{padding-left:27px}.hminbox1 tr.unread td.msg{font-weight:bold;background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2461px}.hminbox1 tr.unread td.rec span.date{font-weight:bold}.hminbox1 tr.read td.msg{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2573px}.hminbox1 tr.replied td.msg{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -1674px}.hminbox1 tr.forwarded td.msg{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -1785px}.hminbox1 tr.attached td.msg{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -1897px}.hminbox1 tr.msn td.msg{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2009px}.hminbox1 tr.courier td.msg{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2121px}.hminbox1 tr.prilow td.msg{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 5px -3461px}.hminbox1 tr.prihigh td.msg{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 6px -3571px}.hminbox1 td.msg span,.hminbox1 td.rec span.time{display:block;font-weight:normal;margin-top:.5em}.hminbox1 td.rec span.date{color:#333}.hminbox1 td.rec span.time{color:#999;line-height:1.5em;white-space:nowrap}.hminbox1 ul.greet{border-bottom:solid 2px #ccebf7;margin:0;padding:.417em 0}.hminbox1 p.teaser{border-top:solid 1px #e1e1e1;margin-top:0;padding:.583em 0 0 0}.hminbox1 div.logo{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -116px;float:none;height:30px;width:90px}.hminbox1 ul.actions{float:right;margin:.54em 0;padding:0}.hminbox1 div.hr{margin-top:0}.hminbox1 li{border-right:solid 1px #e1e1e1;display:block;float:left;margin:0;padding:0 1.083em}.hminbox1 li.last{border-right:none;padding-right:0}.hminbox1 li.first{padding-left:0}.hminbox1 ul.greet li{border-right:none;padding:0;width:50%}.hminbox1 ul.greet li.last{text-align:right}.hminbox1 ul.actions li a.hide{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -3032px;padding-right:15px}.hminbox1 ul.actions li a.hide:hover{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -3141px}.hminbox1 ul.actions li a.show{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -3250px;padding-right:15px}.hminbox1 ul.actions li a.show:hover{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -3359px}.hminbox1 ul.greet li.first a,.hminbox1 ul.greet li.first a:link,.hminbox1 ul.greet li.first a:visited{color:#333;font-size:117%;line-height:1.43em}.hminbox1 ul.greet li.first a:visited,.hminbox1 ul.greet li.first a:active{color:#000}.hminbox1 td.msg a,.hminbox1 td.msg a:link,.hminbox1 td.msg a:visited{color:#333}.hminbox1 td.msg a:hover,.hminbox1 td.msg a:active{color:#000;cursor:pointer}.hminbox1 ul.greet li.first a span{font-size:86%;line-height:1.333em;padding:.25em}.hminbox1 p.error a,.hminbox1 p.error a:link,.hminbox1 p.error a:visited{color:#333}.hminbox1 p.error a:hover,.hminbox1 p.error a:active{color:#000}.hminbox1 ul.greet li a span,.hminbox1 ul.greet li a:link span,.hminbox1 ul.greet li a:visited span,.hminbox1 td.msg a span,.hminbox1 td.msg a:link span,.hminbox1 td.msg a:visited span{color:#333}.hminbox1 ul.greet li a:hover span,.hminbox1 ul.greet li a:active span,.hminbox1 td.msg a:hover span,.hminbox1 td.msg a:active span{color:#000}.hminbox1 ul a,.hminbox1 ul a:link,.hminbox1 ul a:visited{color:#666}.hminbox1 ul a:hover,.hminbox1 ul a:active{color:#333}.ht1{margin:0;padding:0;text-align:left}.ht1 .sub{color:#666;line-height:2.333em}.ht1 .sub a:link{color:#666}.ht1 .topicitem{width:26.333em;min-width:316px;border-top:solid 1px #e1e1e1;padding:0}.ht1 .atopicitem{width:24.833em;min-width:298px}.ht1 .first{display:inline-block;border-top:none;margin-bottom:.833em;padding:0;vertical-align:top}.ht1 .num,.ht1 .first .topic{color:#666;font-size:116.7%;font-weight:bold;line-height:1.333em}.ht1 .first p{color:#999;font-weight:normal;line-height:1.333em;margin:0;padding:0}.ht1 .down{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2685px}.ht1 .up{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2799px}.ht1 .side{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2913px}.ht1 .downflush{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2690px}.ht1 .upflush{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2804px}.ht1 .sideflush{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2918px}.ht1 .first .content{margin-right:136px;padding-right:.833em}.ht1 .media{float:right}.ht1 .media img{display:block}.ht1 .arrow{padding-left:1.5em}.ht1 .rank{float:left;text-align:right;width:1.25em;display:inline}.ht1 .first .rank{width:1.071em}.ht1 .content{padding-left:1.667em}#marchmadness .br3 img,#marchmadness .br2{display:none}#marchmadness .br3 noscript p{padding:5em 10em 0}#marchmadness .hlcp1 .pri a,#marchmadness .hlcp1 .pri a:link,#marchmadness .hlcp1 .pri a:visited{font-size:117%}#marchmadness .m2{margin-right:1em}.co3b1 .br{float:left}.co3b1 .more{clear:left}.co3b1 .br .more{clear:none}.co3b2 .br{float:left}.co3b2 .br1{clear:both;display:block;float:none}.co3b2 .more{clear:left}.co3b2 .br .more{clear:none}.co3b3 .br{float:left}.co3b3 .br3{clear:both;display:block;float:none}.co3b3 .more{clear:both}.srchh1 div.loaddisableding{font-weight:bold;margin:.66em 0;padding:0 0 .33em 0;text-align:center}.srchh1 div.logo{background:transparent url(../../i/61/def0ebad64d00fda0702cb7b8179ea.png) no-repeat 0 -263px;height:19px;width:37px}.srchh1 div.shupsell{margin-bottom:.33em;padding-bottom:0}.srchh1 div.results,.srchh1 div.shupsell,.srchh1 div.loaddisableding{border-bottom:solid 2px #ccebf7}.srchh1 div.results{margin-bottom:.33em;padding:0}.srchh1 ul.resultlist{list-style-type:none;margin:0;padding:0}.srchh1 ul.resultlist li{border-bottom:solid 1px #e1e1e1;display:list-item;line-height:1.25em;padding:.58em 0}.srchh1 ul.resultlist li.first{padding-top:0}.srchh1 ul.logobar{float:right;margin:.1em 0;padding:0}.srchh1 ul.logobar li{float:left;list-style-type:none;margin:0;padding:0 1.08em}.srchh1 ul.logobar li.first{border-right:solid 1px #e1e1e1;padding-left:0}.srchh1 ul.logobar li.last{border-right-style:none;padding-right:0}.srchh1 ul.logobar li a.hide{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -3032px;padding-right:15px}.srchh1 ul.logobar li a.hide:hover{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -3141px}.srchh1 ul.logobar li a.show{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -3250px;padding-right:15px}.srchh1 ul.logobar li a.show:hover{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -3359px}.srchh1 ul a,.srchh1 ul a:link,.srchh1 ul a:visited{color:#666}.srchh1 ul a:hover,.srchh1 ul a:active{color:#333}.eula1 h2.h2 span,.eula1 div.h2 span{display:none}.eula1{display:none;left:0;height:100%;text-align:center;top:0;position:absolute;width:100%;z-index:110}.eula1 h2.h2,.eula1 div.h2{background:transparent url(../../i/09/4ebdf19a1ce03cce12e11926256422.gif) repeat 0 0;height:100%;left:0;position:absolute;text-align:center;width:100%}#wrapper .eula1 .br1{background:#f5f9fb;border:solid 2px #9c9c9c;margin:0 auto;position:relative;top:180px;width:37.2em;z-index:111}.eula1 .richtext{padding:6px 10px;text-align:left}.eula1 .custom2{display:block;font-weight:bold;margin:6px auto;text-align:center}.eula1 .custom2 a{background-color:#eb7c00;border:solid 1px #ffa615;color:#fff;padding:2px 7px}.actfeed1 .ac-head{margin-top:-5px;border-bottom:2px solid #ccebf7;width:100%}.actfeed1 .ac-greet{float:left}.actfeed1 .ac-greettext{font-size:117%;padding:4px 0 7px 0}.actfeed1 .ac-upsell,.actfeed1 .ac-errortext{float:left;padding:5px 0 6px 0}.actfeed1 .ac-errortext{padding-top:5px}.actfeed1 .ac-signinlink,.actfeed1 .ac-signout{float:right;margin-top:5px}.actfeed1 .ac-signinlink.fbsignin{margin-top:1px}.actfeed1 .ac-signinlink.fbsignin a span{background:url(../../i/16/9798fea395258497f598bba500bf83.png) repeat 0% -263px #5f78ab;border-bottom:1px solid #1a356e;border-top:1px solid #879ac0;color:#fff;display:block;font-family:"lucida grande",tahoma,verdana,arial,sans-serif;font-weight:bold;margin:1px 1px 0 21px;padding:2px 6px 3px;text-decoration:none}.actfeed1 .ac-signinlink a{padding:3px 0 5px 23px}.actfeed1 .ac-signinlink.fbsignin a{margin:0;padding:0;background:url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 0% -229px #29447e;cursor:pointer;display:inline-block;outline:medium none;text-decoration:none;font-size:92%;line-height:14px}.actfeed1 .wlsignin{background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 0% -149px}.actfeed1 .twsignin{background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 0% -120px}.actfeed1 .ac-list,.actfeed1 .ac-item{list-style-type:none;margin:0;padding:0}.actfeed1 .ac-item{padding:10px 0 0 0;border-bottom:1px solid #e1e1e1}.actfeed1 .ac-itemauthorpicdiv{width:26px;float:left}.actfeed1 .ac-itemauthorpic{width:26px;height:26px}.actfeed1 .ac-itemmain{margin:-3px 0 0 0;float:right;width:88%;padding:0;overflow:hidden}.actfeed1 .ac-itemauthorname{display:inline;font-weight:bold}.actfeed1 .ac-itemfoot{padding-left:0;padding-bottom:8px;margin-left:0}.actfeed1 .ac-itemfoot li.first{background:none;padding-left:0}.actfeed1 .ac-itemfoot li{list-style-type:disc;list-style:none;background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat -1.4em -170px;padding:0 8px 0 11px;margin-top:3px;float:left}.actfeed1 .ac-noitems a:link,.actfeed1 .ac-noitems a:visited,.actfeed1 .ac-list a:link,.actfeed1 .ac-list a:visited,.actfeed1 .ac-errortext a:link,.actfeed1 .ac-errortext a:visited,.actfeed1 .ac-foot .ac-footlefthide a:link,.actfeed1 .ac-foot .ac-footlefthide a:visited{color:#000}.actfeed1 .ac-noitems a:hover,.actfeed1 .ac-noitems a:active,.actfeed1 .ac-list a:hover,.actfeed1 .ac-list a:active,.actfeed1 .ac-errortext a:hover,.actfeed1 .ac-errortext a:active,.actfeed1 .ac-foot .ac-footlefthide a:hover,.actfeed1 .ac-foot .ac-footlefthide a:active{color:#000}.actfeed1 .ac-statustext.ac-statustextcurrent,.actfeed1 .ac-commentinput.ac-statustextcurrent,.actfeed1 .ac-signout a:link,.actfeed1 .ac-signout a:visited,.actfeed1 .ac-foot a:link,.actfeed1 .ac-foot a:visited,.actfeed1 .ac-commenttime,.actfeed1 .ac-liketext,.actfeed1 .ac-liketext a:link,.actfeed1 .ac-liketext a:visited,.actfeed1 .ac-itemfoot a:link,.actfeed1 .ac-itemfoot a:visited,.actfeed1 .ac-allcomments a:link,.actfeed1 .ac-allcomments a:visited{color:#666}.actfeed1 .ac-statustext,.actfeed1 .ac-commentinput,.actfeed1 .ac-signout a:hover,.actfeed1 .ac-signout a:active,.actfeed1 .ac-foot a:hover,.actfeed1 .ac-foot a:active,.actfeed1 .ac-itemfoot a:hover,.actfeed1 .ac-itemfoot a:active,.actfeed1 .ac-liketext a:hover,.actfeed1 .ac-liketext a:active,.actfeed1 .ac-allcomments a:hover,.actfeed1 .ac-allcomments a:active{color:#333}.actfeed1 .ac-itemtext{display:inline;margin:0;padding:0}.actfeed1 .ac-itembody{padding-top:5px}.actfeed1.facebook .ac-itembasic{overflow:hidden;line-height:1.34em;max-height:13.4em}.actfeed1.facebook .ac-itembodymain{max-height:9.3em;line-height:1.34em;overflow:hidden}.actfeed1 .ac-itembodypicdiv{float:left;margin-right:9px}.actfeed1 .ac-noitems{padding:10px 0 10px 0;border-bottom:1px solid #e1e1e1}.actfeed1 .ac-status{margin:0;padding:11px 0 12px 0;border-bottom:2px solid #ccebf7;height:26px}.actfeed1 .ac-statusform{height:26px}.actfeed1 .ac-status .ac-statusmsgs{margin-top:6px}.actfeed1 .ac-statustext,.actfeed1 .ac-commentinput{padding:5px}.actfeed1 .ac-statustext{width:65.3%;float:left}.actfeed1 .ac-commentinput{width:92%;float:right;margin-top:2px}.actfeed1 .ac-commentsubmit{float:right;margin:7px 0 3px 0}.actfeed1 .ac-poststatus{float:right;margin-top:3px;padding:1px 0 0 0;width:27%}.actfeed1 input{font-size:100%;line-height:1.25em}.actfeed1 .ac-foot{padding:6px 0 7px 0;border-bottom:1px solid #e1e1e1}.actfeed1 .ac-footleftshow,.actfeed1 .ac-footlefthide{float:left}.actfeed1 .ac-footright{float:right}.actfeed1 .ac-hidelink{padding-right:15px;background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 100% 3px}.actfeed1 a:hover.ac-hidelink{background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 100% -16px}.actfeed1 .ac-showlink{padding-right:15px;background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 100% -79px}.actfeed1 a:hover.ac-showlink{background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 100% -98px}.actfeed1 .ac-refreshpic{background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 100% -36px;padding-right:17px}.actfeed1 a:hover.ac-refreshpic{background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 100% -58px}.actfeed1 .ac-updatestatus{width:283px;height:91px;text-align:center;vertical-align:middle;padding-top:192px}.actfeed1 .ac-loaddisabled{background:transparent url(../../i/fb/f017d9e8cc630c5e02659b6eaf35fa.gif) no-repeat 0 0}.actfeed1 .ac-comments .ac-commentsform{display:inline}.actfeed1 .ac-comments{list-style-type:none;padding:0;margin:0}.actfeed1 .ac-comments li{list-style:none;padding:10px 0;border-top:1px solid #e1e1e1}.actfeed1 .ac-comments .ac-liketext,.actfeed1 .ac-comments .ac-allcomments{padding:7px 0}.actfeed1 .ac-comments .ac-liketext span,.actfeed1 .ac-comments .ac-allcomments a{padding:0 0 0 30px}.actfeed1 .ac-liketext span{background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 0% -189px}.actfeed1 .ac-allcomments a{background:transparent url(../../i/16/9798fea395258497f598bba500bf83.png) no-repeat 0% -208px}.actfeed1 .ac-comment .ac-itemmain{width:86.5%}.actfeed1 .ac-selfcomment{padding:10px 0 0 0}.actfeed ac-commentinput{width:78%}#wrapper #content .generic1{margin:0 0 1em}.generic1 div.br{margin:0 0 .833em}.generic1 .link{text-align:left}.generic1 .link a{color:#333;font-family:arial;font-size:1.499em;font-weight:normal}.generic1 .richtext p{color:#333;font-family:arial;font-size:.996em;font-weight:normal;line-height:1.333em;text-align:left}.co6b7 .b3,.co6b7 .b4,.co6b7 .b5{display:none}.simple1,.simple1 p{margin:0;padding:0}.simple1 cite{font-style:normal}.simple1 cite,.simple1 label{display:block}.simple1 cite,.simple1 div{margin:.5em 0 0 0}.simple1 input{font-size:100%;line-height:1.25em;outline:none}.simple1 input.button{margin:0;margin-left:.2em}.simple2,.simple2 p{margin:0;padding:0}.simple2 cite{font-style:normal;margin:.5em 0 0;margin-left:-.9em}.simple2 cite,.simple2 label{display:block}.simple2 div{margin:.5em 0 0;margin-left:.9em}.simple2 input{font-size:100%;line-height:1.25em;outline:none}.simple2 input.button{margin:0;margin-left:.2em}.simple3,.simple3 p{margin:0;padding:0}.simple3 cite{font-style:normal;margin:.5em 0 0;margin-left:-.9em}.simple3 cite,.simple3 input,.simple3 label{display:block}.simple3 div{margin:.5em 0 0;margin-left:.9em}.simple3 input{font-size:100%;line-height:1.25em;outline:none}.simple3 input.button{margin:.2em 0 0 0}.simple4,.simple4 p{margin:0;padding:0}.simple4 cite{font-style:normal;margin:0;margin-left:.6em}.simple4 div{margin:.5em 0}.simple4 input{font-size:100%;line-height:1.25em;outline:none}.simple4 input.button{margin:0;margin-left:.2em}.simple5,.simple5 p{margin:0;padding:0}.simple5 cite{display:block;font-style:normal}.simple5 cite,.simple5 div{margin:.5em 0 0 0}.simple5 input{font-size:100%;line-height:1.25em;outline:none}.simple5 input.button{margin:0;margin-left:.2em}.simple6,.simple6 p{margin:0;padding:0}.simple6 cite{display:block;font-style:normal}.simple6 cite,.simple6 div{margin:.5em 0 0 0}.simple6 input{font-size:100%;line-height:1.25em;outline:none}.simple6 input.image{margin:0;margin-left:.2em;vertical-align:bottom}.simple7,.simple7 p{margin:0;padding:0}.simple7 cite{font-style:normal}.simple7 cite,.simple7 input,.simple7 label{clear:left;display:block}.simple7 cite,.simple7 div{margin:.5em 0 0 0}.simple7 input{font-size:100%;line-height:1.25em;outline:none}.simple7 input.button{margin:.2em 0 0 0}.simple8{margin:0;padding:0;position:relative}.simple8 cite,.simple8 p{display:none}.simple8 div{clear:left}.simple8 div div{border:solid 1px #bcbcbc;clear:none;float:left;padding:3px 3px 0 3px}.simple8 input.image{margin:1px 0 0 0}.simple8 input.text{border-width:0;font-size:100%;line-height:1.25em;outline:none;padding:4px 3px 0 0;vertical-align:top}.simple8 label{color:#666;display:block}.hlcp1 .pri .last{float:left}.hlcpm1 .hlcp1 .pri .piped,.hlcpm1 .hlcp1 .pri a,.hlcpm1 .hlcp1 .pri a:link,.hlcpm1 .hlcp1 .pri a:visited,.hlcpm1 .hlcp2 .pri .piped,.hlcpm1 .hlcp2 .pri a,.hlcpm1 .hlcp2 .pri a:link,.hlcpm1 .hlcp2 .pri a:visited{font-size:150%}.hcpep1 ul{list-style-type:none;margin:0;padding:0}.hcpep1 li,.hcpep1 li.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2236px;display:block;line-height:1.25em;margin:0;padding:.5em 0 .5em 19px}.hcpep1 li.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2350px}.hcpep1 span.piped span.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2354px;padding:.083em 0 .083em 19px}.hcpep1 .date{color:#999;clear:both;padding:.333em 0 1.667em 0}.hcpep1 span.icon{display:inline-block;font-size:75%;text-decoration:none}.hcpep1 span.new{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:14px;padding-top:1px}.hcpep1 span.fresh1{background:transparent url(../../i/d7/fb6441a4c45cb3a3b2f592d914a3cd.gif) no-repeat right center;padding-right:33px;padding-top:1px}.hcpep1 span.fresh2{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:14px;padding-top:1px}.hcpep1 span.fresh3{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:14px;padding-top:1px}.hcpep1 span.photo{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:1px}.hcpep1 span.dest1{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:3px}.hcpep1 span.dest2{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:3px}.hcpep1 span.dest3{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:3px}.hcpep2 ul{list-style-type:none;margin:0;padding:0}.hcpep2 li,.hcpep2 li.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2236px;display:block;float:left;line-height:1.25em;margin:0 7px 0 8px;padding:.5em 0 .5em 19px;width:42%}.hcpep2 li.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2350px}.hcpep2 span.piped span.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2354px;padding:.083em 0 .083em 19px}.hcpep2 .date{color:#999;clear:both;padding:.333em 0 1.667em 0}.hcpep2 span.icon{display:inline-block;font-size:75%;text-decoration:none}.hcpep2 span.new{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:14px;padding-top:1px}.hcpep2 span.fresh1{background:transparent url(../../i/d7/fb6441a4c45cb3a3b2f592d914a3cd.gif) no-repeat right center;padding-right:33px;padding-top:1px}.hcpep2 span.fresh2{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:14px;padding-top:1px}.hcpep2 span.fresh3{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:14px;padding-top:1px}.hcpep2 span.photo{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:1px}.hcpep2 span.dest1{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:3px}.hcpep2 span.dest2{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:3px}.hcpep2 span.dest3{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:3px}.hcpep3 ul{list-style-type:none;margin:0;padding:0}.hcpep3 li,.hcpep3 li.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2236px;display:block;float:left;line-height:1.25em;margin:0 7px 0 8px;padding:.5em 0 .5em 19px;width:27%}.hcpep3 li.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2350px}.hcpep3 span.piped span.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2354px;padding:.083em 0 .083em 19px}.hcpep3 .date{color:#999;clear:both;padding:.333em 0 1.667em 0}.hcpep3 span.icon{display:inline-block;font-size:75%;text-decoration:none}.hcpep3 span.new{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:14px;padding-top:1px}.hcpep3 span.fresh1{background:transparent url(../../i/d7/fb6441a4c45cb3a3b2f592d914a3cd.gif) no-repeat right center;padding-right:33px;padding-top:1px}.hcpep3 span.fresh2{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:14px;padding-top:1px}.hcpep3 span.fresh3{background:transparent url(../../i/77/b23a82d78a0605243aad8f44e8c079.gif) no-repeat right center;padding-right:14px;padding-top:1px}.hcpep3 span.photo{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:1px}.hcpep3 span.dest1{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:3px}.hcpep3 span.dest2{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:3px}.hcpep3 span.dest3{background:transparent url(../../i/b9/ab98403e7de9ce52839e5de99d27e5.gif) no-repeat right center;padding-right:11px;padding-top:3px}.local1 .br5 h3{font-size:100%;font-weight:normal;line-height:1.67em}.local1 .simple8{margin-top:8px}.local1 input{width:237px}.local1 .simple8 div div{float:none;width:262px}.local1 .simple8 div.loclist{background-color:#fff;border:1px solid #bcbcbc;clear:left;margin:10px 0 0 0;padding:0;position:absolute;width:268px}.local1 .simple8 div.loclist a.cancel{border:solid 1px #bcbcbc;float:right;padding:0 3px;margin:2px 2px 0 0}.local1 .simple8 div.loclist.down{top:45px}.local1 .simple8 div.loclist.up{bottom:28px}.local1 .simple8 div.loclist ul{list-style-type:none;margin:0;padding:0}.local1 .simple8 div.loclist ul li a{display:block;padding:5px 10px}.local1 .simple8 div.loclist ul li a:hover,.local1 .simple8 div.loclist ul li a:active{color:#333;background-color:#e5e5e5}.local1 .simple8 div.loclist ul li p{display:block;font-weight:normal;margin:0;padding:5px 10px}.local1 .simple8 .image{cursor:pointer}.weather1{line-height:1.25em}.weather1 .selected a,.weather1 .selected a:link,.weather1 .selected a:visited,.weather1 h4 a,.weather1 h4 a:link,.weather1 h4 a:visited,.weather1 .temp,.weather1 .conditions,.weather1 ul.degreetype li a:hover,.weather1 ul.forecasts a:hover,.weather1 div.today a:hover,.weather1 div.today a:hover span{color:#333}.weather1 .selected a:hover,.weather1 .selected a:active,.weather1 h4 a:hover,.weather1 h4 a:active,.weather1 ul.forecasts a:hover,.weather1 div.conditions a:hover,.weather1 .today li a:hover,.weather1 ul.degreetype li a:hover{color:#333}.weather1 h4 a:hover,.weather1 div.temp a:hover{color:#000}.weather1 .h3{line-height:1.4em;margin-bottom:.31em}.weather1 .h3 a{color:#666;float:left;font-size:117%;font-weight:bold}.weather1 .h3 span a.mapit{color:#333;font-size:83%;font-weight:normal;text-align:right;width:100%}.weather1 .h3 span{float:right}.weather1 div.data{float:left;padding-left:1.35em}.weather1 div.conditions{padding-bottom:1.75em}.weather1 div.msgbox{padding-top:.833em}.weather1 div.temp{font-size:150%;font-weight:bold;line-height:normal;padding:.2em 0 .35em 0}.weather1 div.today{height:1em;padding-bottom:.667em;width:100%}.weather1 div.today a,.weather1 div.today a:link,.weather1 div.today a:visited,.weather1 ul.degreetype li,.weather1 ul.degreetype li a{color:#666}.weather1 div.today ul,.weather1 ul{list-style-type:none;margin:0;padding:0}.weather1 div.weaheading{padding-bottom:.63em}.weather1 h4,.weather1 img{float:left}.weather1 div.weahr{border-top:solid 1px;color:#e1e1e1;margin-bottom:.7em}.weather1 ul.degreetype{float:right;text-align:right;width:20%}.weather1 ul.degreetype li{display:inline;padding:0}.weather1 ul.degreetype li.celsius{padding:0 0 0 1.417em}.weather1 ul.degreetype li.selected{font-weight:bold;color:#333}.weather1 ul.forecasts a,.weather1 ul.forecasts a:link,.weather1 ul.forecasts a:visited,.weather1 ul.degreetype li.selected a{color:#333}.weather1 div.conditions a{color:#666}.weather1 ul.forecasts li,.weather1 div.today ul li{border-right:solid 1px #333;float:left;font-size:100%;padding:0 .917em;text-align:right}.weather1 ul.forecasts li.first,.weather1 div.today ul li.first{padding-left:0}.weather1 ul.forecasts li.last,.weather1 div.today ul li.last{border:none}.weather1 h3.h3{font-size:117%}.weather1 h3.h3 a{font-size:100%}.weather1 .weaheading h4{font-size:100%}.weather1 div.temp a{font-weight:bold;line-height:1em}.weather1 ul.forecasts a:hover,.weather1 div.conditions a:hover,.weather1 .today li a:hover,.weather1 ul.degreetype li a:hover,.weather1 .h3 span a:hover{color:#333}.weather1 ul.forecasts a:hover,.weather1 ul.degreetype li.selected a:hover,.weather1 .h3 span a:hover,.weather1 h3.h3 span a:hover,.weather1 h4 a:hover{color:#000}.weather2 .location{border-right:1px solid #333;float:left;margin-top:.417em;padding:0 .333em}.weather2 .forecast{float:left}.weather2 .forecast .weatherimage{float:left;margin:.25em .25em 0 .2em}.weather2 .forecast .minidata{float:left;margin-top:.417em}.weather2 .forecast .minidata .weaheading{float:left}.weather2{float:right;margin:.66em}.weather2 .weaheading ul.degreetype li{display:inline;padding:.083em .25em .083em .083em}.weather2 .h3{line-height:1.4em;margin-bottom:.31em}.weather2 .h3 a{color:#333;float:left;font-size:100%;font-weight:bold}.weather2 ul.degreetype li.selected{color:#333;font-weight:bold}.weather2 ul.forecasts a,.weather2 ul.forecasts a:link,.weather2 ul.forecasts a:visited,.weather2 ul.degreetype li.selected a{color:#333}.weather2 div.today{display:inline;float:left;height:1em;padding-bottom:.667em}.weather2 div.today ul,.weather2 ul{display:inline;list-style-type:none;margin-left:.417em;padding:0}.weather2 div.today ul li{float:left;font-size:100%;padding:0 .917em;text-align:right}.weather2 ul.degreetype li.celsius{padding:0}.hideminiweather{visibility:hidden}.weather2 .degreetype li a,.weather2 .degreetype li a:link{color:#666}.weather2 .degreetype li.selected a,.weather2 .degreetype li.selected a:link{color:#333}.locnews1 ul{list-style-type:none;margin:0;padding:0}.locnews1 ul li{border-bottom:solid 1px #e1e1e1;line-height:1.25em;padding:.583em 0}.locnews1 ul.msg li{border-top:0;border-bottom:0}.locnews1 ul li.first{border-top:solid 1px #e1e1e1;margin:.583em 0 0 0}.locnews1 p.msg{line-height:1.33em;margin:0 0 5.417em 0}.locnews1 .seemore{font-style:italic;line-height:1.25em;padding:.583em 0 0 0;text-align:right}.locnews1 .hideseemore{display:none}.locnews1 ul li.last{border-bottom:none}.locevents1 ul{list-style-type:none;margin:0;padding:0}.locevents1 ul li{border-bottom:solid 1px #e1e1e1;line-height:1.25em;padding:.583em 0}.locevents1 ul li.first{border-top:solid 1px #e1e1e1;margin:.583em 0 0 0}.locevents1 p.msg{line-height:1.33em;margin:0 0 5.417em 0}.locevents1 .seemore{font-style:italic;line-height:1.25em;padding:.583em 0 0 0;text-align:right}.locevents1 .hideseemore{display:none}.locevents1 ul li.last{border-bottom:none}.locsports1 ul{list-style-type:none;margin:0;padding:0}.locsports1 ul li{border-bottom:solid 1px #e1e1e1;line-height:1.25em;padding:.583em 0}.locsports1 ul.msg li{border-top:0;border-bottom:0}.locsports1 ul li.first{border-top:solid 1px #e1e1e1;margin:.583em 0 0 0}.locsports1 p.msg{line-height:1.33em;margin:0 0 5.417em 0}.locsports1 .seemore{font-style:italic;line-height:1.25em;padding:.583em 0 0 0;text-align:right}.locsports1 .hideseemore{display:none}.locsports1 ul li.last{border-bottom:none}.lmlsf1 .findmore{border-bottom:solid 1px #e1e1e1;height:1%;line-height:1.43em;padding:0 0 .833em;overflow:hidden}.lmlsf1 .findmore div{float:left}.lmlsf1 .findmore ul li.first{padding:0 .8em 0 .583em}.lmlsf1 .findmore strong{font-size:100%}.lmlsf1 .simpleform p{display:block;font-size:100%;font-weight:bold;line-height:1.43em;margin:.833em 0}.linklist22{list-style-type:none;margin:0;padding:0}.linklist22 li{border-top:solid 1px #e1e1e1;line-height:1.25em;padding:.583em 0}#wrapper .money1 .br2{margin:0}#wrapper .money1 .br1{float:none}.money1 .indices1 table{border-collapse:collapse;border-spacing:0;width:91%}.money1 .simple8 input.text{width:20.583em}.money1 .siidx{font-weight:bold}.indices1 a,.indices1 a:link,.indices1 a:visited{color:#333}.indices1 a:hover,.indices1 a:active{color:#000}.indices1 caption,.indices1 thead{display:none}.indices1 td{color:#333;padding:0 0 0 .833em;line-height:1.25em;text-align:right}.indices1 td.neg{color:#c30505}.indices1 td.pos{color:#090}.indices1 td.siidx{padding:0 1em 0 0;text-align:left}.indices1 .sitime{text-align:left;color:#999;padding-bottom:.333em}.co4b3 .b3{display:none}.co4b3 .br{float:left}.co4b3 .br1{clear:both;display:block;float:none}.co4b3 .more{clear:both}.co4b3 .br .more{clear:none}.co4b4 .b3{display:none}.co4b4 .br{float:left}.co4b4 .br4{clear:both;display:block;float:none}.co4b4 .more{clear:both}.co4b6 .b3{display:none}.co4b6 .br{clear:right}.co4b6 .br1{float:left}.co4b6 .br2,.co4b6 .br3,.co4b6 .br4{float:right}.co4b6 .more{clear:both;float:none}.co4b6 .br .more{clear:none}.co4b7 .b3{display:none}.co4b7 .br1{float:right}.co4b7 .more{clear:left}.co4b7 .br .more{clear:none}.co4b9 .b3{display:none}.co4b9 .br{float:left}.co4b9 .br1,.co4b9 .br2{clear:both;display:block;float:none}.co4b9 .more{clear:both}.co4b9 .br .more{clear:none}.co4b10 .b3{display:none}.co4b10 .br{float:left}.co4b10 .br1,.co4b10 .br4{clear:both;display:block;float:none}.co4b10 .more{clear:both}.co4b10 .br .more{clear:none}div.hlcp3 li.ter{background:transparent url(../../i/0c/c57bc2a7d38843d7c4aa8028fc9f82.gif) no-repeat scroll 0 center;padding:.167em .6em;white-space:nowrap}div.hlcp3 li.ter .piped a{background:transparent url(../../i/0c/c57bc2a7d38843d7c4aa8028fc9f82.gif) no-repeat scroll 0 center;margin-left:-.2em;padding-left:.7em}div.hlcp3 li.ter span{color:#fff}.headlinelist1 div{float:left}.headlinelist1 ul{display:block;margin:0;padding:0}.headlinelist1 ul li{border-top:solid 1px #e1e1e1;display:list-item;line-height:1.25em;list-style-type:none;margin:0;padding:.583em 0}.headlinelist1 ul li.first{border-top:none;padding-top:0}.headlinelist1 span.media{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2355px;display:inline-block}.headlinelist1 span.media a{margin-left:19px}.adserved1 ul{margin:0;padding:0 0 0 .833em}.adserved1 ul li{border-top:solid 1px #e1e1e1;display:list-item;line-height:1.25em;list-style-type:none;margin:0;padding:.583em 0}.adserved1 ul li.first{border-top:none;padding-top:0}.slupsell1 .appbar .detail{position:absolute;height:326px;width:520px}.slupsell1 .appbar .detail .hidden{left:-9000px;top:0;position:absolute}.single2 .linklist22 li.first{border-top:none;padding-top:0}.single2 .orderedlist1{margin:0 0 0 1.5em}.single2 .imglinkabslist23 li a{font-size:150%}.w4 .single2 .imglinkabslist17 li,.w4 .single2 .linkedimgabslist7 li,.w4 .single2 .linkedimglinklist14 li,.w4 .single2 .linkedimglinklist17 li{margin:0 1.75em 0 0;min-width:86px;padding:0;width:7.167em}.w8 .single2 .imglinkabslist17 li,.w8 .single2 .linkedimgabslist7 li,.w8 .single2 .linkedimglinklist14 li,.w8 .single2 .linkedimglinklist17 li{margin:0 2.16em 0 0;min-width:192px;padding:0;width:16em}.w4 .single2 .linklist15 li{margin:0 1.75em 0 0;min-width:77px;padding:.25em 0 .25em .75em;width:7.167em}.w8 .single2 .linklist15 li{margin:0 1.333em 0 0;min-width:183px;padding:.25em 0 .5em .75em;width:15.25em}.w4 .single2 .imglinkabslist23 li,.w4 .single2 .linkedimglinklist18 li{margin:0 1.667em 0 0;min-width:60px;padding:0;width:5em}.w8 .single2 .imglinkabslist23 li,.w8 .single2 .linkedimglinklist18 li{margin:0 2.25em 0 0;min-width:136px;padding:0;width:11.333em}.w4 .single2 .imglinkabslist17 li.last,.w4 .single2 .linkedimgabslist7 li.last,.w4 .single2 .linkedimglinklist14 li.last,.w4 .single2 .linkedimglinklist17 li.last,.w4 .single2 .linklist15 li.last,.w8 .single2 .imglinkabslist17 li.last,.w8 .single2 .linkedimgabslist7 li.last,.w8 .single2 .linkedimglinklist14 li.last,.w8 .single2 .linkedimglinklist17 li.last,.w8 .single2 .linklist15 li.last,.w4 .single2 .imglinkabslist23 li.last,.w4 .single2 .linkedimglinklist18 li.last,.w8 .single2 .imglinkabslist23 li.last,.w8 .single2 .linkedimglinklist18 li.last{margin:0}.single2 .linkedimglinklist16 a{text-align:left}.w4 .single2 .linkedimglinklist16 li{margin-right:.833em;width:12.083em}.single2 .linkedimglinklist16 li.last{margin-right:0}.complex2,.complex2 p{margin:0;padding:0}.complex2 fieldset{border:none;clear:both}.complex2 fieldset.last div{display:block}.complex2 cite,.complex2 label{display:block;font-style:normal}.complex2 cite,.complex2 div{margin-top:.4em}.complex2 select{font-size:100%}.complex2 input{font-size:100%;line-height:1.25em}.complex2 label,.complex2 select{margin-bottom:.2em}.complex2 input.alt{float:right}.linkedimgabslist7{list-style-type:none;margin:0;padding:0}.linkedimgabslist7 img{border:solid 1px #333;float:left;margin-bottom:3px;margin-right:6px}.linkedimgabslist7 li{display:block;float:left;margin-bottom:.9em;margin-right:1%;width:29%}.linkedimglinklist1{list-style-type:none;margin:0;padding:0}.linkedimglinklist1 a{display:block}.linkedimglinklist1 a:after{content:".";clear:both;display:block;height:0;visibility:hidden}.linkedimglinklist1 img{border:none;float:left;margin-bottom:.4em;margin-right:.4em}.linkedimglinklist1 li{margin-bottom:.9em}.linkedimglinklist1 li.last{margin-bottom:0}.linkedimglinklist1 a span{cursor:pointer;float:left;padding-top:6px}.linkedimglinklist1 a span span{padding-top:0}.linkedimglinklist14{list-style-type:none;margin:0;padding:0}.linkedimglinklist14 a{display:block}.linkedimglinklist14 a:after{content:".";clear:both;display:block;height:0;visibility:hidden}.linkedimglinklist14 img{border:none;float:left;margin-bottom:.4em;margin-right:.4em}.linkedimglinklist14 li{display:block;float:left;margin-bottom:.9em;margin-right:3%;position:relative;width:29%}.linkedimglinklist14 a span{cursor:pointer;float:left;padding-top:6px}.linkedimglinklist16{list-style-type:none;margin:0;padding:0}.linkedimglinklist16 a,.linkedimglinklist16 img{display:block;margin:0 auto;text-align:center}.linkedimglinklist16 img{border:none;margin-bottom:.4em}.linkedimglinklist16 li{display:block;float:left;margin-bottom:.9em;margin-right:3%;position:relative;width:47%}.linkedimglinklist17{list-style-type:none;margin:0;padding:0}.linkedimglinklist17 a,.linkedimglinklist17 img{display:block;margin:0 auto;text-align:center}.linkedimglinklist17 img{border:none;margin-bottom:.4em}.linkedimglinklist17 li{display:block;float:left;margin-bottom:.9em;margin-right:3%;position:relative;width:29%}.linkedimglinklist18{list-style-type:none;margin:0;padding:0}.linkedimglinklist18 a,.linkedimglinklist18 img{display:block;margin:0 auto;text-align:center}.linkedimglinklist18 img{border:none;margin-bottom:.4em}.linkedimglinklist18 li{display:block;float:left;margin-bottom:.9em;margin-right:3%;position:relative;width:21%}.linklist8{list-style-type:none;margin:0;padding:0}.linklist8 a{white-space:pre}.linklist8 li{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat right -3788px;float:left;margin:0;margin-right:.7em;padding:0;padding-right:.8em}.linklist8 li.last{background-image:none;margin:0;padding:0}.orderedlist1{list-style-type:decimal;margin:0;margin-left:3em;padding:0}.orderedlist1 li{margin:0;padding:.25em 0 .2em 0}.scp1 p{line-height:1.5em;margin:0;padding:0}.scp1 p a,.scp1 p a:link,.scp1 p a:visited,.scp1 p a:hover,.scp1 p a:active{text-decoration:underline}.scp1 ul,.scp1 li{line-height:1.25em;list-style:none;margin:0;padding:0}.scp1 img,.scp1 .headline li.first{border:0}.scp1 img,.scp1 object{display:block;float:left}.scp1 .npane img{margin-bottom:1em}.scp1 span a,.scp1 span .media a{padding-bottom:.13em}.scp1 li span a{padding-bottom:.47em}.scp1 .media a,.scp1 .piped .media a{background:transparent url(../../i/c6/7980776cb684844c20339b839ac35e.gif) no-repeat 0 -2355px;font-size:100%;line-height:1.25em;padding-left:19px;padding-bottom:.13em}.scp1 .piped a{background:none;font-size:100%;line-height:1.25em;padding-bottom:.13em}.scp1 span .media a{padding-left:0}.scp1 span a,.scp1 span .media a,.scp1 .npane.n2 span.hlnotlinked,.scp1 .npane.n3 span.hlnotlinked{background:none;display:inline;font-size:250%;line-height:1.13em}.scp1 .npane.n3,.scp1 .npane.n3 span.hlnotlinked{margin:0 auto}.scp1 .npane.n3,.scp1 .npane.n2{text-align:center}.scp1 .linkedimg{text-align:left}.scp1 .npane.n2 li{padding:0 1em}.scp1 .npane.n2 .first{padding-left:0}.scp1 .npane.n2 .last{padding-right:0}.scp1 .npane li{margin:0 auto;text-align:center}.scp1 .headline ul{padding-left:2.08em}.scp1 .npane li,.scp1 .headline img,.scp1 .headline object,.scp1 .npane{float:left}.scp1 .richtext,.scp1 .headline{text-align:left}.scp1 .headline ul,.scp1 div{float:none}.scp1 .headline li{border-top:solid 1px #e1e1e1;padding:.42em 0}.scp1 .headline li.last{border-bottom:solid 1px #e1e1e1}.scp1 .npane a{clear:left}.scp1 .npane li a{display:block} \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/07/617475cf39bf6f5c0bd6ecb985335c.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/07/617475cf39bf6f5c0bd6ecb985335c.gif deleted file mode 100755 index a7d9c2e79..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/07/617475cf39bf6f5c0bd6ecb985335c.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/09/4ebdf19a1ce03cce12e11926256422.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/09/4ebdf19a1ce03cce12e11926256422.gif deleted file mode 100755 index 4ff69a3c0..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/09/4ebdf19a1ce03cce12e11926256422.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/0c/c57bc2a7d38843d7c4aa8028fc9f82.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/0c/c57bc2a7d38843d7c4aa8028fc9f82.gif deleted file mode 100755 index 7b5405b04..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/0c/c57bc2a7d38843d7c4aa8028fc9f82.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/11/999518480e3c07301320f84f4bd855.png b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/11/999518480e3c07301320f84f4bd855.png deleted file mode 100755 index 782d2e9bf..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/11/999518480e3c07301320f84f4bd855.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/16/9798fea395258497f598bba500bf83.png b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/16/9798fea395258497f598bba500bf83.png deleted file mode 100755 index 7a339f83f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/16/9798fea395258497f598bba500bf83.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/1a/57011fe37f98be0ee74ce87a62ba9b.png b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/1a/57011fe37f98be0ee74ce87a62ba9b.png deleted file mode 100755 index f3fe32a3d..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/1a/57011fe37f98be0ee74ce87a62ba9b.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/50/f63ed0301e8b02a8a42d8590a46291.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/50/f63ed0301e8b02a8a42d8590a46291.gif deleted file mode 100755 index c8bf622d2..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/50/f63ed0301e8b02a8a42d8590a46291.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/61/379589e51e05637f600f129f305b52.png b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/61/379589e51e05637f600f129f305b52.png deleted file mode 100755 index 077b4a4b0..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/61/379589e51e05637f600f129f305b52.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/61/def0ebad64d00fda0702cb7b8179ea.png b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/61/def0ebad64d00fda0702cb7b8179ea.png deleted file mode 100755 index d8cc60346..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/61/def0ebad64d00fda0702cb7b8179ea.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/62/b5797d19976f0955d6d5d5c87ec996.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/62/b5797d19976f0955d6d5d5c87ec996.jpg deleted file mode 100755 index 79caddac4..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/62/b5797d19976f0955d6d5d5c87ec996.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/77/b23a82d78a0605243aad8f44e8c079.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/77/b23a82d78a0605243aad8f44e8c079.gif deleted file mode 100755 index 1c10fc687..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/77/b23a82d78a0605243aad8f44e8c079.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/94/8b0fe9bcd1399077fdc9374e5f314d_1.png b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/94/8b0fe9bcd1399077fdc9374e5f314d_1.png deleted file mode 100755 index 3f11704f6..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/94/8b0fe9bcd1399077fdc9374e5f314d_1.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/b9/ab98403e7de9ce52839e5de99d27e5.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/b9/ab98403e7de9ce52839e5de99d27e5.gif deleted file mode 100755 index b8a3f451e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/b9/ab98403e7de9ce52839e5de99d27e5.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/c6/7980776cb684844c20339b839ac35e.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/c6/7980776cb684844c20339b839ac35e.gif deleted file mode 100755 index d30d7a942..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/c6/7980776cb684844c20339b839ac35e.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/d7/fb6441a4c45cb3a3b2f592d914a3cd.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/d7/fb6441a4c45cb3a3b2f592d914a3cd.gif deleted file mode 100755 index 888a2f90b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/d7/fb6441a4c45cb3a3b2f592d914a3cd.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/f8/614595fba50d96389708a4135776e4.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/f8/614595fba50d96389708a4135776e4.gif deleted file mode 100755 index 8af01434a..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/f8/614595fba50d96389708a4135776e4.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/fb/f017d9e8cc630c5e02659b6eaf35fa.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/fb/f017d9e8cc630c5e02659b6eaf35fa.gif deleted file mode 100755 index e26786b41..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/fb/f017d9e8cc630c5e02659b6eaf35fa.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/ff/290e7f0b12fa8a201581c74c1ae75a.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/ff/290e7f0b12fa8a201581c74c1ae75a.gif deleted file mode 100755 index cc3801c22..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/ff/290e7f0b12fa8a201581c74c1ae75a.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/icons/BING_websearch_2.jpg b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/icons/BING_websearch_2.jpg deleted file mode 100755 index 4027d2428..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/icons/BING_websearch_2.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/icons/adchoices_gif.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/icons/adchoices_gif.gif deleted file mode 100755 index a959edf65..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stc.s-msn.com/br/sc/i/icons/adchoices_gif.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stj.s-msn.com/br/sc/js/jquery/jquery-1.4.2.min.js b/mobile/android/tests/browser/chrome/tp5/msn.com/col.stj.s-msn.com/br/sc/js/jquery/jquery-1.4.2.min.js deleted file mode 100755 index 100db1a9a..000000000 --- a/mobile/android/tests/browser/chrome/tp5/msn.com/col.stj.s-msn.com/br/sc/js/jquery/jquery-1.4.2.min.js +++ /dev/null @@ -1,154 +0,0 @@ -/*! - * jQuery JavaScript Library v1.4.2 - * http://jquery.com/ - * - * Copyright 2010, John Resig - * Dual licensed under the MIT or GPL Version 2 licenses. - * http://jquery.org/license - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * Copyright 2010, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * - * Date: Sat Feb 13 22:33:48 2010 -0500 - */ -(function(A,w){function ma(){if(!c.isReady){try{s.documentElement.doScroll("left")}catch(a){setTimeout(ma,1);return}c.ready()}}function Qa(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,j){var i=a.length;if(typeof b==="object"){for(var o in b)X(a,o,b[o],f,e,d);return a}if(d!==w){f=!j&&f&&c.isFunction(d);for(o=0;o)[^>]*$|^#([\w-]+)$/,Ua=/^.[^:#\[\.,]*$/,Va=/\S/, -Wa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Xa=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,P=navigator.userAgent,xa=false,Q=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,R=Array.prototype.slice,ya=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(a==="body"&&!b){this.context=s;this[0]=s.body;this.selector="body";this.length=1;return this}if(typeof a==="string")if((d=Ta.exec(a))&& -(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:s;if(a=Xa.exec(a))if(c.isPlainObject(b)){a=[s.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=sa([d[1]],[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}return c.merge(this,a)}else{if(b=s.getElementById(d[2])){if(b.id!==d[2])return T.find(a);this.length=1;this[0]=b}this.context=s;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=s;a=s.getElementsByTagName(a);return c.merge(this, -a)}else return!b||b.jquery?(b||T).find(a):c(b).find(a);else if(c.isFunction(a))return T.ready(a);if(a.selector!==w){this.selector=a.selector;this.context=a.context}return c.makeArray(a,this)},selector:"",jquery:"1.4.2",length:0,size:function(){return this.length},toArray:function(){return R.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){var f=c();c.isArray(a)?ba.apply(f,a):c.merge(f,a);f.prevObject=this;f.context=this.context;if(b=== -"find")f.selector=this.selector+(this.selector?" ":"")+d;else if(b)f.selector=this.selector+"."+b+"("+d+")";return f},each:function(a,b){return c.each(this,a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(s,c);else Q&&Q.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(R.apply(this,arguments),"slice",R.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this, -function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,j,i,o;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b
a"; -var e=d.getElementsByTagName("*"),j=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!j)){c.support={leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(j.getAttribute("style")),hrefNormalized:j.getAttribute("href")==="/a",opacity:/^0.55$/.test(j.style.opacity),cssFloat:!!j.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:s.createElement("select").appendChild(s.createElement("option")).selected, -parentNode:d.removeChild(d.appendChild(s.createElement("div"))).parentNode===null,deleteExpando:true,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};b.type="text/javascript";try{b.appendChild(s.createTextNode("window."+f+"=1;"))}catch(i){}a.insertBefore(b,a.firstChild);if(A[f]){c.support.scriptEval=true;delete A[f]}try{delete b.test}catch(o){c.support.deleteExpando=false}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function k(){c.support.noCloneEvent= -false;d.detachEvent("onclick",k)});d.cloneNode(true).fireEvent("onclick")}d=s.createElement("div");d.innerHTML="";a=s.createDocumentFragment();a.appendChild(d.firstChild);c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var k=s.createElement("div");k.style.width=k.style.paddingLeft="1px";s.body.appendChild(k);c.boxModel=c.support.boxModel=k.offsetWidth===2;s.body.removeChild(k).style.display="none"});a=function(k){var n= -s.createElement("div");k="on"+k;var r=k in n;if(!r){n.setAttribute(k,"return;");r=typeof n[k]==="function"}return r};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=j=null}})();c.props={"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ya=0,za={};c.extend({cache:{},expando:G,noData:{embed:true,object:true, -applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var f=a[G],e=c.cache;if(!f&&typeof b==="string"&&d===w)return null;f||(f=++Ya);if(typeof b==="object"){a[G]=f;e[f]=c.extend(true,{},b)}else if(!e[f]){a[G]=f;e[f]={}}a=e[f];if(d!==w)a[b]=d;return typeof b==="string"?a[b]:a}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==A?za:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{if(c.support.deleteExpando)delete a[c.expando]; -else a.removeAttribute&&a.removeAttribute(c.expando);delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===w){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===w&&this.length)f=c.data(this[0],a);return f===w&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this, -a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b=== -w)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var Aa=/[\n\t]/g,ca=/\s+/,Za=/\r/g,$a=/href|src|style/,ab=/(button|input)/i,bb=/(button|input|object|select|textarea)/i, -cb=/^(a|area)$/i,Ba=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(n){var r=c(this);r.addClass(a.call(this,n,r.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d-1)return true;return false},val:function(a){if(a===w){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var j=b?d:0;for(d=b?d+1:e.length;j=0;else if(c.nodeName(this,"select")){var u=c.makeArray(r);c("option",this).each(function(){this.selected= -c.inArray(c(this).val(),u)>=0});if(!u.length)this.selectedIndex=-1}else this.value=r}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return w;if(f&&b in c.attrFn)return c(a)[b](d);f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==w;b=f&&c.props[b]||b;if(a.nodeType===1){var j=$a.test(b);if(b in a&&f&&!j){if(e){b==="type"&&ab.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed"); -a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:bb.test(a.nodeName)||cb.test(a.nodeName)&&a.href?0:w;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&j?a.getAttribute(b,2):a.getAttribute(b);return a===null?w:a}return c.style(a,b,d)}});var O=/\.(.*)$/,db=function(a){return a.replace(/[^\w\s\.\|`]/g, -function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==A&&!a.frameElement)a=A;var e,j;if(d.handler){e=d;d=e.handler}if(!d.guid)d.guid=c.guid++;if(j=c.data(a)){var i=j.events=j.events||{},o=j.handle;if(!o)j.handle=o=function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w};o.elem=a;b=b.split(" ");for(var k,n=0,r;k=b[n++];){j=e?c.extend({},e):{handler:d,data:f};if(k.indexOf(".")>-1){r=k.split("."); -k=r.shift();j.namespace=r.slice(0).sort().join(".")}else{r=[];j.namespace=""}j.type=k;j.guid=d.guid;var u=i[k],z=c.event.special[k]||{};if(!u){u=i[k]=[];if(!z.setup||z.setup.call(a,f,r,o)===false)if(a.addEventListener)a.addEventListener(k,o,false);else a.attachEvent&&a.attachEvent("on"+k,o)}if(z.add){z.add.call(a,j);if(!j.handler.guid)j.handler.guid=d.guid}u.push(j);c.event.global[k]=true}a=null}}},global:{},remove:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){var e,j=0,i,o,k,n,r,u,z=c.data(a), -C=z&&z.events;if(z&&C){if(b&&b.type){d=b.handler;b=b.type}if(!b||typeof b==="string"&&b.charAt(0)==="."){b=b||"";for(e in C)c.event.remove(a,e+b)}else{for(b=b.split(" ");e=b[j++];){n=e;i=e.indexOf(".")<0;o=[];if(!i){o=e.split(".");e=o.shift();k=new RegExp("(^|\\.)"+c.map(o.slice(0).sort(),db).join("\\.(?:.*\\.)?")+"(\\.|$)")}if(r=C[e])if(d){n=c.event.special[e]||{};for(B=f||0;B=0){a.type= -e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();c.event.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return w;a.result=w;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(j){}if(!a.isPropagationStopped()&& -f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){f=a.target;var i,o=c.nodeName(f,"a")&&e==="click",k=c.event.special[e]||{};if((!k._default||k._default.call(d,a)===false)&&!o&&!(f&&f.nodeName&&c.noData[f.nodeName.toLowerCase()])){try{if(f[e]){if(i=f["on"+e])f["on"+e]=null;c.event.triggered=true;f[e]()}}catch(n){}if(i)f["on"+e]=i;c.event.triggered=false}}},handle:function(a){var b,d,f,e;a=arguments[0]=c.event.fix(a||A.event);a.currentTarget=this;b=a.type.indexOf(".")<0&&!a.exclusive; -if(!b){d=a.type.split(".");a.type=d.shift();f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)")}e=c.data(this,"events");d=e[a.type];if(e&&d){d=d.slice(0);e=0;for(var j=d.length;e-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d},fa=function(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Fa(d);if(a.type!=="focusout"||d.type!=="radio")c.data(d,"_change_data", -e);if(!(f===w||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}};c.event.special.change={filters:{focusout:fa,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return fa.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return fa.call(this,a)},beforeactivate:function(a){a=a.target;c.data(a, -"_change_data",Fa(a))}},setup:function(){if(this.type==="file")return false;for(var a in ea)c.event.add(this,a+".specialChange",ea[a]);return da.test(this.nodeName)},teardown:function(){c.event.remove(this,".specialChange");return da.test(this.nodeName)}};ea=c.event.special.change.filters}s.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,f)}c.event.special[b]={setup:function(){this.addEventListener(a, -d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var j in d)this[b](j,f,d[j],e);return this}if(c.isFunction(f)){e=f;f=w}var i=b==="one"?c.proxy(e,function(k){c(this).unbind(k,i);return e.apply(this,arguments)}):e;if(d==="unloaddisabled"&&b!=="one")this.one(d,f,e);else{j=0;for(var o=this.length;j0){y=t;break}}t=t[g]}m[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, -e=0,j=Object.prototype.toString,i=false,o=true;[0,0].sort(function(){o=false;return 0});var k=function(g,h,l,m){l=l||[];var q=h=h||s;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||typeof g!=="string")return l;for(var p=[],v,t,y,S,H=true,M=x(h),I=g;(f.exec(""),v=f.exec(I))!==null;){I=v[3];p.push(v[1]);if(v[2]){S=v[3];break}}if(p.length>1&&r.exec(g))if(p.length===2&&n.relative[p[0]])t=ga(p[0]+p[1],h);else for(t=n.relative[p[0]]?[h]:k(p.shift(),h);p.length;){g=p.shift();if(n.relative[g])g+=p.shift(); -t=ga(g,t)}else{if(!m&&p.length>1&&h.nodeType===9&&!M&&n.match.ID.test(p[0])&&!n.match.ID.test(p[p.length-1])){v=k.find(p.shift(),h,M);h=v.expr?k.filter(v.expr,v.set)[0]:v.set[0]}if(h){v=m?{expr:p.pop(),set:z(m)}:k.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=v.expr?k.filter(v.expr,v.set):v.set;if(p.length>0)y=z(t);else H=false;for(;p.length;){var D=p.pop();v=D;if(n.relative[D])v=p.pop();else D="";if(v==null)v=h;n.relative[D](y,v,M)}}else y=[]}y||(y=t);y||k.error(D|| -g);if(j.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))l.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&y[g].nodeType===1&&l.push(t[g]);else l.push.apply(l,y);else z(y,l);if(S){k(S,q,l,m);k.uniqueSort(l)}return l};k.uniqueSort=function(g){if(B){i=o;g.sort(B);if(i)for(var h=1;h":function(g,h){var l=typeof h==="string";if(l&&!/\W/.test(h)){h=h.toLowerCase();for(var m=0,q=g.length;m=0))l||m.push(v);else if(l)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()}, -CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,l,m,q,p){h=g[1].replace(/\\/g,"");if(!p&&n.attrMap[h])g[1]=n.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,l,m,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=k(g[3],null,null,h);else{g=k.filter(g[3],h,l,true^q);l||m.push.apply(m, -g);return false}else if(n.match.POS.test(g[0])||n.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,l){return!!k(l[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)}, -text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}}, -setFilters:{first:function(g,h){return h===0},last:function(g,h,l,m){return h===m.length-1},even:function(g,h){return h%2===0},odd:function(g,h){return h%2===1},lt:function(g,h,l){return hl[3]-0},nth:function(g,h,l){return l[3]-0===h},eq:function(g,h,l){return l[3]-0===h}},filter:{PSEUDO:function(g,h,l,m){var q=h[1],p=n.filters[q];if(p)return p(g,l,h,m);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h= -h[3];l=0;for(m=h.length;l=0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var l=h[1];g=n.attrHandle[l]?n.attrHandle[l](g):g[l]!=null?g[l]:g.getAttribute(l);l=g+"";var m=h[2];h=h[4];return g==null?m==="!=":m=== -"="?l===h:m==="*="?l.indexOf(h)>=0:m==="~="?(" "+l+" ").indexOf(h)>=0:!h?l&&g!==false:m==="!="?l!==h:m==="^="?l.indexOf(h)===0:m==="$="?l.substr(l.length-h.length)===h:m==="|="?l===h||l.substr(0,h.length+1)===h+"-":false},POS:function(g,h,l,m){var q=n.setFilters[h[2]];if(q)return q(g,l,h,m)}}},r=n.match.POS;for(var u in n.match){n.match[u]=new RegExp(n.match[u].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[u]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[u].source.replace(/\\(\d+)/g,function(g, -h){return"\\"+(h-0+1)}))}var z=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};try{Array.prototype.slice.call(s.documentElement.childNodes,0)}catch(C){z=function(g,h){h=h||[];if(j.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var l=0,m=g.length;l";var l=s.documentElement;l.insertBefore(g,l.firstChild);if(s.getElementById(h)){n.find.ID=function(m,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(m[1]))?q.id===m[1]||typeof q.getAttributeNode!=="undefined"&& -q.getAttributeNode("id").nodeValue===m[1]?[q]:w:[]};n.filter.ID=function(m,q){var p=typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id");return m.nodeType===1&&p&&p.nodeValue===q}}l.removeChild(g);l=g=null})();(function(){var g=s.createElement("div");g.appendChild(s.createComment(""));if(g.getElementsByTagName("*").length>0)n.find.TAG=function(h,l){l=l.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var m=0;l[m];m++)l[m].nodeType===1&&h.push(l[m]);l=h}return l};g.innerHTML=""; -if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")n.attrHandle.href=function(h){return h.getAttribute("href",2)};g=null})();s.querySelectorAll&&function(){var g=k,h=s.createElement("div");h.innerHTML="

";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){k=function(m,q,p,v){q=q||s;if(!v&&q.nodeType===9&&!x(q))try{return z(q.querySelectorAll(m),p)}catch(t){}return g(m,q,p,v)};for(var l in g)k[l]=g[l];h=null}}(); -(function(){var g=s.createElement("div");g.innerHTML="
";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){n.order.splice(1,0,"CLASS");n.find.CLASS=function(h,l,m){if(typeof l.getElementsByClassName!=="undefined"&&!m)return l.getElementsByClassName(h[1])};g=null}}})();var E=s.compareDocumentPosition?function(g,h){return!!(g.compareDocumentPosition(h)&16)}: -function(g,h){return g!==h&&(g.contains?g.contains(h):true)},x=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},ga=function(g,h){var l=[],m="",q;for(h=h.nodeType?[h]:h;q=n.match.PSEUDO.exec(g);){m+=q[0];g=g.replace(n.match.PSEUDO,"")}g=n.relative[g]?g+"*":g;q=0;for(var p=h.length;q=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f0)for(var j=d;j0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,j= -{},i;if(f&&a.length){e=0;for(var o=a.length;e-1:c(f).is(e)){d.push({selector:i,elem:f});delete j[i]}}f=f.parentNode}}return d}var k=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(n,r){for(;r&&r.ownerDocument&&r!==b;){if(k?k.index(r)>-1:c(r).is(a))return r;r=r.parentNode}return null})},index:function(a){if(!a||typeof a=== -"string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),a);return this.pushStack(qa(a[0])||qa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode", -d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")? -a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);eb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):e;if((this.length>1||gb.test(f))&&fb.test(a))e=e.reverse();return this.pushStack(e,a,R.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===w||a.nodeType!==1||!c(a).is(d));){a.nodeType=== -1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==b&&d.push(a);return d}});var Ja=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ka=/(<([\w:]+)[^>]*?)\/>/g,hb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,La=/<([\w:]+)/,ib=/"},F={option:[1,""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div
","
"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d= -c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==w)return this.empty().append((this[0]&&this[0].ownerDocument||s).createTextNode(a));return c.text(this)},wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this}, -wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})}, -prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b, -this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},remove:function(a,b){for(var d=0,f;(f=this[d])!=null;d++)if(!a||c.filter(a,[f]).length){if(!b&&f.nodeType===1){c.cleanData(f.getElementsByTagName("*"));c.cleanData([f])}f.parentNode&&f.parentNode.removeChild(f)}return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++)for(b.nodeType===1&&c.cleanData(b.getElementsByTagName("*"));b.firstChild;)b.removeChild(b.firstChild); -return this},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Ja,"").replace(/=([^="'>\s]+\/)>/g,'="$1">').replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){ra(this,b);ra(this.find("*"),b.find("*"))}return b},html:function(a){if(a===w)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Ja, -""):null;else if(typeof a==="string"&&!ta.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(La.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Ka,Ma);try{for(var b=0,d=this.length;b0||e.cacheable||this.length>1?k.cloneNode(true):k)}o.length&&c.each(o,Qa)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);var e=this.length===1&&this[0].parentNode;if(e&&e.nodeType===11&&e.childNodes.length===1&&d.length===1){d[b](this[0]); -return this}else{e=0;for(var j=d.length;e0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),i);f=f.concat(i)}return this.pushStack(f,a,d.selector)}}});c.extend({clean:function(a,b,d,f){b=b||s;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||s;for(var e=[],j=0,i;(i=a[j])!=null;j++){if(typeof i==="number")i+="";if(i){if(typeof i==="string"&&!jb.test(i))i=b.createTextNode(i);else if(typeof i==="string"){i=i.replace(Ka,Ma);var o=(La.exec(i)||["", -""])[1].toLowerCase(),k=F[o]||F._default,n=k[0],r=b.createElement("div");for(r.innerHTML=k[1]+i+k[2];n--;)r=r.lastChild;if(!c.support.tbody){n=ib.test(i);o=o==="table"&&!n?r.firstChild&&r.firstChild.childNodes:k[1]===""&&!n?r.childNodes:[];for(k=o.length-1;k>=0;--k)c.nodeName(o[k],"tbody")&&!o[k].childNodes.length&&o[k].parentNode.removeChild(o[k])}!c.support.leadingWhitespace&&V.test(i)&&r.insertBefore(b.createTextNode(V.exec(i)[0]),r.firstChild);i=r.childNodes}if(i.nodeType)e.push(i);else e= -c.merge(e,i)}}if(d)for(j=0;e[j];j++)if(f&&c.nodeName(e[j],"script")&&(!e[j].type||e[j].type.toLowerCase()==="text/javascript"))f.push(e[j].parentNode?e[j].parentNode.removeChild(e[j]):e[j]);else{e[j].nodeType===1&&e.splice.apply(e,[j+1,0].concat(c.makeArray(e[j].getElementsByTagName("script"))));d.appendChild(e[j])}return e},cleanData:function(a){for(var b,d,f=c.cache,e=c.event.special,j=c.support.deleteExpando,i=0,o;(o=a[i])!=null;i++)if(d=o[c.expando]){b=f[d];if(b.events)for(var k in b.events)e[k]? -c.event.remove(o,k):Ca(o,k,b.handle);if(j)delete o[c.expando];else o.removeAttribute&&o.removeAttribute(c.expando);delete f[d]}}});var kb=/z-?index|font-?weight|opacity|zoom|line-?height/i,Na=/alpha\([^)]*\)/,Oa=/opacity=([^)]*)/,ha=/float/i,ia=/-([a-z])/ig,lb=/([A-Z])/g,mb=/^-?\d+(?:px)?$/i,nb=/^-?\d/,ob={position:"absolute",visibility:"hidden",display:"block"},pb=["Left","Right"],qb=["Top","Bottom"],rb=s.defaultView&&s.defaultView.getComputedStyle,Pa=c.support.cssFloat?"cssFloat":"styleFloat",ja= -function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===w)return c.curCSS(d,f);if(typeof e==="number"&&!kb.test(f))e+="px";c.style(d,f,e)})};c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return w;if((b==="width"||b==="height")&&parseFloat(d)<0)d=w;var f=a.style||a,e=d!==w;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter= -Na.test(a)?a.replace(Na,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Oa.exec(f.filter)[1])/100+"":""}if(ha.test(b))b=Pa;b=b.replace(ia,ja);if(e)f[b]=d;return f[b]},css:function(a,b,d,f){if(b==="width"||b==="height"){var e,j=b==="width"?pb:qb;function i(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(j,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a, -"border"+this+"Width",true))||0})}a.offsetWidth!==0?i():c.swap(a,ob,i);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&a.currentStyle){f=Oa.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ha.test(b))b=Pa;if(!d&&e&&e[b])f=e[b];else if(rb){if(ha.test(b))b="float";b=b.replace(lb,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f= -a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ia,ja);f=a.currentStyle[b]||a.currentStyle[d];if(!mb.test(f)&&nb.test(f)){b=e.left;var j=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=j}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b= -a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var sb=J(),tb=//gi,ub=/select|textarea/i,vb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ka=/\?/,wb=/(\?|&)_=.*?(&|$)/,xb=/^(\w+:)?\/\/([^\/?#]+)/,yb=/%20/g,zb=c.fn.loaddisabled;c.fn.extend({loaddisabled:function(a,b,d){if(typeof a!== -"string")return zb.call(this,a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=c.param(b,c.ajaxSettings.traditional);f="POST"}var j=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(i,o){if(o==="success"||o==="notmodified")j.html(e?c("
").append(i.responseText.replace(tb,"")).find(e):i.responseText);d&&j.each(d,[i.responseText,o,i])}});return this}, -serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||ub.test(this.nodeName)||vb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), -function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href, -global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:A.XMLHttpRequest&&(A.location.protocol!=="file:"||!A.ActiveXObject)?function(){return new A.XMLHttpRequest}:function(){try{return new A.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&& -e.success.call(k,o,i,x);e.global&&f("ajaxSuccess",[x,e])}function d(){e.complete&&e.complete.call(k,x,i);e.global&&f("ajaxComplete",[x,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),j,i,o,k=a&&a.context||e,n=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(n==="GET")N.test(e.url)||(e.url+=(ka.test(e.url)? -"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||N.test(e.url))){j=e.jsonpCallback||"jsonp"+sb++;if(e.data)e.data=(e.data+"").replace(N,"="+j+"$1");e.url=e.url.replace(N,"="+j+"$1");e.dataType="script";A[j]=A[j]||function(q){o=q;b();d();A[j]=w;try{delete A[j]}catch(p){}z&&z.removeChild(C)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache=== -false&&n==="GET"){var r=J(),u=e.url.replace(wb,"$1_="+r+"$2");e.url=u+(u===e.url?(ka.test(e.url)?"&":"?")+"_="+r:"")}if(e.data&&n==="GET")e.url+=(ka.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&c.event.trigger("ajaxStart");r=(r=xb.exec(e.url))&&(r[1]&&r[1]!==location.protocol||r[2]!==location.host);if(e.dataType==="script"&&n==="GET"&&r){var z=s.getElementsByTagName("head")[0]||s.documentElement,C=s.createElement("script");C.src=e.url;if(e.scriptCharset)C.charset=e.scriptCharset;if(!j){var B= -false;C.onloaddisabled=C.onreadystatechange=function(){if(!B&&(!this.readyState||this.readyState==="loaddisableded"||this.readyState==="complete")){B=true;b();d();C.onloaddisabled=C.onreadystatechange=null;z&&C.parentNode&&z.removeChild(C)}}}z.insertBefore(C,z.firstChild);return w}var E=false,x=e.xhr();if(x){e.username?void(n,e.url,e.async,e.username,e.password):void(n,e.url,e.async);try{if(e.data||a&&a.contentType)x.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&x.setRequestHeader("If-Modified-Since", -c.lastModified[e.url]);c.etag[e.url]&&x.setRequestHeader("If-None-Match",c.etag[e.url])}r||x.setRequestHeader("X-Requested-With","XMLHttpRequest");x.setRequestHeader("Accept",e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(ga){}if(e.beforeSend&&e.beforeSend.call(k,x,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");x.abort();return false}e.global&&f("ajaxSend",[x,e]);var g=x.onreadystatechange=function(q){if(!x||x.readyState===0||q==="abort"){E|| -d();E=true;if(x)x.onreadystatechange=c.noop}else if(!E&&x&&(x.readyState===4||q==="timeout")){E=true;x.onreadystatechange=c.noop;i=q==="timeout"?"timeout":!c.httpSuccess(x)?"error":e.ifModified&&c.httpNotModified(x,e.url)?"notmodified":"success";var p;if(i==="success")try{o=c.httpData(x,e.dataType,e)}catch(v){i="parsererror";p=v}if(i==="success"||i==="notmodified")j||b();else c.handleError(e,x,i,p);d();q==="timeout"&&x.abort();if(e.async)x=null}};try{var h=x.abort;x.abort=function(){x&&h.call&&h.call(x); -g("abort")}}catch(l){}e.async&&e.timeout>0&&setTimeout(function(){x&&!E&&g("timeout")},e.timeout);try{x.send(n==="POST"||n==="PUT"||n==="DELETE"?e.data:null)}catch(m){c.handleError(e,x,null,m);d()}e.async||g();return x}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status=== -1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b=== -"json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(i,o){if(c.isArray(o))c.each(o,function(k,n){b||/\[\]$/.test(i)?f(i,n):d(i+"["+(typeof n==="object"||c.isArray(n)?k:"")+"]",n)});else!b&&o!=null&&typeof o==="object"?c.each(o,function(k,n){d(i+"["+k+"]",n)}):f(i,o)}function f(i,o){o=c.isFunction(o)?o():o;e[e.length]=encodeURIComponent(i)+"="+encodeURIComponent(o)}var e=[];if(b===w)b=c.ajaxSettings.traditional; -if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var j in a)d(j,a[j]);return e.join("&").replace(yb,"+")}});var la={},Ab=/toggle|show|hide/,Bb=/^([+-]=)?([\d+-.]+)(.*)$/,W,va=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();la[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration=== -"number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]|| -c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(j){return e.step(j)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start; -this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now= -this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem, -e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b
"; -a.insertBefore(b,a.firstChild);d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==j;a.removeChild(b); -c.offset.initialize=c.noop},bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),j=parseInt(c.curCSS(a,"top",true),10)||0,i=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a, -d,e);d={top:b.top-e.top+j,left:b.left-e.left+i};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top- -f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=this.offsetParent||s.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],j;if(!e)return null;if(f!==w)return this.each(function(){if(j=wa(this))j.scrollTo(!a?f:c(j).scrollLeft(),a?f:c(j).scrollTop());else this[d]=f});else return(j=wa(e))?"pageXOffset"in j?j[a?"pageYOffset": -"pageXOffset"]:c.support.boxModel&&j.document.documentElement[d]||j.document.body[d]:e[d]}});c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(j){var i=c(this);i[d](f.call(this,j,i[d]()))});return"scrollTo"in -e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===w?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});A.jQuery=A.$=c})(window); diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/static.foxsports.com/content/fscom/img/2011/04/07/040711-Golf-Tiger-Woods-1120pm-PI_20110407142414593_116_175.JPG b/mobile/android/tests/browser/chrome/tp5/msn.com/static.foxsports.com/content/fscom/img/2011/04/07/040711-Golf-Tiger-Woods-1120pm-PI_20110407142414593_116_175.JPG deleted file mode 100755 index 53e23a3c2..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/static.foxsports.com/content/fscom/img/2011/04/07/040711-Golf-Tiger-Woods-1120pm-PI_20110407142414593_116_175.JPG and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/udc.msn.com/c.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/udc.msn.com/c.gif deleted file mode 100755 index 9935f8210..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/udc.msn.com/c.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/www.bing.com/partner/primedns.gif b/mobile/android/tests/browser/chrome/tp5/msn.com/www.bing.com/partner/primedns.gif deleted file mode 100755 index 35d42e808..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/msn.com/www.bing.com/partner/primedns.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/msn.com/www.msn.com/index.html b/mobile/android/tests/browser/chrome/tp5/msn.com/www.msn.com/index.html deleted file mode 100755 index 9c180e1d8..000000000 --- a/mobile/android/tests/browser/chrome/tp5/msn.com/www.msn.com/index.html +++ /dev/null @@ -1,13 +0,0 @@ -MSN.com

MUST-SEE

NEWS

VIDEO

HEALTH

GOVERNMENT SHUTDOWN

Image: U.S. Capitol (© Jim Young/Reuters)
Could shutdown derail economy?

Some analysts fear that a government closure could dampen consumer confidence & spending.

Image: The White House (© Murat Taner/Getty Images)

MARKET UPDATE

Updated: 04/08/2011 04:40 ET
Market update
SymbolLastChange
DOW12,380.05-29.44
NASDAQ2,780.42-15.72
S&P1,328.17-5.34

legend

Brought to you by:

HOTMAIL

MESSENGER

Unable to show activities. Please try again.
Please wait.
This may take a few seconds
Unable to show activities. Please try again later.

FACEBOOK

Please wait.
This may take a few seconds
Unable to show activities. Please try again later.

TWITTER

Please wait.
This may take a few seconds
Unable to show activities. Please try again later.

Bing Search

diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/images/loader.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/images/loader.gif deleted file mode 100755 index 31220d267..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/images/loader.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/images/twitter_logo_header.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/images/twitter_logo_header.png deleted file mode 100755 index f681f040e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/images/twitter_logo_header.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/javascripts/lib/jquery.tipsy.min.js@1302114648 b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/javascripts/lib/jquery.tipsy.min.js@1302114648 deleted file mode 100755 index 2ff318143..000000000 --- a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/javascripts/lib/jquery.tipsy.min.js@1302114648 +++ /dev/null @@ -1,3 +0,0 @@ -//Licensed under The MIT License -//Copyright (c) 2008 Jason Frame (jason@onehackoranother.com) -(function($){$.fn.tipsy=function(g){g=$.extend({fade:false,gravity:'n'},g||{});if(!g['offsetTop']){g['offsetTop']=0}if(!g['offsetLeft']){g['offsetLeft']=0}if(!g['header']){g['header']=''}if(!g['footer']){g['footer']=''}if(!g['hideTimeout']){g['hideTimeout']=100}if(!g['showTimeout']){g['hideTimeout']=0}if(!g['additionalCSSClass']){g['additionalCSSClass']=''}var h=false;var i=null,cancelHide=false;this.hover(function(){var a=$(this).text();var b=g['header'].replace('%{link}',a);var c=g['footer'].replace('%{link}',a);$.data(this,'cancel.tipsy',true);var d=$.data(this,'active.tipsy');if(!d){$('.tipsy').hide();d=$('
'+b+$(this).attr('title')+c+'
');d.css({position:'absolute',zIndex:100000});$(this).attr('title','');$.data(this,'active.tipsy',d)}else if($(this).attr('title')!=''){d.find('.tipsy-inner').html($(this).attr('title'));$(this).attr('title','')}var e=$.extend({},$(this).offset(),{width:this.offsetWidth,height:this.offsetHeight});e.top=e.top+g['offsetTop'];e.left=e.left+g['offsetLeft'];$('.tipsy').hide();d.remove().css({top:0,left:0,visibility:'hidden',display:'block'}).appendTo(document.body);var f=d[0].offsetWidth,actualHeight=d[0].offsetHeight;switch(g.gravity.charAt(0)){case'n':d.css({top:e.top+e.height,left:e.left+e.width/2-f/2}).addClass('tipsy-north');break;case'l':d.css({top:e.top+e.height,left:e.left+e.width/2-18}).addClass('tipsy-north');break;case's':d.css({top:e.top-actualHeight,left:e.left+e.width/2-f/2}).addClass('tipsy-south');break;case'e':d.css({top:e.top+e.height/2-actualHeight/2,left:e.left-f}).addClass('tipsy-east');break;case'w':d.css({top:e.top+e.height/2-actualHeight/2,left:e.left+e.width}).addClass('tipsy-west');break}function show(){if(g.fade){d.css({opacity:0,display:'block',visibility:'visible'}).animate({opacity:1})}else{d.css({visibility:'visible'})}}if(g['showTimeout']){h=setTimeout(show,g['showTimeout'])}else{show()}},function(){clearTimeout(h);$.data(this,'cancel.tipsy',false);var b=this;setTimeout(function(){if($.data(this,'cancel.tipsy'))return;var a=$.data(b,'active.tipsy');if(g.fade){a.stop().fadeOut(function(){$(this).remove()})}else{a.remove()}},g['hideTimeout'])})}})(jQuery); diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/javascripts/lib/mustache.js@1302114648 b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/javascripts/lib/mustache.js@1302114648 deleted file mode 100755 index 7072caa30..000000000 --- a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/a/1302214109/javascripts/lib/mustache.js@1302114648 +++ /dev/null @@ -1,403 +0,0 @@ -/* - mustache.js — Logic-less templates in JavaScript - - See http://mustache.github.com/ for more info. -*/ - -var Mustache = function() { - var Renderer = function() {}; - - Renderer.prototype = { - otag: "{{", - ctag: "}}", - pragmas: {}, - buffer: [], - pragmas_implemented: { - "IMPLICIT-ITERATOR": true, - "TRANSLATION-HINT": true - }, - context: {}, - - render: function(template, context, partials, in_recursion) { - // reset buffer & set context - if(!in_recursion) { - this.context = context; - this.buffer = []; // TODO: make this non-lazy - } - - // fail fast - if(!this.includes("", template)) { - if(in_recursion) { - return template; - } else { - this.send(template); - return; - } - } - - // Branching or moving down the partial stack, save any translation mode info. - if (this.pragmas['TRANSLATION-HINT']) { - context['_TRANSLATION-HINT_mode'] = this.pragmas['TRANSLATION-HINT'].mode; - } - - // get the pragmas together - template = this.render_pragmas(template); - - // handle all translations - template = this.render_i18n(template, context, partials); - - // render the template - var html = this.render_section(template, context, partials); - - // render_section did not find any sections, we still need to render the tags - if (html === false) { - html = this.render_tags(template, context, partials, in_recursion); - } - - if (in_recursion) { - return html; - } else { - this.sendLines(html); - } - }, - - /* - Sends parsed lines - */ - send: function(line) { - if(line != "") { - this.buffer.push(line); - } - }, - - sendLines: function(text) { - if (text) { - var lines = text.split("\n"); - for (var i = 0; i < lines.length; i++) { - this.send(lines[i]); - } - } - }, - - /* - Looks for %PRAGMAS - */ - render_pragmas: function(template) { - // no pragmas - if(!this.includes("%", template)) { - return template; - } - - var that = this; - var regex = new RegExp(this.otag + "%([\\w-]+) ?([\\w]+=[\\w]+)?" + - this.ctag); - return template.replace(regex, function(match, pragma, options) { - if(!that.pragmas_implemented[pragma]) { - throw({message: - "This implementation of mustache doesn't understand the '" + - pragma + "' pragma"}); - } - that.pragmas[pragma] = {}; - if(options) { - var opts = options.split("="); - that.pragmas[pragma][opts[0]] = opts[1]; - } - return ""; - // ignore unknown pragmas silently - }); - }, - - /* - Tries to find a partial in the curent scope and render it - */ - render_partial: function(name, context, partials) { - name = this.trim(name); - if(!partials || partials[name] === undefined) { - throw({message: "unknown_partial '" + name + "'"}); - } - if(typeof(context[name]) != "object") { - return this.render(partials[name], context, partials, true); - } - return this.render(partials[name], context[name], partials, true); - }, - - render_i18n: function(html, context, partials) { - if (html.indexOf(this.otag + "_i") == -1) { - return html; - } - var that = this; - var regex = new RegExp(this.otag + "\\_i" + this.ctag + - "\\s*([\\s\\S]+?)" + this.otag + "\\/i" + this.ctag, "mg"); - - // for each {{_i}}{{/i}} section do... - return html.replace(regex, function(match, content) { - var translationMode; - - if (that.pragmas && that.pragmas["TRANSLATION-HINT"] && that.pragmas["TRANSLATION-HINT"].mode) { - translationMode = that.pragmas["TRANSLATION-HINT"].mode; - } else if (context['_TRANSLATION-HINT_mode']) { - translationMode = context['_TRANSLATION-HINT_mode']; - } - - var params = content; - - if (translationMode) { - params = { - text: content, - mode: translationMode - }; - } - - return _(params); - }); - }, - - /* - Renders inverted (^) and normal (#) sections - */ - render_section: function(template, context, partials) { - if(!this.includes("#", template) && !this.includes("^", template)) { - // did not render anything, there were no sections - return false; - } - - var that = this; - - // This regex matches _the first_ section ({{#foo}}{{/foo}}), and captures the remainder - var regex = new RegExp( - "^([\\s\\S]*?)" + // all the crap at the beginning that is not {{*}} ($1) - - this.otag + // {{ - "(\\^|\\#)\\s*(.+)\\s*" + // #foo (# == $2, foo == $3) - this.ctag + // }} - - "\n*([\\s\\S]*?)" + // between the tag ($2). leading newlines are dropped - - this.otag + // {{ - "\\/\\s*\\3\\s*" + // /foo (backreference to voiding tag). - this.ctag + // }} - - "\\s*([\\s\\S]*)$", // everything else in the string ($4). leading whitespace is dropped. - - "g"); - - // for each {{#foo}}{{/foo}} section do... - return template.replace(regex, function(match, before, type, name, content, after) { - // before contains only tags, no sections - var renderedBefore = before ? that.render_tags(before, context, partials, true) : "", - - // after may contain both sections and tags, so use full rendering function - renderedAfter = after ? that.render(after, context, partials, true) : ""; - - var value = that.find(name, context); - if(type == "^") { // inverted section - if(!value || that.is_array(value) && value.length === 0) { - // false or empty list, render it - return renderedBefore + that.render(content, context, partials, true) + renderedAfter; - } else { - return renderedBefore + "" + renderedAfter; - } - } else if(type == "#") { // normal section - if(that.is_array(value)) { // Enumerable, Let's loop! - return renderedBefore + that.map(value, function(row) { - return that.render(content, that.create_context(row), partials, true); - }).join("") + renderedAfter; - } else if(that.is_object(value)) { // Object, Use it as subcontext! - return renderedBefore + that.render(content, that.create_context(value), - partials, true) + renderedAfter; - } else if(typeof value === "function") { - // higher order section - return renderedBefore + value.call(context, content, function(text) { - return that.render(text, context, partials, true); - }) + renderedAfter; - } else if(value) { // boolean section - return renderedBefore + that.render(content, context, partials, true) + renderedAfter; - } else { - return renderedBefore + "" + renderedAfter; - } - } - }); - }, - - /* - Replace {{foo}} and friends with values from our view - */ - render_tags: function(template, context, partials, in_recursion) { - // tit for tat - var that = this; - - var new_regex = function() { - return new RegExp(that.otag + "(=|!|>|\\{|%)?([^\\/#\\^]+?)\\1?" + - that.ctag + "+", "g"); - }; - - var regex = new_regex(); - var tag_replace_callback = function(match, operator, name) { - switch(operator) { - case "!": // ignore comments - return ""; - case "=": // set new delimiters, rebuild the replace regexp - that.set_delimiters(name); - regex = new_regex(); - return ""; - case ">": // render partial - return that.render_partial(name, context, partials); - case "{": // the triple mustache is unescaped - return that.find(name, context); - default: // escape the value - return that.escape(that.find(name, context)); - } - }; - var lines = template.split("\n"); - for(var i = 0; i < lines.length; i++) { - lines[i] = lines[i].replace(regex, tag_replace_callback, this); - if(!in_recursion) { - this.send(lines[i]); - } - } - - if(in_recursion) { - return lines.join("\n"); - } - }, - - set_delimiters: function(delimiters) { - var dels = delimiters.split(" "); - this.otag = this.escape_regex(dels[0]); - this.ctag = this.escape_regex(dels[1]); - }, - - escape_regex: function(text) { - // thank you Simon Willison - if(!arguments.callee.sRE) { - var specials = [ - '/', '.', '*', '+', '?', '|', - '(', ')', '[', ']', '{', '}', '\\' - ]; - arguments.callee.sRE = new RegExp( - '(\\' + specials.join('|\\') + ')', 'g' - ); - } - return text.replace(arguments.callee.sRE, '\\$1'); - }, - - /* - find `name` in current `context`. That is find me a value - from the view object - */ - find: function(name, context) { - name = this.trim(name); - - // Checks whether a value is thruthy or false or 0 - function is_kinda_truthy(bool) { - return bool === false || bool === 0 || bool; - } - - var value; - if(is_kinda_truthy(context[name])) { - value = context[name]; - } else if(is_kinda_truthy(this.context[name])) { - value = this.context[name]; - } - - if(typeof value === "function") { - return value.apply(context); - } - if(value !== undefined) { - return value; - } - // silently ignore unkown variables - return ""; - }, - - // Utility methods - - /* includes tag */ - includes: function(needle, haystack) { - return haystack.indexOf(this.otag + needle) != -1; - }, - - /* - Does away with nasty characters - */ - escape: function(s) { - s = String(s === null ? "" : s); - return s.replace(/&(?!\w+;)|["'<>\\]/g, function(s) { - switch(s) { - case "&": return "&"; - case "\\": return "\\\\"; - case '"': return '"'; - case "'": return '''; - case "<": return "<"; - case ">": return ">"; - default: return s; - } - }); - }, - - // by @langalex, support for arrays of strings - create_context: function(_context) { - if(this.is_object(_context)) { - return _context; - } else { - var iterator = "."; - if(this.pragmas["IMPLICIT-ITERATOR"]) { - iterator = this.pragmas["IMPLICIT-ITERATOR"].iterator; - } - var ctx = {}; - ctx[iterator] = _context; - return ctx; - } - }, - - is_object: function(a) { - return a && typeof a == "object"; - }, - - is_array: function(a) { - return Object.prototype.toString.call(a) === '[object Array]'; - }, - - /* - Gets rid of leading and trailing whitespace - */ - trim: function(s) { - return s.replace(/^\s*|\s*$/g, ""); - }, - - /* - Why, why, why? Because IE. Cry, cry cry. - */ - map: function(array, fn) { - if (typeof array.map == "function") { - return array.map(fn); - } else { - var r = []; - var l = array.length; - for(var i = 0; i < l; i++) { - r.push(fn(array[i])); - } - return r; - } - } - }; - - return({ - name: "mustache.js", - version: "0.3.1-dev-twitter", - - /* - Turns a template and view into HTML - */ - to_html: function(template, view, partials, send_fun) { - var renderer = new Renderer(); - if(send_fun) { - renderer.send = send_fun; - } - renderer.render(template, view || {}, partials); - if(!send_fun) { - return renderer.buffer.join("\n"); - } - } - }); -}(); diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1129087853/151aec2f-1534-4f61-9f3e-1e787cb51a8b_mini.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1129087853/151aec2f-1534-4f61-9f3e-1e787cb51a8b_mini.png deleted file mode 100755 index daa825d60..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1129087853/151aec2f-1534-4f61-9f3e-1e787cb51a8b_mini.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1139176116/5c42a320-1e91-4d89-a034-0f140d2f23ba_mini.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1139176116/5c42a320-1e91-4d89-a034-0f140d2f23ba_mini.png deleted file mode 100755 index f336453d3..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1139176116/5c42a320-1e91-4d89-a034-0f140d2f23ba_mini.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1277610502/Untitled-9_mini.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1277610502/Untitled-9_mini.jpg deleted file mode 100755 index 586f3a2ac..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/1277610502/Untitled-9_mini.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/316019228/326994260_1117936370_0_mini.jpeg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/316019228/326994260_1117936370_0_mini.jpeg deleted file mode 100755 index 0d324633e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/316019228/326994260_1117936370_0_mini.jpeg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/81990615/nightexterior-1_mini.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/81990615/nightexterior-1_mini.jpg deleted file mode 100755 index 808e14507..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/81990615/nightexterior-1_mini.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/959692632/13659_1215732676789_1332990286_30703899_6344768_n_mini.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/959692632/13659_1215732676789_1332990286_30703899_6344768_n_mini.jpg deleted file mode 100755 index dc33e0af2..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/profile_images/959692632/13659_1215732676789_1332990286_30703899_6344768_n_mini.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/sticky/default_profile_images/default_profile_4_mini.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/sticky/default_profile_images/default_profile_4_mini.png deleted file mode 100755 index f38de2578..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a0.twimg.com/sticky/default_profile_images/default_profile_4_mini.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/favicon.ico b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/favicon.ico deleted file mode 100755 index 00450d4fe..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/favicon.ico and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/icon_lock.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/icon_lock.gif deleted file mode 100755 index 53e664140..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/icon_lock.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/reject_small.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/reject_small.gif deleted file mode 100755 index d346a0da4..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/reject_small.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/spinner.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/spinner.gif deleted file mode 100755 index 6e5bace6e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/spinner.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/sprite-icons.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/sprite-icons.png deleted file mode 100755 index a93cede94..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/sprite-icons.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/toggle_down_dark.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/toggle_down_dark.png deleted file mode 100755 index f3fd0f4b1..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/images/toggle_down_dark.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/javascripts/dismissable.js@1302114648 b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/javascripts/dismissable.js@1302114648 deleted file mode 100755 index 605865ff9..000000000 --- a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/javascripts/dismissable.js@1302114648 +++ /dev/null @@ -1 +0,0 @@ -(function(A){A.fn.dismissable=function(B){var D=A(this);var C={authenticity_token:twttr.form_authenticity_token,_method:"put"};C["user["+B.userAttribute+"]"]="1";D.find("a.dismiss").click(function(){D.hide();A.ajax({type:"POST",url:B.userUrl,data:C});return false});return this}})(jQuery); \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/stylesheets/following.css@1302114648.css b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/stylesheets/following.css@1302114648.css deleted file mode 100755 index 49f2f3f50..000000000 --- a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/a/1302214109/stylesheets/following.css@1302114648.css +++ /dev/null @@ -1 +0,0 @@ -body #content h2,body #content h2{font:18px 'Helvetica',sans-serif;font-weight:bold;color:#000;margin-left:10px;}.profile-user,body#profile div.section,body#profile_favorites div.section{padding:0 10px;}.profile-user h2.thumb{clear:both;float:none;padding:10px 0;line-height:1.25em;}.profile-user h2 img{float:left;}.profile-user h2 div{margin-left:65px;}#follow h2 img{margin-right:5px;}#follow h2 small{font:11px 'Lucida Grande',Arial,sans-serif;font-weight:normal;}.protected-profile-controls .profile-controls{height:23px;}#friend_requests h2.heading form{float:right;}body#friend_requests.ie7 h2.heading form{margin-top:-15px;padding-right:8px;}.denied-follow-request{float:right;padding-left:30px;background:transparent url(../images/reject_small.gif) no-repeat 0 center;margin:5px -100px 0 0;}.subpage #content ul.ctrlbar{padding:8px 10px;background-color:#f6f6f6;clear:both;float:none;}.wrapper{padding:15px;}#content div.section{padding:0;}#content div.section ul li{padding:0;}#content div.section ul.ctrlbar li{margin-right:4px;position:static;}.ctrlbar li{display:inline-block;margin-right:4px;position:relative;}.ctrlbar a{display:inline-block;vertical-align:middle;outline:none;padding:3px 4px;border:1px solid transparent;}.ctrlbar a i{display:block;overflow:hidden;width:13px;height:13px;background-image:url(../images/sprite-icons.png);background-repeat:no-repeat;}.ctrlbar a.expanded i{background-position:-1px -81px;}.follow-expanded .ctrlbar a.expanded,.follow-compact .ctrlbar a.compact{background-color:#fff;border-color:#ccc;}.ctrlbar a.compact i{background-position:-17px -81px;}#follow_grid table{margin-top:10px;width:100%;border-collapse:collapse;}#follow_grid tr{font:12px 'Lucida Grande',Arial,sans-serif;color:#333;border-bottom:1px solid #eee;}#follow_grid tr .is-blocked{position:static;}#follow_grid tr.even td{background-color:transparent;}#follow_grid tr:hover td{background-color:#f6f6f6;}#follow_grid th{font:11px 'Lucida Grande',Arial,sans-serif;color:#999;}#follow_grid th,#follow_grid td{padding:10px;vertical-align:top;}#follow_grid th{padding-bottom:6px;}#follow_grid th.actions-header,#follow_grid th.settings-header{text-align:right;}#follow_grid td.thumb{padding-right:0;}.user i{display:inline-block;width:13px;height:13px;background-image:url(../images/sprite-icons.png);background-repeat:no-repeat;overflow:hidden;outline:none;}#follow_grid .thumb{height:50px;width:50px;}#follow_grid .thumb img{width:50px;height:50px;}.user .user-detail{font:11px 'Lucida Grande',Arial,sans-serif;line-height:16px;width:225px;}#follow_grid td.user-detail{padding-right:0;}#follow_grid td.thumb{width:10%;}.protected .screenname{padding-right:12px;background:transparent url(../images/icon_lock.gif) no-repeat 100% 30%;}.verified-icon{vertical-align:top;padding:2px;}.user .user-detail address{position:relative;}.user .screenname{font:15px 'Helvetica';font-weight:bold;}.user .fullname,.user .location,.user .user-body{color:#666;}.user .user-body{display:block;overflow:hidden;width:265px;color:#666;}.user .user-detail strong{color:#333;}.user .user-body em{font-style:normal;}.user .currently em{white-space:nowrap;}.blocked-user,.blocked-user:hover,.blocked-user .screenname,.blocked-user .user-body,.blocked-user .user-body strong,.blocked-user .user-body:hover{background-color:#f2f2f2;color:#666;width:100%;}.user .is-following,.user .is-blocked,.user .is-pending{display:none;padding-left:.5em;}#container .following .is-following,#container .blocking .is-blocked,#container .pending .is-pending{display:inline-block;}.blocking .is-pending{display:none;}#follow_grid .is-following,#follow_grid .is-blocked,#follow_grid .is-pending{position:absolute;top:0;right:0;}.profile-user .is-following,.profile-user .is-blocked,.profile-user .is-pending{padding-left:0;}.user .is-following i,.user .is-blocked i,.user .is-pending i{height:9px;width:10px;margin-right:5px;}.profile-user .is-following i,.profile-user .is-blocked i,.profile-user .is-pending i{height:13px;width:15px;position:relative;top:1px;}.user .is-following i{background-position:-160px -16px;}.user .is-blocked i{background-position:-224px -16px;}.user .is-pending i{background-position:-192px -16px;}.profile-user .user .is-following i{background-position:-144px -16px;}.profile-user .user .is-blocked i{background-position:-208px -16px;}.profile-user .user .is-pending i{background-position:-176px -16px;}#follow_grid .user:hover .fullname,#follow_grid .user:hover .location,#follow_grid .user:hover .user-body{color:#333;}#follow_grid .user-actions-outer,#follow_grid.follow-compact .user-actions-outer{width:90px;padding-right:10px;}.current-user-following-page .user-actions-outer{width:40px;}#follow_grid .user-settings{width:80px;float:right;}#follow_grid .blocked-user:hover .user-body{color:#666;}.profile-user ul.user-settings{float:left;margin-left:10px;}#follow_grid .user-actions-outer,#follow_grid .user-settings-outer{text-align:right;}ul.user-settings>li{display:none;position:static;}.profile-user ul.user-settings>li{margin:0;}#follow_grid .following ul.user-settings>li,.profile-user .following ul.user-settings>li{display:inline-block;}ul.user-actions>li{display:inline-block;}ul.user-settings>li>a,ul.user-actions>li>a{display:inline-block;width:16px;height:16px;background-repeat:no-repeat;overflow:hidden;cursor:pointer;background-image:url(../images/sprite-icons.png);text-decoration:none;margin-right:3px;outline:none;position:relative;}ul.user-settings>li>a{margin-top:4px;}.profile-user ul.user-settings>li a{margin-right:0;}.user-settings li.sms-setting a.on{background-position:-64px -48px;}.is-blocked .learn-more{font-size:11px;margin-left:3px;}#follow_grid .user:hover .user-settings li.sms-setting a.on,.profile-user .user-settings li.sms-setting a.on{background-position:-48px -48px;}.user-settings li.sms-setting a.off{background-position:-80px -48px;}#follow_grid .user:hover .user-settings li.sms-setting a.off,.profile-user .user-settings li.sms-setting a.off{background-position:-160px -48px;}.user-settings li.replies-setting a.on{background-position:-16px -48px;}#follow_grid .user:hover .user-settings li.replies-setting a.on,.profile-user .user-settings li.replies-setting a.on{background-position:0 -48px;}.user-settings li.replies-setting a.off{background-position:-32px -48px;}#follow_grid .user:hover .user-settings li.replies-setting a.off,.profile-user .user-settings li.replies-setting a.off{background-position:-144px -48px;}.user-settings li.shares-setting a.on{background-position:-112px -48px;}.user:hover .user-settings li.shares-setting a.on,.profile-user .user-settings li.shares-setting a.on{background-position:-96px -48px;}.user-settings li.shares-setting a.off{background-position:-128px -48px;}.user:hover .user-settings li.shares-setting a.off,.profile-user .user-settings li.shares-setting a.off{background-position:-176px -48px;}.user .user-actions i{display:block;width:15px;}#follow_grid .user-actions .follow-action button{width:29px;}.profile-user .user-actions .follow-action button i{float:left;margin:0 5px 0 0;}.user-actions button{height:25px;}.current-user-following-page .user-actions .follow-action button{display:inline-block;}#follow_grid .pending .user-actions .follow-action button,.profile-user .pending .user-actions .follow-action button,#follow_grid .following .user-actions .follow-action button,.profile-user .following .user-actions .follow-action button,#follow_grid .blocking .user-actions .follow-action button,.profile-user .blocking .user-actions .follow-action button,#follow_grid .current-user-following-page .following .user-actions .follow-action button{display:none;}.user-actions .follow-action button i{display:block;background-position:-160px -32px;margin:0 4px;}#follow_grid .user:hover .user-actions .follow-action button i,.profile-user .user .user-actions .follow-action button i{background-position:-176px -32px;}.user-actions .action-menu{vertical-align:top;}.profile-controls .followed-by{margin-top:4px;text-align:left;font-size:11px;}.profile-controls .followed-by hr{color:#F6F6F6;background:#F6F6F6;border:0 solid #F6F6F6;border-top:1px solid #eee;border-bottom:1px solid #fff;height:0;margin:0 0 5px 0;display:block;}.profile-controls .followed-by label{color:#666;}.user-actions .action-menu button{width:36px;}.user-actions .action-menu button i{display:block;background-position:0 -64px;width:22px;margin:1px 7px;}#follow_grid .user:hover .user-actions .action-menu button i,.profile-user .user .user-actions .action-menu button i,.user-actions .action-menu button.clicked i{background-position:-32px -64px;}#follow_grid .user .user-actions .accept-action button,#follow_grid .user .user-actions .deny-action button{color:#aaa;margin-right:3px;}#follow_grid .user:hover .user-actions .accept-action button,#follow_grid .user:hover .user-actions .deny-action button{color:#333;}#friend_requests td.thumb{width:5px!important;padding-right:0;}#friend_requests td.user-detail{width:500px;}#friend_requests td.user-actions-outer{width:200px!important;}#friend_requests .user .user-body{width:400px;}body#friend_requests.ie7 #follow_grid table tr td{border-bottom:1px solid #eee!important;}body#friend_requests.ie7 td.user-actions-outer ul{width:190px;display:inline;}body#friend_requests.ie7 td.user-actions-outer ul li{float:left!important;}body#friend_requests.ie8 #follow_grid th.name-header{text-align:left!important;}body#friend_requests #follow_grid.empty{height:300px;}#follow_requests_all{color:#ccc;}.user-actions .menu button.clicked{background-image:none;}.user-actions .menu ul{display:none;position:absolute;width:200px;margin-top:-1px;padding:4px 0;text-align:left;border:1px solid #666;background-color:#fff;z-index:9999;}.user-actions .menu ul li a,.user-actions .menu ul li label,.user-actions .menu ul li input[type="checkbox"]{display:inline-block;font:11px 'Lucida Grande',Arial,sans-serif;color:#666;position:relative;padding:4px 5px;vertical-align:top;}.user-actions .menu ul li .loaddisableding-spinner{display:inline-block;position:relative;top:4px;left:1px;margin-left:4px;}.user-actions .action-menu ul li a{padding:4px 5px 4px 27px;}.user-actions .menu ul li a{display:block;color:#666;text-decoration:none;}.user-actions .menu ul li:hover{color:#fff;background-color:#666;}.user-actions .menu ul li:hover *{color:#fff;}.user-actions .menu ul li.divider{border-top:1px solid #ddd;}.user-actions .menu ul a i{position:absolute;left:7px;top:4px;width:15px;}.user-actions .mention i{background-position:-16px -32px;}.user-actions .mention:hover i{background-position:0 -32px;}.user-actions .direct-message i{background-position:-48px -32px;}.user-actions .direct-message:hover i{background-position:-32px -32px;}.user-actions .follow i{background-position:-176px -32px;}.user-actions .follow:hover i{background-position:-160px -32px;}.current-user-following-page .user-actions .follow{display:none;}.user-actions .remove i{background-position:-208px -32px;}.user-actions .remove:hover i{background-position:-192px -32px;}.user-actions .unfollow i{background-position:-112px -32px;}.user-actions .unfollow:hover i{background-position:-96px -32px;}.user-actions .block i{background-position:-144px -32px;}.user-actions .report-for-spam i{background-position:-272px -32px;}.user-actions .report-for-spam:hover i{background-position:-256px -32px;}.user-actions .block:hover i{background-position:-128px -32px;}.user-actions .unblock i{background-position:-144px -32px;}.user-actions .unblock:hover i{background-position:-128px -32px;}.user-actions .unfollow,.user-actions .unblock,.user-actions .direct-message,.user-actions .nudge,.pending .user-actions .follow,#follow_grid .following .user-actions .follow,.profile-user .following .user-actions .follow,.blocking .user-actions .block,.blocking .user-actions .report-for-spam,#friend_requests .follow-request .user-actions .mention,#friend_requests .follow-request .user-actions .direct-message{display:none;}#follow_grid .following .user-actions .unfollow,.profile-user .following .user-actions .unfollow,.direct-messageable .user-actions .direct-message,.blocking .user-actions .unblock{display:block;}.sidebar-actions.blocked .unblock-sidebar-action,.sidebar-actions.unblocked .block-sidebar-action,.sidebar-actions.unblocked .report-for-spam-sidebar-action{display:block;}.sidebar-actions.unblocked .unblock-sidebar-action,.sidebar-actions.blocked .block-sidebar-action,.sidebar-actions.blocked .report-for-spam-sidebar-action{display:none;}#follow_grid.follow-compact td{padding:4px 0 4px 10px;vertical-align:middle;}#follow_grid.follow-compact .thumb{height:24px;width:1%;padding-left:10px;}#follow_grid.follow-compact .thumb img{width:24px;height:24px;}#follow_grid.follow-compact .fullname{padding-left:.25em;}#follow_grid.follow-compact td.user-detail{line-height:16px;}#follow_grid.follow-compact .user-detail br,#follow_grid.follow-compact .location,#follow_grid.follow-compact .user-body{display:none;}#follow_grid td.user-actions,#follow_grid td.user-settings{padding-right:10px;}#pagination.pagination{padding:0 10px;}#similar-wrapper{padding:15px;}body.safari .user-actions .action-menu button{padding-top:5px;}body.safari .user-actions .action-menu button i{margin:0 -2px;}body.safari #follow_grid .user-actions .follow-action button i{margin:0 -2px;}body.safari .user-actions .menu ul li .loaddisableding-spinner{margin-right:-1px;}body.ie7 .profile-controls{zoom:1;}body.ie7 .ctrlbar li{float:left;}body.ie7 #content ul.ctrlbar{height:24px;background-color:#f6f6f6;}body.ie7 .user-detail{width:275px;}body.ie7 .user-actions{text-align:right;width:70px;}body.ie7 .profile-user .user-actions{width:100%;}body.ie7 .profile-user .following .user-actions{width:auto;}body.ie7 .profile-user .follow-action button.btn{width:75px;}body.ie7 .profile-user .is-following i{margin:2px 5px 2px 0;}body.ie7 .user-actions-outer{display:inline-block;}body.ie7 .profile-user .user-settings{margin-top:1px;}body.ie7 .profile-user .user-settings li{float:left;}body.ie7 .user-settings li a{margin-right:4px;}body.ie7 ul.user-actions>li.follow-action{float:left;}body.ie7 ul.user-actions>li.follow-action button{padding:3px 8px;}body.ie7 ul.user-actions>li.action-menu,body.firefox2 ul.user-actions>li.action-menu{float:right;}body.ie7 ul.user-actions>li>button{height:24px;}body.ie7 .user-actions .action-menu button{width:36px;margin-right:-2px;}body.ie7 .user-actions .action-menu ul{margin-top:22px;margin-left:-34px;}body.ie7 .user-actions button i,body.ie8 .user-actions button i{margin:0 -1px;}body.firefox2 .profile-user .profile-controls{height:2em;}body.firefox2 .profile-user .user-actions{width:100%;}body.firefox2 .profile-user .following .user-actions{width:auto;}body.firefox2 .following .is-following,body.firefox2 .blocking .is-blocked,body.firefox2 .pending .is-pending{display:block;}body.firefox2 #follow_grid .following ul.user-settings>li,body.firefox2 .profile-user .following ul.user-settings>li{display:block;float:left;}body.firefox2 #follow_grid .following ul.user-settings>li a,body.firefox2 .profile-user .following ul.user-settings>li a{display:block;margin-right:4px;}body.firefox2 .user .is-following i{display:block;float:left;margin:4px 5px 4px 0;}body.firefox2 .profile-user .user .is-following i{margin:5px 5px 5px 0;}body.firefox2 #follow_grid .is-following,body.firefox2 #follow_grid .is-blocked,body.firefox2 #follow_grid .is-pending{top:2px;}body.firefox2 #content ul.ctrlbar{height:24px;background-color:#f6f6f6;}body.firefox-windows .ctrlbar li{float:left;}body.firefox-windows .ctrlbar li a{display:block;}body.firefox2 .user-actions{text-align:right;width:70px;}body.firefox2 ul.user-actions>li.follow-action{float:left;}body.firefox2 ul.user-actions>li.action-menu{float:right;}body.firefox2 .user-actions .action-menu button,width:36px;margin-right:-2px;}body.opera .user-actions .follow-action button i{margin-left:-4px;}body.opera .user-actions .action-menu button i{margin-left:-3px;}body.opera .user-actions .action-menu ul{margin-top:10px;}body.chrome .user-actions .action-menu button{padding-top:5px;}body.chrome .user-actions .action-menu button i{margin:0 -2px;}body.chrome .user-actions .follow-action button i{margin:0!important;}body.ie8 .ctrlbar a:hover,body.safari .ctrlbar a:hover,body.firefox .ctrlbar a:hover,body.firefox_win .ctrlbar a:hover,body.firefox_2 .ctrlbar a:hover{background-color:#fff;border-color:#ccc;} \ No newline at end of file diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/1239180764/GlassblowerX_mini.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/1239180764/GlassblowerX_mini.jpg deleted file mode 100755 index 4c33d429a..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/1239180764/GlassblowerX_mini.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/1248229613/redsugarskullnecklace4-pola_mini.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/1248229613/redsugarskullnecklace4-pola_mini.jpg deleted file mode 100755 index 6f135e4c8..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/1248229613/redsugarskullnecklace4-pola_mini.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/333032766/5600_106787006838_550741838_2009237_6385345_n_mini.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/333032766/5600_106787006838_550741838_2009237_6385345_n_mini.jpg deleted file mode 100755 index 8bad69637..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/333032766/5600_106787006838_550741838_2009237_6385345_n_mini.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/754757071/rawr_mini.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/754757071/rawr_mini.jpg deleted file mode 100755 index eed8c3301..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/754757071/rawr_mini.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/874705507/01_3_mini.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/874705507/01_3_mini.jpg deleted file mode 100755 index a03e86a7b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/874705507/01_3_mini.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/959721336/16869_103046893051833_100000395672538_70559_3952672_n_1__mini.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/959721336/16869_103046893051833_100000395672538_70559_3952672_n_1__mini.jpg deleted file mode 100755 index 9559bd342..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a1.twimg.com/profile_images/959721336/16869_103046893051833_100000395672538_70559_3952672_n_1__mini.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/ajax.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/ajax.gif deleted file mode 100755 index 16e32a32c..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/ajax.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arr-inline-form.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arr-inline-form.gif deleted file mode 100755 index c75a49c5d..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arr-inline-form.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arr2.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arr2.gif deleted file mode 100755 index 577be1871..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arr2.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arrow_right_dark.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arrow_right_dark.png deleted file mode 100755 index 4e892821b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/arrow_right_dark.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/bg-btn-blue.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/bg-btn-blue.png deleted file mode 100755 index 058f726d9..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/bg-btn-blue.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/bg-btn-signup_gold.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/bg-btn-signup_gold.png deleted file mode 100755 index ba1f78f4e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/bg-btn-signup_gold.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn-bg.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn-bg.gif deleted file mode 100755 index f14912f0f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn-bg.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_green_arrow.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_green_arrow.gif deleted file mode 100755 index 15de49eae..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_green_arrow.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_green_arrow_small.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_green_arrow_small.gif deleted file mode 100755 index 2a0719256..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_green_arrow_small.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_red_small.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_red_small.gif deleted file mode 100755 index 8d566b514..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/btn_red_small.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-blue.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-blue.gif deleted file mode 100755 index f3fbf46f6..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-blue.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-chart.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-chart.gif deleted file mode 100755 index 15dc0d957..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-chart.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-dark.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-dark.gif deleted file mode 100755 index 4821ae5ad..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-dark.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-green.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-green.gif deleted file mode 100755 index 24e2603a7..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-green.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-mint.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-mint.gif deleted file mode 100755 index bea9ab7c5..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-mint.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-pink.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-pink.gif deleted file mode 100755 index abe2f4567..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-pink.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-red.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-red.gif deleted file mode 100755 index dba831415..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-red.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-yellow.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-yellow.gif deleted file mode 100755 index fec04bd96..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn-yellow.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn.gif deleted file mode 100755 index 5d1e16452..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/buttons/bg-btn.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/checkmark.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/checkmark.gif deleted file mode 100755 index a1e71e6ce..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/checkmark.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/close_small.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/close_small.png deleted file mode 100755 index f266cef81..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/close_small.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/commercial/garuda-overlay.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/commercial/garuda-overlay.gif deleted file mode 100755 index 22b502937..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/commercial/garuda-overlay.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/dialog_arrows_sprite.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/dialog_arrows_sprite.gif deleted file mode 100755 index f3d54033f..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/dialog_arrows_sprite.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divider.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divider.png deleted file mode 100755 index 0392537bc..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divider.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divot.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divot.gif deleted file mode 100755 index f562d712e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divot.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy-up.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy-up.png deleted file mode 100755 index e4d2727db..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy-up.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy.gif deleted file mode 100755 index 273b2d074..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy.png deleted file mode 100755 index 49c4da5a1..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/divvy.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/follow_check.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/follow_check.gif deleted file mode 100755 index a2fb9e2d5..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/follow_check.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_chrome_help_banner_back.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_chrome_help_banner_back.png deleted file mode 100755 index 959a44154..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_chrome_help_banner_back.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_creation_hint_arrow.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_creation_hint_arrow.gif deleted file mode 100755 index efb4839a0..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_creation_hint_arrow.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_firefox_help_banner_back.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_firefox_help_banner_back.png deleted file mode 100755 index 9ffd9751d..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_firefox_help_banner_back.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_ie_gtb_help_banner_back.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_ie_gtb_help_banner_back.png deleted file mode 100755 index a2e56897e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/geo_ie_gtb_help_banner_back.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon-mobile.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon-mobile.gif deleted file mode 100755 index b2dc6aca5..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon-mobile.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_add.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_add.png deleted file mode 100755 index 2ebf92cf2..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_add.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_direct_reply.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_direct_reply.gif deleted file mode 100755 index 80b6c30d0..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_direct_reply.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_lock.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_lock.gif deleted file mode 100755 index 53e664140..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_lock.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_remove.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_remove.png deleted file mode 100755 index 3a4f1ddc9..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_remove.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_reply.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_reply.gif deleted file mode 100755 index a4379a70b..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_reply.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_throbber.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_throbber.gif deleted file mode 100755 index fa124c5fb..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_throbber.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_trash.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_trash.gif deleted file mode 100755 index 916a332a3..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/icon_trash.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/inline-media.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/inline-media.png deleted file mode 100755 index 8c4d15e29..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/inline-media.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/larry-shadowed-big.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/larry-shadowed-big.png deleted file mode 100755 index bd1e56347..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/larry-shadowed-big.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/lock_icon_small.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/lock_icon_small.png deleted file mode 100755 index 620828832..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/lock_icon_small.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/more.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/more.gif deleted file mode 100755 index 8382f19b5..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/more.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/nav_search_submit.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/nav_search_submit.png deleted file mode 100755 index 29e1d0a13..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/nav_search_submit.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/check.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/check.png deleted file mode 100755 index 1e0188d58..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/check.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_129px.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_129px.png deleted file mode 100755 index b1d8591a8..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_129px.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_146px.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_146px.png deleted file mode 100755 index 5b99bda01..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_146px.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_170px.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_170px.png deleted file mode 100755 index d990e2e23..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_170px.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_236px.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_236px.png deleted file mode 100755 index 7b8b74d49..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/connect_236px.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/gradient-background.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/gradient-background.png deleted file mode 100755 index 503ab9f10..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/gradient-background.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/rays-box.jpg b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/rays-box.jpg deleted file mode 100755 index bb19d1f61..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/rays-box.jpg and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/t_170px.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/t_170px.png deleted file mode 100755 index 2cce58117..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/oauth2/t_170px.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/petal_spinner.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/petal_spinner.gif deleted file mode 100755 index 8a1547805..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/petal_spinner.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/retweet/retweet-x.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/retweet/retweet-x.png deleted file mode 100755 index 7f1f31bd8..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/retweet/retweet-x.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/round-btn-hover.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/round-btn-hover.gif deleted file mode 100755 index d8d6030f1..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/round-btn-hover.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/round-btn.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/round-btn.gif deleted file mode 100755 index f65bb1504..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/round-btn.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/rss.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/rss.gif deleted file mode 100755 index 0ee61c7cd..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/rss.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/spinner.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/spinner.gif deleted file mode 100755 index 6e5bace6e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/spinner.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/sprite-icons.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/sprite-icons.png deleted file mode 100755 index a93cede94..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/sprite-icons.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/sprite-icons.png@v3 b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/sprite-icons.png@v3 deleted file mode 100755 index a93cede94..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/sprite-icons.png@v3 and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tables/tablesorter-indicators.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tables/tablesorter-indicators.png deleted file mode 100755 index af3c40522..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tables/tablesorter-indicators.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/thumb-bird-bw.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/thumb-bird-bw.gif deleted file mode 100755 index dbe336910..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/thumb-bird-bw.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-east.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-east.gif deleted file mode 100755 index 697550bdb..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-east.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-north.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-north.gif deleted file mode 100755 index c22e72b45..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-north.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-south.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-south.gif deleted file mode 100755 index cd48fcd6e..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-south.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-west.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-west.gif deleted file mode 100755 index bd51b5706..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/tipsy/tipsy-west.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_closed.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_closed.gif deleted file mode 100755 index ce8fd78e3..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_closed.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_dark.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_dark.gif deleted file mode 100755 index 4e0ed3707..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_dark.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_dark.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_dark.png deleted file mode 100755 index f3fd0f4b1..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_dark.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_light.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_light.gif deleted file mode 100755 index c05d02d70..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_light.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_light.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_light.png deleted file mode 100755 index d35416159..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_down_light.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_opened.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_opened.gif deleted file mode 100755 index 3543c3bcf..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_opened.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_up_dark.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_up_dark.gif deleted file mode 100755 index f1721e884..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_up_dark.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_up_dark.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_up_dark.png deleted file mode 100755 index 951d903d8..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toggle_up_dark.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toptweet-overlay.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toptweet-overlay.gif deleted file mode 100755 index cd1a0f69c..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/toptweet-overlay.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/translator/translator.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/translator/translator.png deleted file mode 100755 index 4b3a45505..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/translator/translator.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/trendtip-pointer.gif b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/trendtip-pointer.gif deleted file mode 100755 index adf8e0578..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/trendtip-pointer.gif and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/verified/verified.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/verified/verified.png deleted file mode 100755 index 19c0ec066..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/verified/verified.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/verified/verified_small.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/verified/verified_small.png deleted file mode 100755 index b0fdcd4df..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/verified/verified_small.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/warning-sign.png b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/warning-sign.png deleted file mode 100755 index 0ef7aa4cf..000000000 Binary files a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/images/warning-sign.png and /dev/null differ diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/javascripts/geov1.js@1302114648 b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/javascripts/geov1.js@1302114648 deleted file mode 100755 index 870fdd961..000000000 --- a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/javascripts/geov1.js@1302114648 +++ /dev/null @@ -1 +0,0 @@ -twttr.geo={LOG_VERSION:2,LOCATION_CACHE_INTERVAL:30000,BROWSER_GEO_BANNER_APPEAR_DELAY:500,BROWSER_GEO_BANNER_DISAPPEAR_INTERVAL:100,PLACE_SEARCH_AUTOCOMPLETE_DELAY:250,MAX_NEARBY_PLACES:12,MAX_PLACE_SEARCH_RESULTS:50,MAX_PLACE_AUTOCOMPLETE_RESULTS:8,PLACE_SEARCH_RESULTS_PER_PAGE:5,PLACE_CREATION_ACCURACY_THRESHOLD:500,ACCEPTABLE_LOCATION_ACCURACY:1000,ACCEPTABLE_LOCATION_TIMEOUT:5000,LOCATION_TIMEOUT:25000,LOCATION_MAXIMUM_AGE:60000,MAX_SIMILAR_PLACES:5,GENERIC_PLACE_TYPES:{city:null,neighborhood:null,admin:null,country:null},TARGET_POI_NAME_LENGTH:40,TARGET_PLACE_NAME_LENGTH:50,templates:{dropdownItem:{container:'
  •  {{formatted_name}}
  • ',poi:'
  •    {{formatted_name}} {{details}}
  • '},searchResultItem:{container:'
  • {{formatted_name}}
  • ',poi:'
  •   {{formatted_name}} {{details}}
  • '},autocompleteItem:{container:'
  • {{formatted_name}}
  • ',poi:'
  •   {{formatted_name}} {{details}}
  • '},nearbyActivityHeader:{container:'{{formatted_name}}',poi:'{{full_name}}  '},nearbyActivityItem:{container:'
  • {{formatted_name}}
    {{details}}
  • ',poi:'
  • {{formatted_name}}  
    {{details}}
  • '}},options:{more_places:false,autocomplete:false,autocomplete_zero_delay:false,place_creation:false,place_creation_needs_high_accuracy:false,allow_set_location_manually:false,show_place_details_in_map:false}};twttr.geo.getBestContainer=function(A){if(!A){return{name:"",full_name:"",contained_within:[],place_type:"city",bounding_box:{type:"Polygon",coordinates:[[[-122.51368188,37.70813196],[-122.35845384,37.70813196],[-122.35845384,37.83245301],[-122.51368188,37.83245301]]]}}}var B={name:A.part_of_name||"",full_name:A.part_of_name||"",contained_within:[],place_type:"city"};if(A.contained_within){A.contained_within.every(function(C){B=C;return C.place_type!="city"})}return B};twttr.geo.getBestCity=function(A){return(A&&A.place_type=="city")?A:twttr.geo.getBestContainer(A)};twttr.geo.getLocationFromPlace=function(A){if(!A||!A.bounding_box||A.bounding_box.type!="Polygon"||!A.bounding_box.coordinates){return null}var B=A.bounding_box.coordinates[0];if(!B||B.length!=4){return null}return{accuracy:500*twttr.geo.greatCircleDistanceInKm(B[0][1],B[0][0],B[2][1],B[2][0]),latitude:(B[0][1]+B[2][1])*0.5,longitude:(B[0][0]+B[2][0])*0.5}};twttr.geo.getPlacePageLinkFromPlace=function(A){return"/search?"+$.param({q:"place:"+A.id,format:"html"})};twttr.geo.getPlacePageLinkAttrsFromPlace=function(A){var C=[A.attributes?A.attributes.street_address:null,A.contained_within&&A.contained_within.length>0?A.contained_within[0].full_name:null].filter(function(D){return D}).join(", ");var B=A.place_type=="poi"?C:A.name+", "+C;return{title:A.full_name,_query:"place:"+A.id,_place_details:C,_place_map_link:"httpdisabled://maps.google.com/maps?"+$.param({q:B})}};twttr.geo.getPlaceDetails=function(A){if(A.attributes&&A.attributes.street_address){return A.attributes.street_address}switch(A.place_type){case"city":return _("a city");case"neighborhood":return _("a neighborhood");case"country":return _("a country");case"admin":return _("a state or province");default:return _("a place")}return twttr.geo.getBestContainer(A).name};twttr.geo.formatPlaceName=function(A,B){if(A.length<=B){return A}A=A.replace(/ [(].*[)]/g,"");if(A.length<=B){return A}var C="...";return A.substr(0,B-C.length)+C};twttr.geo.renderPlace=function(B,A){if(A.place_type in twttr.geo.GENERIC_PLACE_TYPES){B=B.container;A.formatted_name=twttr.geo.formatPlaceName(A.full_name,twttr.geo.TARGET_PLACE_NAME_LENGTH)}else{B=B.poi;A.formatted_name=twttr.geo.formatPlaceName(A.name,twttr.geo.TARGET_POI_NAME_LENGTH)}A.details=twttr.geo.getPlaceDetails(A);return $(Mustache.to_html(B,A))};twttr.geo.geoScribe=function(A,B){scribe($.extend({event_name:A,ui_version:1,log_version:twttr.geo.LOG_VERSION},B),"geo_checkins")};twttr.geo.Exceptions={GeoSupportException:function(){this.msg=_("This browser does not support GeoLocation")}};twttr.geo.Errors={PermissionDeniedError:function(){this.allowRetry=false;this.fatal=true;this.msg=_("Please grant your web browser permission to tell Twitter where you are.")},LocationDetectionError:function(){this.allowRetry=true;this.fatal=false;this.msg=_("We were unable to detect your location.")}};twttr.geo.greatCircleDistanceInKm=function(H,F,G,E){var C=Math.PI/180;var A=Math.sin((G-H)*C*0.5);var B=Math.sin((E-F)*C*0.5);var D=A*A+Math.cos(H*C)*Math.cos(G*C)*B*B;return 12742*Math.atan2(Math.sqrt(D),Math.sqrt(1-D))};twttr.klass("twttr.geo.Map",function(B){if(!twttr.geo.mapsUI.mapsAvailable()){return }var A={mapTypeId:google.maps.MapTypeId.ROADMAP,disableDefaultUI:true,scrollwheel:false,navigationControl:true,navigationControlOptions:{position:google.maps.ControlPosition.TOP_LEFT,style:google.maps.NavigationControlStyle.SMALL}};this.map=new google.maps.Map(B,A);this.bounds=null}).method("createMapOverlay",function(){function A(B){this.setMap(B)}A.prototype=new google.maps.OverlayView();A.prototype.onAdd=function(){};A.prototype.onRemove=function(){};A.prototype.draw=function(){};this.mapOverlay=new A(this.map)}).method("extendBounds",function(A){if(!this.bounds){this.bounds=new google.maps.LatLngBounds()}this.bounds.extend(A)}).method("addPoint",function(A,C){var E=this;var F=new google.maps.LatLng(A[1],A[0]);E.extendBounds(F);var D=new google.maps.MarkerImage("httpdisabled://s.twimg.com/a/1302214109/images/pin.png",new google.maps.Size(43,32),null,new google.maps.Point(14,33));E.marker=new google.maps.Marker({flat:true,icon:D,map:E.map,position:F,clickable:false,zIndex:2});if(C){var B=new google.maps.MarkerImage(C,new google.maps.Size(24,24),null,new google.maps.Point(13,32));E.avatar=new google.maps.Marker({flat:true,icon:B,map:E.map,position:F,zIndex:3})}}).method("addPoi",function(B,D){var F=this;var A=typeof (D)=="function";var G=new google.maps.LatLng(B[1],B[0]);F.extendBounds(G);var E=new google.maps.MarkerImage("httpdisabled://s.twimg.com/a/1302214109/images/poi-pin.png",new google.maps.Size(43,32),null,new google.maps.Point(14,33));var C=new google.maps.Marker({flat:true,icon:E,map:F.map,position:G,draggable:A,clickable:A,zIndex:2});if(A){google.maps.event.addListener(C,"dragend",function(H){D(H.latLng.lat(),H.latLng.lng())})}}).method("addFocusablePoint",function(A,F){var D=this;var G=new google.maps.LatLng(A[1],A[0]);D.extendBounds(G);var E=new google.maps.MarkerImage("httpdisabled://s.twimg.com/a/1302214109/images/place-minor10x.png",new google.maps.Size(10,10),new google.maps.Point(10,0),new google.maps.Point(5,5));var C=new google.maps.MarkerImage("httpdisabled://s.twimg.com/a/1302214109/images/place-minor10x.png",new google.maps.Size(10,10),null,new google.maps.Point(5,5));var B=new google.maps.Marker({flat:true,icon:C,map:D.map,position:G,clickable:F!==undefined,zIndex:2});if(F){if(D.mapOverlay===undefined){D.createMapOverlay()}google.maps.event.addListener(B,"mouseover",function(H){F(true,D.mapOverlay.getProjection().fromLatLngToContainerPixel(G))});google.maps.event.addListener(B,"mouseout",function(H){F(false,D.mapOverlay.getProjection().fromLatLngToContainerPixel(G))})}return function(H){if(H){B.setIcon(E);B.setZIndex(3)}else{B.setIcon(C);B.setZIndex(2)}}}).method("addAccuracyRing",function(B,A,F){var E=new google.maps.LatLng(B[1],B[0]);var D=new google.maps.Circle({map:F?this.map:null,center:E,radius:A,clickable:false,fillColor:"#0040FF",fillOpacity:0.08,strokeColor:"#2929D4",strokeOpacity:0.7,strokeWeight:0.5,zIndex:1});var C=D.getBounds();if(A>200){this.extendBounds(C.getNorthEast());this.extendBounds(C.getSouthWest())}}).method("addPlacePolygon",function(B){if(B[0][0] instanceof Array){B=B[0]}var D=[];for(var C=0;C
     
    ',mapWithPlace:'',mapWithoutPlace:''},googleApiAvailable:function(){return typeof google!="undefined"},loaddisabledMaps:function(C){if(this.googleApiAvailable()&&google.loaddisabled!==undefined){var B=window.location.hostname.match(/^(.+\.)?twitter\.com$/);var A=google.loaddisabled("maps","3",{callback:C,other_params:B?"client=free-twitter&sensor=false":"sensor=false"})}else{C()}},mapsAvailable:function(){return this.googleApiAvailable()&&google.maps!==undefined},initialize:function(){var A=this;if(A.googleApiAvailable()){A.liveClickHandler=function(C){C.preventDefault();var B=$(this).closest("span.entry-meta");voidMapModal(B.meta(),B.find("a.geocoded_google_link"))};$(".geo-pin, a.geocoded_google_link").live("click",A.liveClickHandler)}},closeMapModal:function(){$(".geo-pin.selected").removeClass("selected");$("#geo_modal").remove();$("#geo_map_progress").remove();this.geoMap=null}voidMapModal:function(G,B){var D=this;D.closeMapModal();var C=$(B);C.addClass("selected");C.after(Mustache.to_html(D.templates.mapProgress));D.showHover($("#geo_map_progress"),C,150);var F=G.place_id;var E=F&&twttr.geo.options.show_place_details_in_map?D.templates.mapWithPlace:D.templates.mapWithoutPlace;C.after(Mustache.to_html(E));$("html").one("click",function(H){D.closeMapModal()});$(".map_close").click(function(H){H.preventDefault();D.closeMapModal()});var A=$("#map_canvas").get(0);twttr.geo.mapsUI.loaddisabledMaps(function(){D.geoMap=new twttr.geo.Map(A);var H=D.geoMap;var I=false;var J=function(){if(!I&&G.latlng){D.geoMap.addPoint(G.latlng.slice().reverse(),G.avatar_url)}if(D.geoMap.isEmpty()){D.closeMapModal();return }D.geoMap.adjustBounds();$("#geo_map_progress").remove();D.showHover($("#geo_modal"),C,0)};if(F){twttr.api.getPlaceDetails({place_id:G.place_id,success:function(L,N){if(H!=D.geoMap){return }var M=L.geometry.coordinates;if(L.geometry.type=="Polygon"){D.geoMap.addPlacePolygon(M)}else{if(L.geometry.type=="MultiPolygon"){M.forEach(function(O){D.geoMap.addPlacePolygon(O)})}else{if(L.geometry.type=="Point"){D.geoMap.addPoint(M,G.avatar_url);I=true}}}$(".geo_map_place_name").text(L.name);$(".geo_map_place_address").text((L.attributes&&L.attributes.street_address)||"");var K=twttr.geo.getBestContainer(L);$(".geo_map_place_container").text(K.full_name||"");$(".geo_map_place_phone").text((L.attributes&&L.attributes.phone)||"");$(".geo_map_place_tweets a").attr("href",twttr.geo.getPlacePageLinkFromPlace(L));if(window.location.pathname=="/"){$(".geo_map_place_tweets a").attr(twttr.geo.getPlacePageLinkAttrsFromPlace(L)).isSearchLink().click(function(){D.closeMapModal()})}J()}})}else{J()}})},showHover:function(A,B,C){A.visible(false);twttr.SimplePositioner.setPosition(A,B,{itemHeight:180,offsets:{above:{top:-10,left:-40},below:{top:10,left:-40}},direction:"prefer below",hasContainer:true});A.click(function(D){D.stopPropagation()});setTimeout(function(){A.visible(true)},C)}};$(function(){twttr.geo.mapsUI.initialize()});twttr.klass("twttr.geo.PlacesDropdown",function(B,D){var C=this;C.placer=B;C.opts=D;var A="
      ";$("#place_content").html(A).bind("tweet",function(){var E=C.placer.getState();C.placer.determinePlaces(function(){C.rebuildPlacesDropdown()},function(){$(".geo_disable_webclient:first").click()});if($("#place_id").val()!=""){twttr.geo.geoScribe("geotweet",E)}});C.$placesList=$("#place_content ul.places_list");C.rebuildPlacesDropdown();$("#place_link").click(function(E){E.preventDefault();if($("#place_content ul.places_list:visible").length>0){C.closeMenu()}else{voidMenu();E.stopPropagation()}})}).method("rebuildPlacesDropdown",function(){var A=this;A.$placesList.empty();A.appendPoiPlaces(A.placer.places);A.appendNonPoiPlaces(A.placer.places);A.appendMorePlaces();$(".geo_more_places").click(function(B){B.preventDefault();new twttr.geo.PlaceSearchDialog(A.placer,A.opts,function(){A.rebuildPlacesDropdown();A.showSelectedPlace()});twttr.geo.geoScribe("click_search_places")});A.showSelectedPlace()}).method("appendPoiPlaces",function(A){var B=false;A.forEach(function(C){if(C.place_type=="poi"){this.$placesList.append(this.createPlaceItem(C));B=true}},this);return B}).method("appendNonPoiPlaces",function(A){A.forEach(function(B){if(B.place_type!="poi"){this.$placesList.append(this.createPlaceItem(B))}},this)}).method("createPlaceItem",function(A){var C=this;var B=twttr.geo.renderPlace(twttr.geo.templates.dropdownItem,A);B.click(function(D){D.preventDefault();C.placer.selectPlace(A);C.rebuildPlacesDropdown();C.closeMenu();twttr.geo.geoScribe("click_place_item",C.placer.getState())});return B}).method("appendMorePlaces",function(){if(this.opts.more_places){this.$placesList.append('
    •  '+_("Search places...")+"
    • ")}}).method("showSelectedPlace",function(){var A=this.placer.selectedPlace;var B;if(A.place_type!="poi"){B=_("in {{full_name}}")}else{B=' '+_("at {{full_name}}")}$("#place_id").val(A.id);$("#place_name").html(Mustache.to_html(B,A));this.$placesList.children("li.selected").removeClass("selected");$("#place_"+A.id).addClass("selected")}).method(voidMenu",function(){var B=this;var A=$("#place_link");var C=$("#place_link").position();B.$placesList.css({left:C.left,top:C.top+A.outerHeight()}).show();$("html").one("click",function(){B.closeMenu()});twttr.geo.geoScribe(void_places_dropdown",B.placer.getState())}).method("closeMenu",function(){this.$placesList.hide()});twttr.klass("twttr.geo.PlaceSearchDialog",function(E,B,H){var F=this;F.opts=B;F.onPlaceAccepted=H;F.place=E.selectedPlace;F.placer=E;F.city=twttr.geo.getBestCity(F.place);F.originalCity=F.city;F.placeHeading="{{_i}}Where are you?{{/i}}";F.placeString=(F.place&&F.place.place_type!="city")?F.place.name:"";F.originalPlaceString=F.placeString;F.placeHtml='
      {{_i}}City{{/i}}{{city}}  {{_i}}Change{{/i}}
      {{_i}}Place Name{{/i}} 
        {{_i}}Optional{{/i}}
        ';F.cityHeading="{{_i}}Change City{{/i}}";F.cityHtml='
        {{_i}}City{{/i}} 
          ';F.noCityHeading="{{_i}}Where are you?{{/i}}";$(".place_search_dialog").remove();F.dialog=new twttr.dialog({content:$("
          ").appendTo("body"),heading:$('
          '),footer:null,cssClass:"place_search_dialog",closeButton:true,renderInline:true,modal:true,fixed:false});var D=E.opts.geoParams;F.searchParams={max_results:twttr.geo.MAX_PLACE_SEARCH_RESULTS,granularity:D.granularity};if(E.detectedPlace&&F.city.id==twttr.geo.getBestCity(E.detectedPlace).id&&D.lat!==undefined&&D.lon!==undefined&&D.accuracy!==undefined){twttr.merge(F.searchParams,{lat:D.lat,lon:D.lon,accuracy:D.accuracy})}else{F.setSearchParamsFromCity()}F.setCityMode(false);var G=$("#place_search_results");G.append("
            ");for(var C=0,A=G.find("ul");C ")}F.void();G.empty();$("#place_search_query").focus().select()}).method("setHeadingAndContent",function(A,B){$("#geo_search_places_title").html(Mustache.to_html(A));$(".place_search_dialog .modal-content").html(Mustache.to_html(B,{city:this.city.full_name}))}).method("scribeSearch",function(B,C,A){var D=this;twttr.geo.geoScribe(B,$.extend({query:$("#place_search_query").helpVal(),mode:C?"city":"place",container_id:D.city.id,place_creation_allowed:D.shouldAllowPlaceCreation(C)},D.searchParams,A))}).method("setCityMode",function(B){var C=this;if(C.city.full_name==""){C.setHeadingAndContent(C.noCityHeading,C.cityHtml);B=true}else{if(B){C.setHeadingAndContent(C.cityHeading,C.cityHtml)}else{C.setHeadingAndContent(C.placeHeading,C.placeHtml)}}var A=$("#place_search_query");if(B){A.val(C.city.full_name)}else{A.val(C.placeString)}A.helpText().selectOnClick();if(twttr.geo.options.autocomplete){C.placeAutocomplete=new twttr.autocomplete({$input:A,$dropdown:$(".place_search_dropdown"),getInputVal:function(){return A.helpVal()},fetchMatches:function(E,G,F){twttr.api.search({data:twttr.merge({},C.searchParams,{query:E,autocomplete:"true",max_results:twttr.geo.MAX_PLACE_AUTOCOMPLETE_RESULTS,granularity:B?"city":C.searchParams.granularity}),success:function(H,I){G(H.result.places)},error:function(){F()}})},renderMatch:function(F,E,G){return twttr.geo.renderPlace(twttr.geo.templates.autocompleteItem,F).click(function(I){var H=[];G.forEach(function(J){H.push(J.id)});C.placeAccepted(F,B);C.scribeSearch("place_search_dialog_select_autocomplete",B,{selected_id:F.id,selected_index:E,place_ids:H})})},delay:twttr.geo.options.autocomplete_zero_delay?0:twttr.geo.PLACE_SEARCH_AUTOCOMPLETE_DELAY})}var D=$("#place_search_form");D.submit(function(E){E.preventDefault();var F=A.helpVal();if(C.placeAutocomplete){C.placeAutocomplete.hide()}if(!F){C.placeAccepted(C.city,B);return }if(B&&F==C.city.full_name){C.setCityMode(false);return }C.setWaitCursor(true);$("#place_search_done").hide();$("#place_search_cancel").show();$("#place_search_results").html(Mustache.to_html('
            {{_i}}Searching for "{{query}}"...{{/i}}
            ',{query:F})).show();twttr.api.search({data:twttr.merge({},C.searchParams,{query:F,granularity:B?"city":C.searchParams.granularity}),success:function(G){C.setWaitCursor(false);C.searchResultPlaces=G.result.places;twttr.geo.mapsUI.loaddisabledMaps(function(){C.displayResults(0,B)})},error:function(G,I,H){C.setWaitCursor(false);C.displaySearchError(G,B)}})});$(".place_search_submit").click(function(){C.searchTrigger="click_icon";D.submit()});A.keydown(function(E){if(E.keyCode==13){C.searchTrigger="enter_key";E.preventDefault();D.submit()}});$("#place_search_done").click(function(){C.searchTrigger="click_done";var E=A.helpVal();if(C.place&&C.place.name==E&&C.city==C.originalCity){C.placeAccepted(C.place,B);C.scribeSearch("place_search_dialog_done_no_changes",B)}else{D.submit()}});$("#place_search_cancel").click(function(){C.dialog.close();C.scribeSearch("place_search_dialog_close",B,{triggered_by:"click_cancel"})});$("#change_city").click(function(E){E.preventDefault();C.placeString=A.helpVal();C.setCityMode(true);C.scribeSearch("place_search_dialog_change_city")});A.focus().select()}).method("setWaitCursor",function(A){$(".place_search_submit").toggleClass("loaddisableding",A)}).method("shouldAllowPlaceCreation",function(A){return !A&&this.opts.place_creation&&twttr.geo.mapsUI.mapsAvailable()&&(!this.opts.place_creation_needs_high_accuracy||this.searchParams.accuracy!==undefined&&this.searchParams.accuracy<=twttr.geo.PLACE_CREATION_ACCURACY_THRESHOLD)&&this.city.country_code=="US"}).method("displayResults",function(I,G){var E=this;var B=I*twttr.geo.PLACE_SEARCH_RESULTS_PER_PAGE;var F=B+twttr.geo.PLACE_SEARCH_RESULTS_PER_PAGE;var A=E.searchResultPlaces.slice(B,F);var J=$("#place_search_results").empty();var H=$("#place_search_query").helpVal();if(A.length==0){J.html(Mustache.to_html('
            {{_i}}We couldn\'t find "{{query}}."{{/i}}
            ',{query:H}))}var C=[];var D=$("
              ").appendTo(J);A.forEach(function(K,L){C.push(K.id);var M=twttr.geo.renderPlace(twttr.geo.templates.searchResultItem,K);M.find("a").click(function(N){N.preventDefault();E.scribeSearch("place_search_dialog_select_result",G,{place_ids:C,selected_id:K.id,selected_index:L});E.placeAccepted(K,G)}).attr("title",twttr.geo.getPlaceDetails(K));D.append(M)});if(E.searchResultPlaces.length>twttr.geo.PLACE_SEARCH_RESULTS_PER_PAGE){J.append(Mustache.to_html(''));E.setNextPrev($("#geo_prev_result"),I>0,I-1,G);E.setNextPrev($("#geo_next_result"),F{{#found}}{{_i}}Not what you're looking for?{{/i}} {{/found}}{{_i}}Add this place!{{/i}}
          ",{found:A.length>0}));$(".geo_add_place a").click(function(K){K.preventDefault();E.dialog.close();new twttr.geo.PlaceCreationDialog(E.city,H,E.searchParams,function(L){E.placeAccepted(L,false)},E.opts.queryParams.accuracyring!==undefined);E.scribeSearch("place_search_dialog_add",G,{place_ids:C})})}E.scribeSearch("place_search_dialog_show_results",G,{place_ids:C,triggered_by:E.searchTrigger})}).method("setNextPrev",function(A,D,C,B){var E=this;A.click(function(F){F.preventDefault();if(D){E.displayResults(C,B)}});if(!D){A.addClass("link-disabled")}}).method("placeAccepted",function(A,B){var C=this;if(B){if(!A.id){C.dialog.close()}else{if(C.city.id!=A.id){C.city=A;if(C.placeString!=C.originalPlaceString){C.placeString=""}C.setSearchParamsFromCity()}}C.setCityMode(false)}else{C.dialog.close();if(C.originalCity!=C.city){C.placer.selectPlace(C.city)}C.placer.selectPlace(A);C.onPlaceAccepted()}}).method("setSearchParamsFromCity",function(){var A=this;if(A.city&&A.city.id){delete A.searchParams.lat;delete A.searchParams.lon;delete A.searchParams.accuracy;A.searchParams.contained_within=A.city.id}}).method("displaySearchError",function(B,A){$("#place_search_results").text(_("Sorry, search is temporarily unavailable, please try again later."));this.scribeSearch("place_search_dialog_error",A)});twttr.klass("twttr.geo.PlaceCreationDialog",function(C,F,D,E,B){var G=this;G.container=C;if(D.contained_within!==undefined){var A=twttr.geo.getLocationFromPlace(C);if(A){G.lat=A.latitude;G.lon=A.longitude;G.accuracy=A.accuracy}}else{G.lat=D.lat;G.lon=D.lon;G.accuracy=D.accuracy}G.originalGeoParams=D;G.placeName=F;G.onPlaceCreated=E;G.showAccuracyRing=B;G.draggedPin=false;G.streetAddress="";G.createHtml='
          {{_i}}Click and move the pin to edit this location.{{/i}}
          {{_i}}Name{{/i}}
          {{_i}}Address{{/i}}
          {{_i}}"795 Folsom St" or "19th and Urban"{{/i}}
          {{_i}}In {{city_name}}{{/i}}
           
          ';G.similarHtml='
          {{_i}}This place may already exist. Did you mean:{{/i}}
          ';$(".place_creation_dialog").remove();G.dialog=new twttr.dialog({content:$("
          ").appendTo("body"),heading:$(Mustache.to_html("
          {{_i}}Add this place.{{/i}}
          ")),footer:null,cssClass:"place_creation_dialog",closeButton:true,renderInline:true,modal:true,fixed:false});G.showCreatePlace()}).method("showCreatePlace",function(){var B=this;$(".place_creation_dialog .modal-content").html(Mustache.to_html(B.createHtml,{city_name:B.container.full_name}));B.inProgress=false;$("#geo_place_name").val(B.placeName).helpText().change(function(C){B.updateState()}).keydown(function(C){setTimeout(function(){B.updateState()},0)});$("#geo_create_place").click(function(){B.placeName=$("#geo_place_name").helpVal();B.streetAddress=$("#geo_place_address").helpVal();B.callSimilarPlaces()});B.void();B.updateMapHeight();B.geoMap=new twttr.geo.Map($(".geo_map_canvas").get(0));B.geoMap.addPoi([B.lon,B.lat],function(C,D){B.lat=C;B.lon=D;B.draggedPin=true});B.geoMap.addAccuracyRing([B.lon,B.lat],B.accuracy,B.showAccuracyRing);B.geoMap.adjustBounds(15);B.updateState();$("#geo_place_address").val(B.streetAddress).helpText().focus();var A=true;setTimeout(function(){if(A){$(".geo_map_hint").fadeTo(700,0.8)}},700);$(".geo_map").mousedown(function(C){A=false;$(".geo_map_hint").fadeOut(200)})}).method("showSimilarPlaces",function(){var B=this;$(".place_creation_dialog .modal-content").html(Mustache.to_html(B.similarHtml));B.inProgress=false;$("#geo_create_place").click(function(){B.callCreatePlace()});$("a.geo_go_back").click(function(D){D.preventDefault();B.showCreatePlace()});var C=$(".geo_place_create ul");B.similarPlaces.forEach(function(D){$placeItem=twttr.geo.renderPlace(twttr.geo.templates.searchResultItem,D);$placeItem.find("a").click(function(E){E.preventDefault();B.dialog.close();B.onPlaceCreated(D)}).attr("title",twttr.geo.getPlaceDetails(D));C.append($placeItem)});B.updateMapHeight();B.geoMap=new twttr.geo.Map($(".geo_map_canvas").get(0));B.geoMap.addPoi([B.lon,B.lat]);$geoMapPlaceBubble=$(".geo_map_place_bubble");var A=$(".geo_map_canvas").position();B.similarPlaces.slice().reverse().forEach(function(E){var D=E.bounding_box.coordinates[0][0];var F=B.geoMap.addFocusablePoint(D,function(H,G){if(H){$geoMapPlaceBubble.find(".geo_place_title").text(E.name);$geoMapPlaceBubble.find(".geo_place_details").text(twttr.geo.getPlaceDetails((E)));$geoMapPlaceBubble.show().css({left:A.left+G.x-$geoMapPlaceBubble.width()/2,top:A.top+G.y,opacity:0.8})}else{$geoMapPlaceBubble.hide()}});$("#result_place_"+E.id).hover(function(){F(true)},function(){F(false)})});B.geoMap.adjustBounds(15);B.updateState()}).method("getPlaceCreationParams",function(){var B=this;var A={lat:B.lat,lon:B.lon,name:B.placeName,contained_within:B.container.id,accuracy:B.draggedPin?0:B.originalGeoParams.accuracy};if(B.token){A.token=B.token}if(B.streetAddress){A["attribute:street_address"]=B.streetAddress}return A}).method("callSimilarPlaces",function(){var A=this;if(!A.inProgress){A.inProgress=true;A.updateState();twttr.api.similarPlaces({data:A.getPlaceCreationParams(),success:function(B){A.token=B.result.token;A.inProgress=false;A.similarPlaces=B.result.places.slice(0,twttr.geo.MAX_SIMILAR_PLACES);if(A.similarPlaces.length>0&&twttr.geo.options&&twttr.geo.options.show_similar_places){A.showSimilarPlaces()}else{A.callCreatePlace()}},error:function(){A.onCreationError();A.scribeCreatePlace("similar_places_error")}})}}).method("callCreatePlace",function(){var A=this;if(!A.inProgress){A.inProgress=true;A.updateState();twttr.api.createPlace({data:A.getPlaceCreationParams(),success:function(B){A.inProgress=false;A.updateState();A.dialog.close();A.onPlaceCreated(B);A.scribeCreatePlace("success")},error:function(){A.onCreationError();A.scribeCreatePlace("create_place_error")}})}}).method("scribeCreatePlace",function(A){var B=this;twttr.geo.geoScribe("create_place",$.extend({status:A,original_lat:B.originalGeoParams.lat,original_lon:B.originalGeoParams.lon,original_accuracy:B.originalGeoParams.accuracy,dragged_pin:B.draggedPin},B.getPlaceCreationParams()))}).method("onCreationError",function(){this.inProgress=false;$("#geo_creation_error").text(_("We couldn't add this place. Please try again."));this.updateState();this.updateMapHeight();this.geoMap.resize()}).method("updateState",function(){$("#geo_creating_place").toggleClass("geo_spinner",this.inProgress)}).method("updateMapHeight",function(){var D=$(".geo_map_canvas");var A=Math.max(210,$(".geo_place_create").outerHeight());D.height(A);var B=$(".geo_map_hint");var C=D.position();B.css({left:C.left+(D.width()-B.width())/2-1,top:C.top+A/2})});twttr.klass("twttr.geo.Locator",function(B){var A=this;A.position=null;A.locator=null;A.locatorType="none";if(B&&B.lat!==undefined&&B.lon!==undefined){A.locatorType="manual";A.locator={watchPosition:function(C){C({coords:{latitude:B.lat,longitude:B.lon,accuracy:parseInt(B.accuracy)||200}});return 0},clearWatch:function(){}}}else{if(navigator&&navigator.geolocation){A.locatorType="html5";A.locator=navigator.geolocation;if(navigator.userAgent.indexOf("Firefox")!=-1){A.browserGeoPermissionsHelpBannerTemplate=A.templates.firefoxGeoPermissionsHelpBanner}else{if(navigator.userAgent.indexOf("Chrome")!=-1){A.browserGeoPermissionsHelpBannerTemplate=A.templates.chromeGeoPermissionsHelpBanner}else{if(navigator.userAgent.indexOf("MSIE")!=-1&&navigator.userAgent.indexOf("GTB")!=-1){A.browserGeoPermissionsHelpBannerTemplate=A.templates.ieGoogleToolbarGeoPermissionsHelpBanner}}}}else{if(typeof google!="undefined"&&typeof google.gears!="undefined"){A.locatorType="gears";A.locator=google.gears.factory.create("beta.geolocation")}}}}).augmentProto({templates:{firefoxGeoPermissionsHelpBanner:'
          {{_i}}Before Twitter can get your location...{{/i}}
          {{_i}}Check "Remember for this site"{{/i}}
          {{_i}}Click "Share Location"{{/i}}
          ',chromeGeoPermissionsHelpBanner:'
          {{_i}}Click "Allow" to let Twitter get your location.{{/i}}
          ',ieGoogleToolbarGeoPermissionsHelpBanner:'
          {{_i}}Before Twitter can get your location...{{/i}}
          {{_i}}Check "Remember for this site"{{/i}}
          {{_i}}Click "Share my location"{{/i}}
          '}}).method("isLocatable",function(){return !!(this.locator)}).method("getLocation",function(A){var C=this;if(!C.isLocatable()){throw new twttr.geo.Exceptions.GeoSupportException()}var B=$.extend({onSuccess:function(D){},onFailure:function(D){},options:{timeout:twttr.geo.LOCATION_TIMEOUT,enableHighAcuracy:true,maximumAge:twttr.geo.LOCATION_MAXIMUM_AGE}},A);if(!C.getBrowserGeoPermissionsHelpBannerSeen()){C.detectBrowserGeoPermissionsBanner()}C.position=null;C.waitForAcceptableId=setTimeout(function(){C.waitForAcceptableId=null;if(C.watchId!=null){C.watchPositionAcceptable(B.onSuccess)}},twttr.geo.ACCEPTABLE_LOCATION_TIMEOUT);C.watchId=null;C.watchId=C.locator.watchPosition(function(D){setTimeout(function(){if(C.watchId!=null){C.watchPositionSuccess(D,B.onSuccess)}},0)},function(D){setTimeout(function(){if(C.watchId!=null){C.watchPositionError(D,B.onFailure)}},0)},B.options)}).method("watchPositionSuccess",function(A,C){var B=this;B.setBrowserGeoPermissionsHelpBannerSeen();B.position={latitude:A.coords.latitude,longitude:A.coords.longitude,accuracy:A.coords.accuracy};if(B.waitForAcceptableId==null||(B.position.accuracy!=undefined&&B.position.accuracy0){$.cookie(this.PLACE_OVERRIDES_COOKIE,A.map(function(B){return $.param(B)}).join(","),{expires:3650})}else{$.cookie(this.PLACE_OVERRIDES_COOKIE,null)}}}).method("getOverrides",function(){return($.cookie(this.PLACE_OVERRIDES_COOKIE)||"").split(",").filter(function(A){return A!=""}).map(function(A){return twttr.unparam(A)})}).method("selectPlace",function(A){var B=this;if(B.places.every(function(C){if(A.id==C.id){B.selectedPlace=C;return false}return true})){B.places.unshift(A);B.selectedPlace=A}if(B.selectedPlace.place_type!="poi"){B.setOverride();B.setRecentPlaceId(B.selectedPlace.id)}}).method("setOverride",function(){var A=this;var B=A.getOverrides().filter(function(C){return !A.isOverrideCloseToDetected(C)});if(A.detectedPlace&&A.selectedPlace.id!=A.detectedPlace.id){B.unshift(twttr.merge({id:A.selectedPlace.id},A.detectedParams))}A.setOverrides(B.slice(0,A.MAX_PLACE_OVERRIDES))}).method("getRecentPlaceId",function(){return $.cookie(this.RECENT_PLACE_COOKIE)}).method("setRecentPlaceId",function(A){$.cookie(this.RECENT_PLACE_COOKIE,A,{expires:3650})}).method("isOverrideCloseToDetected",function(A){var B=this.detectedParams;if(!B){return false}if(A.lat!==undefined&&A.lon!==undefined&&B.lat!==undefined&&B.lon!==undefined&&twttr.geo.greatCircleDistanceInKm(A.lat,A.lon,B.lat,B.lon){{_i}}Find interesting places nearby and see what people are saying there! To get started, tell us where you\'d like to explore:{{/i}}

          {{_i}}Search places...{{/i}}

          ',finding:'

          {{_i}}Finding places nearby...{{/i}}

          ',places:'',error:'

          {{_i}}Location service is currently unavailable.{{/i}} {{_i}}Try again{{/i}}

          ',nextPrev:'

          {{_i}}Prev{{/i}} | {{_i}}Next{{/i}}

          ',noPlaces:'

          {{_i}}No active places nearby.{{/i}}

          '}}).method("show",function(B,A){var C=this;C.$nearbyActivity.html(Mustache.to_html(B));C.$nearbyActivity.find(".geo_nearby_activity_change").click(function(D){D.preventDefault();new twttr.geo.PlaceSearchDialog(C.placer,{},function(){C.search()})});C.$nearbyActivity.find(".geo_nearby_activity_retry").click(function(D){D.preventDefault();C.search()});$("#na_menu span").hide().filter(A?".with-place":".without-place").show()}).method("search",function(){var A=this;A.show(A.templates.finding);A.placer.search(function(){A.showPlaces(0)},function(){A.showError()})}).method("showError",function(){var A=this;A.show(A.placer.selectedPlace?A.templates.error:A.templates.choose)}).method("showPlaces",function(C){var F=this;F.show(F.templates.places,true);F.$nearbyActivity.find(".geo_nearby_activity_header").append(F.renderPlace(twttr.geo.templates.nearbyActivityHeader,F.placer.selectedPlace));var E=F.placer.places.length;if(E==0){F.$nearbyActivity.append(Mustache.to_html(F.templates.noPlaces));return }var B=C*twttr.geo.PLACE_SEARCH_RESULTS_PER_PAGE;var A=B+twttr.geo.PLACE_SEARCH_RESULTS_PER_PAGE;var D=F.placer.places.slice(B,A);D.forEach(function(G){F.$nearbyActivity.find("ul").append(F.renderPlace(twttr.geo.templates.nearbyActivityItem,G))});if(E>twttr.geo.PLACE_SEARCH_RESULTS_PER_PAGE){F.$nearbyActivity.append(Mustache.to_html(F.templates.nextPrev));F.setNextPrev(F.$nearbyActivity.find(".geo_prev"),C>0,C-1);F.setNextPrev(F.$nearbyActivity.find(".geo_next"),A'+_("New!")+" "+_("Add a location to your tweets.")+' '+_("Turn it on")+' - '+_("No thanks")+"");$("#hide_geo_promo").click(function(C){C.preventDefault();if(!$(this).hasClass("link-disabled")){A.hidePromoDialog();$.cookie("geo_promo_hidden","1",{expires:3650});$("#geo_status").slideUp();twttr.geo.geoScribe("promo_bar_no_thanks")}});$("#show_geo_dialog").click(function(C){C.preventDefault();C.stopPropagation();if(!$(this).hasClass("link-disabled")){A.showPromoDialog();twttr.geo.geoScribe("void")}});if(!A.opts.has_dismissed_geo_promo){A.showPromoDialog();twttr.geo.geoScribe("promo_bar_dialog_pop")}twttr.geo.geoScribe("promo_bar_shown")}A.initNearbyActivity()}}).augmentProto({templates:{disable_geo:'  '}}).method("initNearbyActivity",function(A){if(twttr.geo.options.nearby_activity&&!this.nearbyActivity){this.nearbyActivity=new twttr.geo.NearbyActivity(A)}}).method("setGeoStatus",function(A){$("#geo_status").html(A)}).method("scribeLocationDetection",function(A,B){twttr.geo.geoScribe("location_detection_complete",$.extend({status:A,locator_type:this.locator.locatorType},B))}).method("lookupPlacesAndShowDropdown",function(B,D){var C=this;var A=new twttr.geo.Placer({geoParams:B});A.search(function(){C.scribeLocationDetection("place_lookup_succeeded",A.getState());C.setGeoStatus(''+C.templates.disable_geo);new twttr.geo.PlacesDropdown(A,C.opts);C.initNearbyActivity(A)},function(){C.cannotDetectLocation(D);C.scribeLocationDetection("place_lookup_failed",A.getState())},function(){C.setGeoStatus(_("Location service is currently unavailable.")+' '+_("Try again")+""+C.templates.disable_geo);C.initNearbyActivity()})}).method("detectLocationByIp",function(B){var A=this;if(twttr.geo.IP){$("#lat").val();$("#lon").val();A.lookupPlacesAndShowDropdown({ip:twttr.geo.IP,accuracy:16000,granularity:A.opts.granularity,max_results:twttr.geo.MAX_NEARBY_PLACES},B)}else{A.scribeLocationDetection("place_lookup_no_ip");A.cannotDetectLocation(B)}}).method("cannotDetectLocation",function(B){var A=this;if(A.opts.allow_set_location_manually){if(B){A.setLocationManually()}else{A.setGeoStatus(_("We couldn't find you!")+' '+_("Add Location")+""+A.templates.disable_geo);$(".geo_add_manual").click(function(C){C.preventDefault();A.setLocationManually()})}}else{A.setGeoStatus(_("Unable to associate your coordinates with a place.")+' '+_("Try again")+""+A.templates.disable_geo)}A.initNearbyActivity()}).method("setLocationManually",function(){var D=this;var C=new twttr.geo.Placer({geoParams:{granularity:D.opts.granularity}});var A=function(){D.setGeoStatusAddYourLocation();new twttr.geo.PlaceSearchDialog(C,D.opts,function(){D.setGeoStatus(''+D.templates.disable_geo);new twttr.geo.PlacesDropdown(C,D.opts)});twttr.geo.geoScribe("set_location_manually")};var B=C.getRecentPlaceId();if(B){D.setGeoStatus(' '+_("Getting recent location...")+""+D.templates.disable_geo);C.selectPlaceById(B,function(){A()},function(){A()})}else{A()}}).method("detectLocation",function(B){$("#lat").val("");$("#lon").val("");$("#place_id").val("");this.setGeoStatus(' '+_("Getting your location...")+""+this.templates.disable_geo);var A=this;if(!A.locator.isLocatable()||A.opts.queryParams.nodetect!==undefined){A.detectLocationByIp(B)}else{A.locator.getLocation({onSuccess:function(C){$("#lat").val(C.latitude);$("#lon").val(C.longitude);A.lookupPlacesAndShowDropdown({lat:C.latitude,lon:C.longitude,accuracy:C.accuracy,granularity:A.opts.granularity,max_results:twttr.geo.MAX_NEARBY_PLACES},false)},onFailure:function(C){if(!C.fatal){A.detectLocationByIp(B)}else{A.disableGeoForWebClient();A.scribeLocationDetection("denied_by_user")}}})}}).method("showPromoDialog",function(){var B=this;var C=$("#show_geo_dialog");var A=$('

          '+_("Add a location to your tweets")+'

          '+_('Ever had something you wanted to share ("fireworks!", "party!", "ice cream truck!", or "quicksand...") that would be better with a location?')+" "+_("By turning on this feature, you can include location information like neighborhood, town, or exact point when you tweet.")+"

          "+_("When you tweet with a location, Twitter stores that location.")+" "+_("You can switch location on/off before each tweet and always have the option to delete your location history.")+' '+_("Learn more")+'
          '+_("Not now")+'
          ').insertAfter(C);twttr.SimplePositioner.setPosition(A,C,{direction:"below",offsets:{below:{top:10,left:-50}},hasContainer:true});$("#show_geo_dialog,#hide_geo_promo").addClass("link-disabled");$("#geo_turn_location_on").click(function(){B.turnLocationOn();twttr.geo.geoScribe("promo_dialog_turn_location_on")});$(".geo_dialog_close").click(function(D){D.preventDefault();B.hidePromoDialog();twttr.geo.geoScribe("promo_dialog_not_now")});$("#geo-promo-hoverer").click(function(D){D.stopPropagation()});$("html").one("click",function(){if($("#geo-promo-hoverer:visible").length>0){B.hidePromoDialog();twttr.geo.geoScribe("promo_dialog_click_outside")}});A.css("visibility","visible")}).method("hidePromoDialog",function(){if(!this.opts.has_dismissed_geo_promo){this.setUserFlag("has_dismissed_geo_promo");this.opts.has_dismissed_geo_promo=true}$("#geo-promo-hoverer").remove();$("#show_geo_dialog,#hide_geo_promo").removeClass("link-disabled")}).method("turnLocationOn",function(){this.setUserFlag("geo_enabled");this.opts.geo_enabled=true;this.hidePromoDialog();this.enableGeoForWebClient()}).method("setUserFlag",function(A){data={authenticity_token:twttr.form_authenticity_token,_method:"put"};data["user["+A+"]"]="1";$.ajax({type:"POST",url:this.opts.current_user_path,data:data})}).method("enableGeoForWebClient",function(){if(!$.cookie("geo_webclient")){$.cookie("geo_webclient","1",{expires:3650})}this.detectLocation(true)}).method("setGeoStatusAddYourLocation",function(){this.setGeoStatus(' '+_("Add your location")+"")}).method("disableGeoForWebClient",function(){$("#lat").val("");$("#lon").val("");$("#place_id").val("");if($.cookie("geo_webclient")){$.cookie("geo_webclient",null)}this.setGeoStatusAddYourLocation()}); diff --git a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/javascripts/twitter.js@1302215522 b/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/javascripts/twitter.js@1302215522 deleted file mode 100755 index 2bce4f72a..000000000 --- a/mobile/android/tests/browser/chrome/tp5/twitter.com/a2.twimg.com/a/1302214109/javascripts/twitter.js@1302215522 +++ /dev/null @@ -1,2435 +0,0 @@ -/* - * Copyright (c) 2007 Josh Bush (digitalbush.com) - * - * Permission is hereby granted, free of charge, to any person - * obtaining a copy of this software and associated documentation - * files (the "Software"), to deal in the Software without - * restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following - * conditions: - - * The above copyright notice and this permission notice shall be - * included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES - * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT - * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR - * OTHER DEALINGS IN THE SOFTWARE. - */ - -/* - * Version: Beta 1 - * Release: 2007-06-01 - */ -(function($) { - var map=new Array(); - $.Watermark = { - ShowAll:function(){ - for (var i=0;i 0) - $.each(oEls, function(i, el) { - if ( $.inArray(el, els) < 0 ) - $.event.remove(el, query.type, query.fn); - }); - } - else { - // Call the first function for newly matched elements - nEls.each(function() { - query.fn.apply(this); - }); - - // Call the second function for elements no longer matched - if ( this.fn2 && oEls.length > 0 ) - $.each(oEls, function(i, el) { - if ( $.inArray(el, els) < 0 ) - query.fn2.apply(el); - }); - } - } -}; - -$.extend($.livequery, { - guid: 0, - queries: [], - queue: [], - running: false, - timeout: null, - - checkQueue: function() { - if ( $.livequery.running && $.livequery.queue.length ) { - var length = $.livequery.queue.length; - // Run each Live Query currently in the queue - while ( length-- ) - $.livequery.queries[ $.livequery.queue.shift() ].run(); - } - }, - - pause: function() { - // Don't run anymore Live Queries until restarted - $.livequery.running = false; - }, - - play: function() { - // Restart Live Queries - $.livequery.running = true; - // Request a run of the Live Queries - $.livequery.run(); - }, - - registerPlugin: function() { - $.each( arguments, function(i,n) { - // Short-circuit if the method doesn't exist - if (!$.fn[n]) return; - - // Save a reference to the original method - var old = $.fn[n]; - - // Create a new method - $.fn[n] = function() { - // Call the original method - var r = old.apply(this, arguments); - - // Request a run of the Live Queries - $.livequery.run(); - - // Return the original methods result - return r; - } - }); - }, - - run: function(id) { - if (id != undefined) { - // Put the particular Live Query in the queue if it doesn't already exist - if ( $.inArray(id, $.livequery.queue) < 0 ) - $.livequery.queue.push( id ); - } - else - // Put each Live Query in the queue if it doesn't already exist - $.each( $.livequery.queries, function(id) { - if ( $.inArray(id, $.livequery.queue) < 0 ) - $.livequery.queue.push( id ); - }); - - // Clear timeout if it already exists - if ($.livequery.timeout) clearTimeout($.livequery.timeout); - // Create a timeout to check the queue and actually run the Live Queries - $.livequery.timeout = setTimeout($.livequery.checkQueue, 20); - }, - - stop: function(id) { - if (id != undefined) - // Stop are particular Live Query - $.livequery.queries[ id ].stop(); - else - // Stop all Live Queries - $.each( $.livequery.queries, function(id) { - $.livequery.queries[ id ].stop(); - }); - } -}); - -// Register core DOM manipulation methods -$.livequery.registerPlugin('append', 'prepend', 'after', 'before', 'wrap', 'attr', 'removeAttr', 'addClass', 'removeClass', 'toggleClass', 'empty', 'remove'); - -// Run Live Queries when the Document is ready -$(function() { $.livequery.play(); }); - - -// Save a reference to the original init method -var init = $.prototype.init; - -// Create a new init method that exposes two new properties: selector and context -$.prototype.init = function(a,c) { - // Call the original init and save the result - var r = init.apply(this, arguments); - - // Copy over properties if they exist already - if (a && a.selector) - r.context = a.context, r.selector = a.selector; - - // Set properties - if ( typeof a == 'string' ) - r.context = c || document, r.selector = a; - - // Return the result - return r; -}; - -// Give the init function the jQuery prototype for later instantiation (needed after Rev 4091) -$.prototype.init.prototype = $.prototype; - -})(jQuery);/* - * Metadata - jQuery plugin for parsing metadata from elements - * - * Copyright (c) 2006 John Resig, Yehuda Katz, J�örn Zaefferer, Paul McLanahan - * - * Dual licensed under the MIT and GPL licenses: - * http://voidsource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - * - * Revision: $Id: jquery.metadata.js 3640 2007-10-11 18:34:38Z pmclanahan $ - * - */ - -/** - * Sets the type of metadata to use. Metadata is encoded in JSON, and each property - * in the JSON will become a property of the element itself. - * - * There are four supported types of metadata storage: - * - * attr: Inside an attribute. The name parameter indicates *which* attribute. - * - * class: Inside the class attribute, wrapped in curly braces: { } - * - * elem: Inside a child element (e.g. a script tag). The - * name parameter indicates *which* element. - * html5: Values are stored in data-* attributes. - * - * The metadata for an element is loaddisableded the first time the element is accessed via jQuery. - * - * As a result, you can define the metadata type, use $(expr) to loaddisabled the metadata into the elements - * matched by expr, then redefine the metadata type and run another $(expr) for other elements. - * - * @name $.metadata.setType - * - * @example

          This is a p

          - * @before $.metadata.setType("class") - * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" - * @desc Reads metadata from the class attribute - * - * @example

          This is a p

          - * @before $.metadata.setType("attr", "data") - * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" - * @desc Reads metadata from a "data" attribute - * - * @example

          This is a p

          - * @before $.metadata.setType("elem", "script") - * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" - * @desc Reads metadata from a nested script element - * - * @example

          This is a p

          - * @before $.metadata.setType("html5") - * @after $("#one").metadata().item_id == 1; $("#one").metadata().item_label == "Label" - * @desc Reads metadata from a series of data-* attributes - * - * @param String type The encoding type - * @param String name The name of the attribute to be used to get metadata (optional) - * @cat Plugins/Metadata - * @descr Sets the type of encoding to be used when loaddisableding metadata for the first time - * @type undefined - * @see metadata() - */ - -(function($) { - -$.extend({ - metadata : { - defaults : { - type: 'class', - name: 'metadata', - cre: /({.*})/, - single: 'metadata' - }, - setType: function( type, name ){ - this.defaults.type = type; - this.defaults.name = name; - }, - get: function( elem, opts ){ - var settings = $.extend({},this.defaults,opts); - // check for empty string in single property - if ( !settings.single.length ) settings.single = 'metadata'; - - var data = $.data(elem, settings.single); - // returned cached data if it already exists - if ( data ) return data; - - data = "{}"; - - var getData = function(data) { - if(typeof data != "string") return data; - - if( data.indexOf('{') < 0 ) { - data = eval("(" + data + ")"); - } - } - - var getObject = function(data) { - if(typeof data != "string") return data; - - data = eval("(" + data + ")"); - return data; - } - - if ( settings.type == "html5" ) { - var object = {}; - $( elem.attributes ).each(function() { - var name = this.nodeName; - if(name.match(/^data-/)) name = name.replace(/^data-/, ''); - else return true; - object[name] = getObject(this.nodeValue); - }); - } else { - if ( settings.type == "class" ) { - var m = settings.cre.exec( elem.className ); - if ( m ) - data = m[1]; - } else if ( settings.type == "elem" ) { - if( !elem.getElementsByTagName ) return; - var e = elem.getElementsByTagName(settings.name); - if ( e.length ) - data = $.trim(e[0].innerHTML); - } else if ( elem.getAttribute != undefined ) { - var attr = elem.getAttribute( settings.name ); - if ( attr ) - data = attr; - } - object = getObject(data.indexOf("{") < 0 ? "{" + data + "}" : data); - } - - $.data( elem, settings.single, object ); - return object; - } - } -}); - -/** - * Returns the metadata object for the first member of the jQuery object. - * - * @name metadata - * @descr Returns element's metadata object - * @param Object opts An object contianing settings to override the defaults - * @type jQuery - * @cat Plugins/Metadata - */ -$.fn.metadata = function( opts ){ - return $.metadata.get( this[0], opts ); -}; - -})(jQuery);//Licensed under The MIT License -//Copyright (c) 2008 Jason Frame (jason@onehackoranother.com) - - -(function($) { - $.fn.tipsy = function(opts) { - - opts = $.extend({fade: false, gravity: 'n'}, opts || {}); - // ...Added by andy@twitter.com 20090717 - if(!opts['offsetTop']) { opts['offsetTop'] = 0; } - if(!opts['offsetLeft']) { opts['offsetLeft'] = 0; } - if(!opts['header']) { opts['header'] = ''; } - if(!opts['footer']) { opts['footer'] = ''; } - if(!opts['hideTimeout']) { opts['hideTimeout'] = 100; } - if(!opts['showTimeout']) { opts['hideTimeout'] = 0; } - if(!opts['additionalCSSClass']) { opts['additionalCSSClass'] = ''; } - var showTimeoutKey = false; - // ...Added by andy@twitter.com 20090717 - var tip = null, cancelHide = false; - this.hover(function() { - - // ...Added by andy@twitter.com 20090717 - var linkText = $(this).text(); - var header = opts['header'].replace('%{link}', linkText); - var footer = opts['footer'].replace('%{link}', linkText); - // ...Added by andy@twitter.com 20090717 - - $.data(this, 'cancel.tipsy', true); - - var tip = $.data(this, 'active.tipsy'); - if (!tip) { - $('.tipsy').hide(); - tip = $('
          ' + header + $(this).attr('title') + footer + '
          '); - tip.css({position: 'absolute', zIndex: 100000}); - $(this).attr('title', ''); - $.data(this, 'active.tipsy', tip); - // Added by rael@twitter.com 20090628... - } else if ($(this).attr('title') != '') { - tip.find('.tipsy-inner').html($(this).attr('title')); - $(this).attr('title', ''); - // ...Added by rael@twitter.com 20090628 - } - - var pos = $.extend({}, $(this).offset(), {width: this.offsetWidth, height: this.offsetHeight}); - // ...Added by andy@twitter.com 20090717 - pos.top = pos.top + opts['offsetTop']; - pos.left = pos.left + opts['offsetLeft']; - - // void tips if timeout to fade - $('.tipsy').hide(); - // ...Added by andy@twitter.com 20090717 - tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); - var actualWidth = tip[0].offsetWidth, actualHeight = tip[0].offsetHeight; - - switch (opts.gravity.charAt(0)) { - case 'n': - tip.css({top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-north'); - break; - case 'l': - //left north align - tip.css({top: pos.top + pos.height, left: pos.left + pos.width / 2 - 18}).addClass('tipsy-north'); - break; - case 's': - tip.css({top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-south'); - break; - case 'e': - tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}).addClass('tipsy-east'); - break; - case 'w': - tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}).addClass('tipsy-west'); - break; - } - // ...Added by andy@twitter.com 20090717 - function show() { - if (opts.fade) { - tip.css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: 1}); - } else { - tip.css({visibility: 'visible'}); - } - } - if(opts['showTimeout']) { - showTimeoutKey = setTimeout(show, opts['showTimeout']); - } else { - show(); - } - }, function() { - clearTimeout(showTimeoutKey); - // ...Added by andy@twitter.com 20090717 - $.data(this, 'cancel.tipsy', false); - var self = this; - setTimeout(function() { - if ($.data(this, 'cancel.tipsy')) return; - var tip = $.data(self, 'active.tipsy'); - if (opts.fade) { - tip.stop().fadeOut(function() { $(this).remove(); }); - } else { - tip.remove(); - } - }, opts['hideTimeout']); - }); - - }; -})(jQuery); -/* - * jQuery Form Plugin - * version: 2.36 (07-NOV-2009) - * @requires jQuery v1.2.6 or later - * - * Examples and documentation at: http://malsup.com/jquery/form/ - * Dual licensed under the MIT and GPL licenses: - * http://voidsource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html - */ -;(function($) { - -/* - Usage Note: - ----------- - Do not use both ajaxSubmit and ajaxForm on the same form. These - functions are intended to be exclusive. Use ajaxSubmit if you want - to bind your own submit handler to the form. For example, - - $(document).ready(function() { - $('#myForm').bind('submit', function() { - $(this).ajaxSubmit({ - target: '#output' - }); - return false; // <-- important! - }); - }); - - Use ajaxForm when you want the plugin to manage all the event binding - for you. For example, - - $(document).ready(function() { - $('#myForm').ajaxForm({ - target: '#output' - }); - }); - - When using ajaxForm, the ajaxSubmit function will be invoked for you - at the appropriate time. -*/ - -/** - * ajaxSubmit() provides a mechanism for immediately submitting - * an HTML form using AJAX. - */ -$.fn.ajaxSubmit = function(options) { - // fast fail if nothing selected (http://dev.jquery.com/ticket/2752) - if (!this.length) { - log('ajaxSubmit: skipping submit process - no element selected'); - return this; - } - - if (typeof options == 'function') - options = { success: options }; - - var url = $.trim(this.attr('action')); - if (url) { - // clean url (don't include hash vaue) - url = (url.match(/^([^#]+)/)||[])[1]; - } - url = url || window.location.href || ''; - - options = $.extend({ - url: url, - type: this.attr('method') || 'GET', - iframeSrc: /^https/i.test(window.location.href || '') ? 'javascript:false' : 'about:blank' - }, options || {}); - - // hook for manipulating the form data before it is extracted; - // convenient for use with rich editors like tinyMCE or FCKEditor - var veto = {}; - this.trigger('form-pre-serialize', [this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-pre-serialize trigger'); - return this; - } - - // provide opportunity to alter form data before it is serialized - if (options.beforeSerialize && options.beforeSerialize(this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSerialize callback'); - return this; - } - - var a = this.formToArray(options.semantic); - if (options.data) { - options.extraData = options.data; - for (var n in options.data) { - if(options.data[n] instanceof Array) { - for (var k in options.data[n]) - a.push( { name: n, value: options.data[n][k] } ); - } - else - a.push( { name: n, value: options.data[n] } ); - } - } - - // give pre-submit callback an opportunity to abort the submit - if (options.beforeSubmit && options.beforeSubmit(a, this, options) === false) { - log('ajaxSubmit: submit aborted via beforeSubmit callback'); - return this; - } - - // fire vetoable 'validate' event - this.trigger('form-submit-validate', [a, this, options, veto]); - if (veto.veto) { - log('ajaxSubmit: submit vetoed via form-submit-validate trigger'); - return this; - } - - var q = $.param(a); - - if (options.type.toUpperCase() == 'GET') { - options.url += (options.url.indexOf('?') >= 0 ? '&' : '?') + q; - options.data = null; // data is null for 'get' - } - else - options.data = q; // data is the query string for 'post' - - var $form = this, callbacks = []; - if (options.resetForm) callbacks.push(function() { $form.resetForm(); }); - if (options.clearForm) callbacks.push(function() { $form.clearForm(); }); - - // perform a loaddisabled on the target only if dataType is not provided - if (!options.dataType && options.target) { - var oldSuccess = options.success || function(){}; - callbacks.push(function(data) { - $(options.target).html(data).each(oldSuccess, arguments); - }); - } - else if (options.success) - callbacks.push(options.success); - - options.success = function(data, status) { - for (var i=0, max=callbacks.length; i < max; i++) - callbacks[i].apply(options, [data, status, $form]); - }; - - // are there files to uploaddisabled? - var files = $('input:file', this).fieldValue(); - var found = false; - for (var j=0; j < files.length; j++) - if (files[j]) - found = true; - - var multipart = false; -// var mp = 'multipart/form-data'; -// multipart = ($form.attr('enctype') == mp || $form.attr('encoding') == mp); - - // options.iframe allows user to force iframe mode - // 06-NOV-09: now defaulting to iframe mode if file input is detected - if ((files.length && options.iframe !== false) || options.iframe || found || multipart) { - // hack to fix Safari hang (thanks to Tim Molendijk for this) - // see: http://groups.google.com/group/jquery-dev/browse_thread/thread/36395b7ab510dd5d - if (options.closeKeepAlive) - $.get(options.closeKeepAlive, fileUploaddisabled); - else - fileUploaddisabled(); - } - else - $.ajax(options); - - // fire 'notify' event - this.trigger('form-submit-notify', [this, options]); - return this; - - - // private function for handling file uploaddisableds (hat tip to YAHOO!) - function fileUploaddisabled() { - var form = $form[0]; - - if ($(':input[name=submit]', form).length) { - alert('Error: Form elements must not be named "submit".'); - return; - } - - var opts = $.extend({}, $.ajaxSettings, options); - var s = $.extend(true, {}, $.extend(true, {}, $.ajaxSettings), opts); - - var id = 'jqFormIO' + (new Date().getTime()); - var $io = $('

          -

          Resetting input:

          -

          Hiding input:

          - - - - diff --git a/mobile/android/tests/browser/robocop/robocop_javascript.html b/mobile/android/tests/browser/robocop/robocop_javascript.html deleted file mode 100644 index 8719f5c6d..000000000 --- a/mobile/android/tests/browser/robocop/robocop_javascript.html +++ /dev/null @@ -1,20 +0,0 @@ - - - -Mochitest Robotium Javascript Test Harness - - - - diff --git a/mobile/android/tests/browser/robocop/robocop_link_to_slow_loading.html b/mobile/android/tests/browser/robocop/robocop_link_to_slow_loading.html deleted file mode 100644 index 45e487c2a..000000000 --- a/mobile/android/tests/browser/robocop/robocop_link_to_slow_loading.html +++ /dev/null @@ -1,12 +0,0 @@ - - - Link - - - - - - - diff --git a/mobile/android/tests/browser/robocop/robocop_login_01.html b/mobile/android/tests/browser/robocop/robocop_login_01.html deleted file mode 100644 index 19c7dd1f2..000000000 --- a/mobile/android/tests/browser/robocop/robocop_login_01.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - Robocop Login - - - -

          User Login

          -
          - Username:
          - Password:
          - -
          - - diff --git a/mobile/android/tests/browser/robocop/robocop_login_02.html b/mobile/android/tests/browser/robocop/robocop_login_02.html deleted file mode 100644 index 55d7f9308..000000000 --- a/mobile/android/tests/browser/robocop/robocop_login_02.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - Robocop Login - - - -

          User Login

          -
          - Username:
          - Password:
          - -
          - - diff --git a/mobile/android/tests/browser/robocop/robocop_offline_storage.html b/mobile/android/tests/browser/robocop/robocop_offline_storage.html deleted file mode 100644 index 50878d764..000000000 --- a/mobile/android/tests/browser/robocop/robocop_offline_storage.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Robocop offline storage - - - - - diff --git a/mobile/android/tests/browser/robocop/robocop_picture_link.html b/mobile/android/tests/browser/robocop/robocop_picture_link.html deleted file mode 100644 index a56af54c0..000000000 --- a/mobile/android/tests/browser/robocop/robocop_picture_link.html +++ /dev/null @@ -1,13 +0,0 @@ - - - Picture Link - - - - - -
          - -
          - - diff --git a/mobile/android/tests/browser/robocop/robocop_popup.html b/mobile/android/tests/browser/robocop/robocop_popup.html deleted file mode 100644 index 4b7db35c7..000000000 --- a/mobile/android/tests/browser/robocop/robocop_popup.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Page creating a popup - - - - - diff --git a/mobile/android/tests/browser/robocop/robocop_search.html b/mobile/android/tests/browser/robocop/robocop_search.html deleted file mode 100644 index 581193c9d..000000000 --- a/mobile/android/tests/browser/robocop/robocop_search.html +++ /dev/null @@ -1,11 +0,0 @@ - -
          - Robocop Search Engine -
          - -
          - - -
          - - diff --git a/mobile/android/tests/browser/robocop/robocop_slow_loading.html b/mobile/android/tests/browser/robocop/robocop_slow_loading.html deleted file mode 100644 index 8c87f5aac..000000000 --- a/mobile/android/tests/browser/robocop/robocop_slow_loading.html +++ /dev/null @@ -1,23 +0,0 @@ - - - Slow Loading - - - - - -
          -

          This page is loading very slow.

          -
          - - diff --git a/mobile/android/tests/browser/robocop/robocop_suggestions.sjs b/mobile/android/tests/browser/robocop/robocop_suggestions.sjs deleted file mode 100644 index 2621288d9..000000000 --- a/mobile/android/tests/browser/robocop/robocop_suggestions.sjs +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Used with testSearchSuggestions. - * Returns a set of pre-defined suggestions for given prefixes. - */ - -function handleRequest(request, response) { - let query = request.queryString.match(/^query=(.*)$/)[1]; - query = decodeURIComponent(query).replace(/\+/g, " "); - - let suggestMap = { - "f": ["facebook", "fandango", "frys", "forever 21", "fafsa"], - "fo": ["forever 21", "food network", "fox news", "foothill college", "fox"], - "foo": ["food network", "foothill college", "foot locker", "footloose", "foo fighters"], - "foo ": ["foo fighters", "foo bar", "foo bat", "foo bay"], - "foo b": ["foo bar", "foo bat", "foo bay"], - "foo ba": ["foo bar", "foo bat", "foo bay"], - "foo bar": ["foo bar"] - }; - - let suggestions = suggestMap[query]; - if (!suggestions) - suggestions = []; - suggestions = [query, suggestions]; - - /* - * Sample result: - * ["foo",["food network","foothill college","foot locker",...]] - */ - response.setHeader("Content-Type", "text/json", false); - response.setHeader("Cache-Control", "no-cache", false); - response.write(JSON.stringify(suggestions)); -} diff --git a/mobile/android/tests/browser/robocop/robocop_testharness.js b/mobile/android/tests/browser/robocop/robocop_testharness.js deleted file mode 100644 index acc711b8b..000000000 --- a/mobile/android/tests/browser/robocop/robocop_testharness.js +++ /dev/null @@ -1,74 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -function sendMessageToJava(message) { - SpecialPowers.Services.androidBridge.handleGeckoMessage(message); -} - -function _evalURI(uri, sandbox) { - // We explicitly allow Cross-Origin requests, since it is useful for - // testing, but we allow relative URLs by maintaining our baseURI. - let req = SpecialPowers.Cc["@mozilla.org/xmlextras/xmlhttprequest;1"] - .createInstance(); - - let baseURI = SpecialPowers.Services.io - .newURI(window.document.baseURI, window.document.characterSet, null); - let theURI = SpecialPowers.Services.io - .newURI(uri, window.document.characterSet, baseURI); - - // We append a random slug to avoid caching: see - // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache. - req.open('GET', theURI.spec + ((/\?/).test(theURI.spec) ? "&slug=" : "?slug=") + (new Date()).getTime(), false); - req.setRequestHeader('Cache-Control', 'no-cache'); - req.setRequestHeader('Pragma', 'no-cache'); - req.send(); - - return SpecialPowers.Cu.evalInSandbox(req.responseText, sandbox, "1.8", uri, 1); -} - -/** - * Execute the Javascript file at `uri` in a testing sandbox populated - * with the Javascript test harness. - * - * `uri` should be a String, relative (to window.document.baseURI) or - * absolute. - * - * The Javascript test harness sends all output to Java via - * Robocop:JS messages. - */ -function testOneFile(uri) { - let HEAD_JS = "robocop_head.js"; - - // System principal. This is dangerous, but this is test code that - // should only run on developer and build farm machines, and the - // test harness needs access to a lot of the Components API, - // including Components.stack. Wrapping Components.stack in - // SpecialPowers magic obfuscates stack traces wonderfully, - // defeating much of the point of the test harness. - let principal = SpecialPowers.Cc["@mozilla.org/systemprincipal;1"] - .createInstance(SpecialPowers.Ci.nsIPrincipal); - - let testScope = SpecialPowers.Cu.Sandbox(principal); - - // Populate test environment with test harness prerequisites. - testScope.Components = SpecialPowers.Components; - testScope._TEST_FILE = uri; - - // Output from head.js is fed, line by line, to this function. We - // send any such output back to the Java Robocop harness. - testScope.dump = function (str) { - let message = { type: "Robocop:JS", - innerType: "progress", - message: str, - }; - sendMessageToJava(message); - }; - - // Populate test environment with test harness. The symbols defined - // above must be present before executing the test harness. - _evalURI(HEAD_JS, testScope); - - return _evalURI(uri, testScope); -} diff --git a/mobile/android/tests/browser/robocop/robocop_text_page.html b/mobile/android/tests/browser/robocop/robocop_text_page.html deleted file mode 100644 index db30144dd..000000000 --- a/mobile/android/tests/browser/robocop/robocop_text_page.html +++ /dev/null @@ -1,27 +0,0 @@ - - - Robocop Text Page - - - - -

          Text taken from Wikipedia.org

          -

          Will be searching for this string: Robocop 1

          -

          Mozilla is a free software community best known for producing the Firefox web browser. The Mozilla community uses, develops, spreads and supports Mozilla products and works to advance the goals of the Open Web described in the Mozilla Manifesto.[1] The community is supported institutionally by the Mozilla Foundation and its tax-paying subsidiary, the Mozilla Corporation.[2]

          -
          -

          Will be searching for this string: Robocop 2

          -

          In addition to the Firefox browser, Mozilla also produces Firefox Mobile, the Firefox OS mobile operating system, the bug tracking system Bugzilla and a number of other projects.

          -
          -

          Will be searching for this string: Robocop 3

          -

          On February 23, 1998, Netscape Communications Corporation created a project called Mozilla (after the original code name of the Netscape Navigator browser which — according to Pascal Finette — is a mashup of "Mosaic Killer") to co-ordinate the development of the Mozilla Application Suite, the open source version of Netscape's internet software, Netscape Communicator.[3][4] Jamie Zawinski says he came up with the name "Mozilla" at a Netscape staff meeting.[5][6] A small group of Netscape employees were tasked with coordination of the new community.

          -

          -

          Will be searching for this string: Robocop

          -

          Originally, Mozilla aimed to be a technology provider for companies, such as Netscape, who would commercialize their open source code.[7] When AOL (Netscape's parent company) drastically scaled back its involvement with Mozilla in July 2003, the Mozilla Foundation was launched as the legal steward of the project.[8] Soon after, Mozilla deprecated the Mozilla Suite in favor of creating independent applications for each function, primarily the Firefox web browser and the Thunderbird email client, and moved to supply them direct to the public.[9]

          -

          -

          Will be searching for this string: Robocop

          -

          Recently, Mozilla's activities have expanded to include Firefox on mobile platforms (primarily Android),[10] a mobile OS called Firefox OS,[11] a web-based identity system called Mozilla Persona and a marketplace for HTML5 applications.[12]

          -
          -

          Will be searching for this string: Robocop

          -

          In a report released in November of 2012, Mozilla reported that their total revenue for 2011 was $163 million, which was up 33% from $123 million in 2010. Mozilla noted that roughly 85% of their revenue comes from their contract with Google. [13]

          - - diff --git a/mobile/android/tests/browser/robocop/roboextender/Makefile.in b/mobile/android/tests/browser/robocop/roboextender/Makefile.in deleted file mode 100644 index 07d7992ac..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/Makefile.in +++ /dev/null @@ -1,9 +0,0 @@ -# -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -TEST_EXTENSIONS_DIR = $(DEPTH)/_tests/testing/mochitest/extensions - -tools:: - -cp $(DEPTH)/mobile/android/tests/javaaddons/javaaddons-test.apk $(TEST_EXTENSIONS_DIR)/roboextender@mozilla.org/base diff --git a/mobile/android/tests/browser/robocop/roboextender/base/robocop_home_banner.html b/mobile/android/tests/browser/robocop/roboextender/base/robocop_home_banner.html deleted file mode 100644 index 9a9456604..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/base/robocop_home_banner.html +++ /dev/null @@ -1,37 +0,0 @@ - - - HomeBanner test page - - - - - - - diff --git a/mobile/android/tests/browser/robocop/roboextender/base/robocop_prompt_gridinput.html b/mobile/android/tests/browser/robocop/roboextender/base/robocop_prompt_gridinput.html deleted file mode 100644 index 733683c16..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/base/robocop_prompt_gridinput.html +++ /dev/null @@ -1,51 +0,0 @@ - - - IconGrid test page - - - - - - - diff --git a/mobile/android/tests/browser/robocop/roboextender/bootstrap.js b/mobile/android/tests/browser/robocop/roboextender/bootstrap.js deleted file mode 100644 index e903aa3f6..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/bootstrap.js +++ /dev/null @@ -1,65 +0,0 @@ - -var Cc = Components.classes; -var Ci = Components.interfaces; -var Cu = Components.utils; - -Cu.import("resource://gre/modules/Services.jsm"); - -function loadIntoWindow(window) {} -function unloadFromWindow(window) {} - -function _sendMessageToJava (aMsg) { - return Services.androidBridge.handleGeckoMessage(aMsg); -}; - -/* - bootstrap.js API -*/ -var windowListener = { - onOpenWindow: function(aWindow) { - // Wait for the window to finish loading - let domWindow = aWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindow); - domWindow.addEventListener("load", function() { - domWindow.removeEventListener("load", arguments.callee, false); - if (domWindow) { - domWindow.addEventListener("scroll", function(e) { - let message = { - type: 'robocop:scroll', - y: XPCNativeWrapper.unwrap(e.target).documentElement.scrollTop, - height: XPCNativeWrapper.unwrap(e.target).documentElement.scrollHeight, - cheight: XPCNativeWrapper.unwrap(e.target).documentElement.clientHeight, - }; - _sendMessageToJava(message); - }); - } - }, false); - }, - onCloseWindow: function(aWindow) { }, - onWindowTitleChange: function(aWindow, aTitle) { } -}; - -function startup(aData, aReason) { - let wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator); - - // Load into any new windows - wm.addListener(windowListener); - Services.obs.addObserver(function observe(aSubject, aTopic, aData) { - dump("Robocop:Quit received -- requesting quit"); - let appStartup = Cc["@mozilla.org/toolkit/app-startup;1"].getService(Ci.nsIAppStartup); - appStartup.quit(Ci.nsIAppStartup.eForceQuit); - }, "Robocop:Quit", false); -} - -function shutdown(aData, aReason) { - // When the application is shutting down we normally don't have to clean up any UI changes - if (aReason == APP_SHUTDOWN) return; - - let wm = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator); - - // Stop watching for new windows - wm.removeListener(windowListener); -} - -function install(aData, aReason) { } -function uninstall(aData, aReason) { } - diff --git a/mobile/android/tests/browser/robocop/roboextender/chrome.manifest b/mobile/android/tests/browser/robocop/roboextender/chrome.manifest deleted file mode 100644 index 7467f91a6..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/chrome.manifest +++ /dev/null @@ -1 +0,0 @@ -content roboextender base/ \ No newline at end of file diff --git a/mobile/android/tests/browser/robocop/roboextender/install.rdf b/mobile/android/tests/browser/robocop/roboextender/install.rdf deleted file mode 100644 index cbf66e884..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/install.rdf +++ /dev/null @@ -1,19 +0,0 @@ - - - - roboextender@mozilla.org - 2 - Robocop Extender - 1.0 - true - Joel Maher - - - toolkit@mozilla.org - 10.0 - * - - - - - diff --git a/mobile/android/tests/browser/robocop/roboextender/moz.build b/mobile/android/tests/browser/robocop/roboextender/moz.build deleted file mode 100644 index e2388a2b8..000000000 --- a/mobile/android/tests/browser/robocop/roboextender/moz.build +++ /dev/null @@ -1,12 +0,0 @@ -# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- -# vim: set filetype=python: -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -TEST_HARNESS_FILES.testing.mochitest.extensions['roboextender@mozilla.org'] += [ - 'base/**', - 'bootstrap.js', - 'chrome.manifest', - 'install.rdf', -] diff --git a/mobile/android/tests/browser/robocop/simple_redirect.sjs b/mobile/android/tests/browser/robocop/simple_redirect.sjs deleted file mode 100644 index b6249cadf..000000000 --- a/mobile/android/tests/browser/robocop/simple_redirect.sjs +++ /dev/null @@ -1,5 +0,0 @@ -function handleRequest(request, response) -{ - response.setStatusLine(request.httpVersion, 301, "Moved Permanently"); - response.setHeader("Location", request.queryString, false); -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Actions.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Actions.java deleted file mode 100644 index 05e6bfa52..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Actions.java +++ /dev/null @@ -1,126 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; -import android.database.Cursor; - -public interface Actions { - - /** Special keys supported by sendSpecialKey() */ - public enum SpecialKey { - DOWN, - UP, - LEFT, - RIGHT, - ENTER, - MENU, - DELETE, - } - - public interface EventExpecter { - /** Blocks until the event has been received. Subsequent calls will return immediately. */ - public void blockForEvent(); - public void blockForEvent(long millis, boolean failOnTimeout); - - /** Blocks until the event has been received and returns data associated with the event. */ - public String blockForEventData(); - - /** - * Blocks until the event has been received, or until the timeout has been exceeded. - * Returns the data associated with the event, if applicable. - */ - public String blockForEventDataWithTimeout(long millis); - - /** Polls to see if the event has been received. Once this returns true, subsequent calls will also return true. */ - public boolean eventReceived(); - - /** Stop listening for events. */ - public void unregisterListener(); - } - - public interface RepeatedEventExpecter extends EventExpecter { - /** Blocks until at least one event has been received, and no events have been received in the last millis milliseconds. */ - public void blockUntilClear(long millis); - } - - /** - * Sends an event to Gecko. - * - * @param geckoEvent The geckoEvent JSONObject's type - */ - void sendGeckoEvent(String geckoEvent, String data); - - public interface PrefWaiter { - boolean isFinished(); - void waitForFinish(); - void waitForFinish(long timeoutMillis, boolean failOnTimeout); - } - - public abstract static class PrefHandlerBase implements PrefsHelper.PrefHandler { - /* package */ Assert asserter; - - @Override // PrefsHelper.PrefHandler - public void prefValue(String pref, boolean value) { - asserter.ok(false, "Unexpected pref callback", ""); - } - - @Override // PrefsHelper.PrefHandler - public void prefValue(String pref, int value) { - asserter.ok(false, "Unexpected pref callback", ""); - } - - @Override // PrefsHelper.PrefHandler - public void prefValue(String pref, String value) { - asserter.ok(false, "Unexpected pref callback", ""); - } - - @Override // PrefsHelper.PrefHandler - public void finish() { - } - } - - PrefWaiter getPrefs(String[] prefNames, PrefHandlerBase handler); - void setPref(String pref, Object value, boolean flush); - PrefWaiter addPrefsObserver(String[] prefNames, PrefHandlerBase handler); - void removePrefsObserver(PrefWaiter handler); - - /** - * Listens for a gecko event to be sent from the Gecko instance. - * The returned object can be used to test if the event has been - * received. Note that only one event is listened for. - * - * @param geckoEvent The geckoEvent JSONObject's type - */ - RepeatedEventExpecter expectGeckoEvent(String geckoEvent); - - /** - * Listens for a paint event. Note that calling expectPaint() will - * invalidate the event expecters returned from any previous calls - * to expectPaint(); calling any methods on those invalidated objects - * will result in undefined behaviour. - */ - RepeatedEventExpecter expectPaint(); - - /** - * Send a string to the application - * - * @param keysToSend The string to send - */ - void sendKeys(String keysToSend); - - /** - * Send a special keycode to the element - * - * @param key The special key to send - */ - void sendSpecialKey(SpecialKey key); - void sendKeyCode(int keyCode); - - void drag(int startingX, int endingX, int startingY, int endingY); - - /** - * Run a sql query on the specified database - */ - public Cursor querySql(String dbPath, String sql); -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Assert.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Assert.java deleted file mode 100644 index aa76dcf2b..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Assert.java +++ /dev/null @@ -1,25 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -public interface Assert { - void dumpLog(String message); - void dumpLog(String message, Throwable t); - void setLogFile(String filename); - void setTestName(String testName); - void endTest(); - - void ok(boolean condition, String name, String diag); - void is(Object actual, Object expected, String name); - void isnot(Object actual, Object notExpected, String name); - void todo(boolean condition, String name, String diag); - void todo_is(Object actual, Object expected, String name); - void todo_isnot(Object actual, Object notExpected, String name); - void info(String name, String message); - - // robocop-specific asserts - void ispixel(int actual, int r, int g, int b, String name); - void isnotpixel(int actual, int r, int g, int b, String name); -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Driver.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Driver.java deleted file mode 100644 index 4c8373c5b..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Driver.java +++ /dev/null @@ -1,44 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import android.app.Activity; - -public interface Driver { - /** - * Find the first Element using the given method. - * - * @param activity The activity the element belongs to - * @param id The resource id of the element - * @return The first matching element on the current context, or null if not found. - */ - Element findElement(Activity activity, int id); - - /** - * Sets up scroll handling so that data is received from the extension. - */ - void setupScrollHandling(); - - int getPageHeight(); - int getScrollHeight(); - int getHeight(); - int getGeckoTop(); - int getGeckoLeft(); - int getGeckoWidth(); - int getGeckoHeight(); - - void startFrameRecording(); - int stopFrameRecording(); - - void startCheckerboardRecording(); - float stopCheckerboardRecording(); - - /** - * Get a copy of the painted content region. - * @return A 2-D array of pixels (indexed by y, then x). The pixels - * are in ARGB-8888 format. - */ - PaintedSurface getPaintedSurface(); -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Element.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Element.java deleted file mode 100644 index 97610ff32..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/Element.java +++ /dev/null @@ -1,27 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -/** - * Element provides access to a specific UI view (android.view.View). - * See also Driver.findElement(). - */ -public interface Element { - - /** Click on the element's view. Returns true on success. */ - boolean click(); - - /** Returns true if the element is currently displayed */ - boolean isDisplayed(); - - /** - * Returns the text currently displayed on the element, or null - * if the text cannot be retrieved. - */ - String getText(); - - /** Returns the view ID */ - Integer getId(); -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecInstrumentationTestRunner.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecInstrumentationTestRunner.java deleted file mode 100644 index 6bcb4e102..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecInstrumentationTestRunner.java +++ /dev/null @@ -1,79 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import android.app.KeyguardManager; -import android.content.Context; -import android.os.Bundle; -import android.os.PowerManager; -import android.test.InstrumentationTestRunner; -import android.util.Log; - -import static android.os.PowerManager.ACQUIRE_CAUSES_WAKEUP; -import static android.os.PowerManager.FULL_WAKE_LOCK; -import static android.os.PowerManager.ON_AFTER_RELEASE; - -public class FennecInstrumentationTestRunner extends InstrumentationTestRunner { - private static Bundle sArguments; - private PowerManager.WakeLock wakeLock; - private KeyguardManager.KeyguardLock keyguardLock; - - @Override - public void onCreate(Bundle arguments) { - sArguments = arguments; - if (sArguments == null) { - Log.e("Robocop", "FennecInstrumentationTestRunner.onCreate got null bundle"); - } - super.onCreate(arguments); - } - - // unfortunately we have to make this static because test classes that don't extend - // from ActivityInstrumentationTestCase2 can't get a reference to this class. - public static Bundle getFennecArguments() { - if (sArguments == null) { - Log.e("Robocop", "FennecInstrumentationTestCase.getFennecArguments returns null bundle"); - } - return sArguments; - } - - @Override - public void onStart() { - final Context context = getContext(); // The Robocop package itself has DISABLE_KEYGUARD and WAKE_LOCK. - if (context != null) { - try { - String name = FennecInstrumentationTestRunner.class.getSimpleName(); - // Unlock the device so that the tests can input keystrokes. - final KeyguardManager keyguard = (KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); - // Deprecated in favour of window flags, which aren't appropriate here. - keyguardLock = keyguard.newKeyguardLock(name); - keyguardLock.disableKeyguard(); - - // Wake up the screen. - final PowerManager power = (PowerManager) context.getSystemService(Context.POWER_SERVICE); - wakeLock = power.newWakeLock(FULL_WAKE_LOCK | ACQUIRE_CAUSES_WAKEUP | ON_AFTER_RELEASE, name); - wakeLock.acquire(); - } catch (SecurityException e) { - Log.w("GeckoInstTestRunner", "Got SecurityException: not disabling keyguard and not taking wakelock."); - } - } else { - Log.w("GeckoInstTestRunner", "Application target context is null: not disabling keyguard and not taking wakelock."); - } - - super.onStart(); - } - - @Override - public void onDestroy() { - super.onDestroy(); - - if (wakeLock != null) { - wakeLock.release(); - } - if (keyguardLock != null) { - // Deprecated in favour of window flags, which aren't appropriate here. - keyguardLock.reenableKeyguard(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecMochitestAssert.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecMochitestAssert.java deleted file mode 100644 index cb7c3c464..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecMochitestAssert.java +++ /dev/null @@ -1,254 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import java.io.PrintWriter; -import java.io.StringWriter; -import java.io.Writer; - -import android.os.SystemClock; - -public class FennecMochitestAssert implements Assert { - // Internal state variables to make logging match up with existing mochitests - private int mPassed = 0; - private int mFailed = 0; - private int mTodo = 0; - - // Used to write the first line of the test file - private boolean mLogStarted = false; - - // Used to write the test-start/test-end log lines - private String mLogTestName = ""; - - // Measure the time it takes to run test case - private long mStartTime = 0; - - // Structured logger - private StructuredLogger mLogger; - - /** Write information to a logfile and logcat */ - public void dumpLog(String message) { - mLogger.info(message); - } - - public void dumpLog(String message, Throwable t) { - Writer sw = new StringWriter(); - PrintWriter pw = new PrintWriter(sw); - t.printStackTrace(pw); - mLogger.error(message + " - " + sw.toString()); - } - - /** Write information to a logfile and logcat */ - static class DumpLogCallback implements StructuredLogger.LoggerCallback { - public void call(String output) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.INFO, output); - } - } - - - public FennecMochitestAssert() { - mLogger = new StructuredLogger("robocop", new DumpLogCallback()); - } - - /** Set the filename used for dumpLog. */ - public void setLogFile(String filename) { - FennecNativeDriver.setLogFile(filename); - - String message; - if (!mLogStarted) { - mLogger.info("SimpleTest START"); - mLogStarted = true; - } - - if (mLogTestName != "") { - long diff = SystemClock.uptimeMillis() - mStartTime; - mLogger.testEnd(mLogTestName, "OK", "finished in " + diff + "ms"); - } - } - - public void setTestName(String testName) { - String[] nameParts = testName.split("\\."); - mLogTestName = nameParts[nameParts.length - 1]; - mStartTime = SystemClock.uptimeMillis(); - - mLogger.testStart(mLogTestName); - } - - class testInfo { - public boolean mResult; - public String mName; - public String mDiag; - public boolean mTodo; - public boolean mInfo; - public testInfo(boolean r, String n, String d, boolean t, boolean i) { - mResult = r; - mName = n; - mDiag = d; - mTodo = t; - mInfo = i; - } - - } - - /** Used to log a subtest's result. - * test represents the subtest (an assertion). - * passStatus and passExpected are the actual status and the expected status if the assertion is true. - * failStatus and failExpected are the actual status and the expected status otherwise. - */ - private void _logMochitestResult(testInfo test, String passStatus, String passExpected, String failStatus, String failExpected) { - boolean isError = true; - if (test.mResult || test.mTodo) { - isError = false; - } - if (test.mResult) - { - mLogger.testStatus(mLogTestName, test.mName, passStatus, passExpected, test.mDiag); - } else { - mLogger.testStatus(mLogTestName, test.mName, failStatus, failExpected, test.mDiag); - } - - if (test.mInfo) { - // do not count TEST-INFO messages - } else if (test.mTodo) { - mTodo++; - } else if (isError) { - mFailed++; - } else { - mPassed++; - } - if (isError) { - String message = "TEST-UNEXPECTED-" + failStatus + " | " + mLogTestName + " | " - + test.mName + " - " + test.mDiag; - junit.framework.Assert.fail(message); - } - } - - public void endTest() { - String message; - - if (mLogTestName != "") { - long diff = SystemClock.uptimeMillis() - mStartTime; - mLogger.testEnd(mLogTestName, "OK", "finished in " + diff + "ms"); - } - - mLogger.info("TEST-START | Shutdown"); - mLogger.info("Passed: " + Integer.toString(mPassed)); - mLogger.info("Failed: " + Integer.toString(mFailed)); - mLogger.info("Todo: " + Integer.toString(mTodo)); - mLogger.info("SimpleTest FINISHED"); - } - - public void ok(boolean condition, String name, String diag) { - testInfo test = new testInfo(condition, name, diag, false, false); - _logMochitestResult(test, "PASS", "PASS", "FAIL", "PASS"); - } - - public void is(Object actual, Object expected, String name) { - boolean pass = checkObjectsEqual(actual, expected); - ok(pass, name, getEqualString(actual, expected, pass)); - } - - public void isnot(Object actual, Object notExpected, String name) { - boolean pass = checkObjectsNotEqual(actual, notExpected); - ok(pass, name, getNotEqualString(actual, notExpected, pass)); - } - - public void ispixel(int actual, int r, int g, int b, String name) { - int aAlpha = ((actual >> 24) & 0xFF); - int aR = ((actual >> 16) & 0xFF); - int aG = ((actual >> 8) & 0xFF); - int aB = (actual & 0xFF); - boolean pass = checkPixel(actual, r, g, b); - ok(pass, name, "Color rgba(" + aR + "," + aG + "," + aB + "," + aAlpha + ")" + (pass ? " " : " not") + " close enough to expected rgb(" + r + "," + g + "," + b + ")"); - } - - public void isnotpixel(int actual, int r, int g, int b, String name) { - int aAlpha = ((actual >> 24) & 0xFF); - int aR = ((actual >> 16) & 0xFF); - int aG = ((actual >> 8) & 0xFF); - int aB = (actual & 0xFF); - boolean pass = checkPixel(actual, r, g, b); - ok(!pass, name, "Color rgba(" + aR + "," + aG + "," + aB + "," + aAlpha + ")" + (!pass ? " is" : " is not") + " different enough from rgb(" + r + "," + g + "," + b + ")"); - } - - private boolean checkPixel(int actual, int r, int g, int b) { - // When we read GL pixels the GPU has already processed them and they - // are usually off by a little bit. For example a CSS-color pixel of color #64FFF5 - // was turned into #63FFF7 when it came out of glReadPixels. So in order to compare - // against the expected value, we use a little fuzz factor. For the alpha we just - // make sure it is always 0xFF. There is also bug 691354 which crops up every so - // often just to make our lives difficult. However the individual color components - // should never be off by more than 8. - int aAlpha = ((actual >> 24) & 0xFF); - int aR = ((actual >> 16) & 0xFF); - int aG = ((actual >> 8) & 0xFF); - int aB = (actual & 0xFF); - boolean pass = (aAlpha == 0xFF) /* alpha */ - && (Math.abs(aR - r) <= 8) /* red */ - && (Math.abs(aG - g) <= 8) /* green */ - && (Math.abs(aB - b) <= 8); /* blue */ - if (pass) { - return true; - } else { - return false; - } - } - - public void todo(boolean condition, String name, String diag) { - testInfo test = new testInfo(condition, name, diag, true, false); - _logMochitestResult(test, "PASS", "FAIL", "FAIL", "FAIL"); - } - - public void todo_is(Object actual, Object expected, String name) { - boolean pass = checkObjectsEqual(actual, expected); - todo(pass, name, getEqualString(actual, expected, pass)); - } - - public void todo_isnot(Object actual, Object notExpected, String name) { - boolean pass = checkObjectsNotEqual(actual, notExpected); - todo(pass, name, getNotEqualString(actual, notExpected, pass)); - } - - private boolean checkObjectsEqual(Object a, Object b) { - if (a == null || b == null) { - if (a == null && b == null) { - return true; - } - return false; - } else { - return a.equals(b); - } - } - - private String getEqualString(Object a, Object b, boolean pass) { - if (pass) { - return a + " should equal " + b; - } - return "got " + a + ", expected " + b; - } - - private boolean checkObjectsNotEqual(Object a, Object b) { - if (a == null || b == null) { - if ((a == null && b != null) || (a != null && b == null)) { - return true; - } else { - return false; - } - } else { - return !a.equals(b); - } - } - - private String getNotEqualString(Object a, Object b, boolean pass) { - if(pass) { - return a + " should not equal " + b; - } - return "didn't expect " + a + ", but got it"; - } - - public void info(String name, String message) { - mLogger.info(name + " | " + message); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeActions.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeActions.java deleted file mode 100644 index 7faccdf43..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeActions.java +++ /dev/null @@ -1,482 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import java.util.ArrayList; -import java.util.concurrent.BlockingQueue; -import java.util.concurrent.LinkedBlockingQueue; -import java.util.concurrent.TimeUnit; - -import org.json.JSONObject; -import org.mozilla.gecko.FennecNativeDriver.LogLevel; -import org.mozilla.gecko.gfx.LayerView; -import org.mozilla.gecko.gfx.LayerView.DrawListener; -import org.mozilla.gecko.mozglue.GeckoLoader; -import org.mozilla.gecko.sqlite.SQLiteBridge; -import org.mozilla.gecko.util.GeckoEventListener; - -import android.app.Activity; -import android.app.Instrumentation; -import android.database.Cursor; -import android.os.SystemClock; -import android.text.TextUtils; -import android.view.KeyEvent; - -import com.robotium.solo.Solo; - -public class FennecNativeActions implements Actions { - private static final String LOGTAG = "FennecNativeActions"; - - private Solo mSolo; - private Instrumentation mInstr; - private Assert mAsserter; - - public FennecNativeActions(Activity activity, Solo robocop, Instrumentation instrumentation, Assert asserter) { - mSolo = robocop; - mInstr = instrumentation; - mAsserter = asserter; - - GeckoLoader.loadSQLiteLibs(activity, activity.getApplication().getPackageResourcePath()); - } - - class GeckoEventExpecter implements RepeatedEventExpecter { - private static final int MAX_WAIT_MS = 180000; - - private volatile boolean mIsRegistered; - - private final String mGeckoEvent; - private final GeckoEventListener mListener; - - private volatile boolean mEventEverReceived; - private String mEventData; - private BlockingQueue mEventDataQueue; - - GeckoEventExpecter(final String geckoEvent) { - if (TextUtils.isEmpty(geckoEvent)) { - throw new IllegalArgumentException("geckoEvent must not be empty"); - } - - mGeckoEvent = geckoEvent; - mEventDataQueue = new LinkedBlockingQueue(); - - final GeckoEventExpecter expecter = this; - mListener = new GeckoEventListener() { - @Override - public void handleMessage(final String event, final JSONObject message) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG, - "handleMessage called for: " + event + "; expecting: " + mGeckoEvent); - mAsserter.is(event, mGeckoEvent, "Given message occurred for registered event: " + message); - - expecter.notifyOfEvent(message); - } - }; - - EventDispatcher.getInstance().registerGeckoThreadListener(mListener, mGeckoEvent); - mIsRegistered = true; - } - - public void blockForEvent() { - blockForEvent(MAX_WAIT_MS, true); - } - - public void blockForEvent(long millis, boolean failOnTimeout) { - if (!mIsRegistered) { - throw new IllegalStateException("listener not registered"); - } - - try { - mEventData = mEventDataQueue.poll(millis, TimeUnit.MILLISECONDS); - } catch (InterruptedException ie) { - FennecNativeDriver.log(LogLevel.ERROR, ie); - } - if (mEventData == null) { - if (failOnTimeout) { - FennecNativeDriver.logAllStackTraces(FennecNativeDriver.LogLevel.ERROR); - mAsserter.ok(false, "GeckoEventExpecter", - "blockForEvent timeout: "+mGeckoEvent); - } else { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG, - "blockForEvent timeout: "+mGeckoEvent); - } - } else { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG, - "unblocked on expecter for " + mGeckoEvent); - } - } - - public void blockUntilClear(long millis) { - if (!mIsRegistered) { - throw new IllegalStateException("listener not registered"); - } - if (millis <= 0) { - throw new IllegalArgumentException("millis must be > 0"); - } - - // wait for at least one event - try { - mEventData = mEventDataQueue.poll(MAX_WAIT_MS, TimeUnit.MILLISECONDS); - } catch (InterruptedException ie) { - FennecNativeDriver.log(LogLevel.ERROR, ie); - } - if (mEventData == null) { - FennecNativeDriver.logAllStackTraces(FennecNativeDriver.LogLevel.ERROR); - mAsserter.ok(false, "GeckoEventExpecter", "blockUntilClear timeout"); - return; - } - // now wait for a period of millis where we don't get an event - while (true) { - try { - mEventData = mEventDataQueue.poll(millis, TimeUnit.MILLISECONDS); - } catch (InterruptedException ie) { - FennecNativeDriver.log(LogLevel.INFO, ie); - } - if (mEventData == null) { - // success - break; - } - } - FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG, - "unblocked on expecter for " + mGeckoEvent); - } - - public String blockForEventData() { - blockForEvent(); - return mEventData; - } - - public String blockForEventDataWithTimeout(long millis) { - blockForEvent(millis, false); - return mEventData; - } - - public void unregisterListener() { - if (!mIsRegistered) { - throw new IllegalStateException("listener not registered"); - } - - FennecNativeDriver.log(LogLevel.INFO, - "EventExpecter: no longer listening for " + mGeckoEvent); - - EventDispatcher.getInstance().unregisterGeckoThreadListener(mListener, mGeckoEvent); - mIsRegistered = false; - } - - public boolean eventReceived() { - return mEventEverReceived; - } - - void notifyOfEvent(final JSONObject message) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG, - "received event " + mGeckoEvent); - - mEventEverReceived = true; - - try { - mEventDataQueue.put(message.toString()); - } catch (InterruptedException e) { - FennecNativeDriver.log(LogLevel.ERROR, - "EventExpecter dropped event: " + message.toString(), e); - } - } - } - - public RepeatedEventExpecter expectGeckoEvent(final String geckoEvent) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG, "waiting for " + geckoEvent); - return new GeckoEventExpecter(geckoEvent); - } - - public void sendGeckoEvent(final String geckoEvent, final String data) { - GeckoAppShell.notifyObservers(geckoEvent, data); - } - - public static final class PrefProxy implements PrefsHelper.PrefHandler, PrefWaiter { - public static final int MAX_WAIT_MS = 180000; - - /* package */ final PrefHandlerBase target; - private final String[] expectedPrefs; - private final ArrayList seenPrefs = new ArrayList<>(); - private boolean finished = false; - - /* package */ PrefProxy(PrefHandlerBase target, String[] expectedPrefs, Assert asserter) { - this.target = target; - this.expectedPrefs = expectedPrefs; - target.asserter = asserter; - } - - @Override // PrefsHelper.PrefHandler - public void prefValue(String pref, boolean value) { - target.prefValue(pref, value); - seenPrefs.add(pref); - } - - @Override // PrefsHelper.PrefHandler - public void prefValue(String pref, int value) { - target.prefValue(pref, value); - seenPrefs.add(pref); - } - - @Override // PrefsHelper.PrefHandler - public void prefValue(String pref, String value) { - target.prefValue(pref, value); - seenPrefs.add(pref); - } - - @Override // PrefsHelper.PrefHandler - public synchronized void finish() { - target.finish(); - - for (String pref : expectedPrefs) { - target.asserter.ok(seenPrefs.remove(pref), "Checking pref was seen", pref); - } - target.asserter.ok(seenPrefs.isEmpty(), "Checking unexpected prefs", - TextUtils.join(", ", seenPrefs)); - - finished = true; - this.notifyAll(); - } - - @Override // PrefWaiter - public synchronized boolean isFinished() { - return finished; - } - - @Override // PrefWaiter - public void waitForFinish() { - waitForFinish(MAX_WAIT_MS, /* failOnTimeout */ true); - } - - @Override // PrefWaiter - public synchronized void waitForFinish(long timeoutMillis, boolean failOnTimeout) { - final long startTime = System.nanoTime(); - while (!finished) { - if (System.nanoTime() - startTime - >= timeoutMillis * 1e6 /* ns per ms */) { - final String prefsLog = "expected " + - TextUtils.join(", ", expectedPrefs) + "; got " + - TextUtils.join(", ", seenPrefs.toArray()) + "."; - if (failOnTimeout) { - FennecNativeDriver.logAllStackTraces(FennecNativeDriver.LogLevel.ERROR); - target.asserter.ok(false, "Timeout waiting for pref", prefsLog); - } else { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG, - "Pref timeout (" + prefsLog + ")"); - } - break; - } - try { - this.wait(1000); // Wait for 1 second at a time. - } catch (final InterruptedException e) { - // Attempt waiting again. - } - } - finished = false; - } - } - - @Override // Actions - public PrefWaiter getPrefs(String[] prefNames, PrefHandlerBase handler) { - final PrefProxy proxy = new PrefProxy(handler, prefNames, mAsserter); - PrefsHelper.getPrefs(prefNames, proxy); - return proxy; - } - - @Override // Actions - public void setPref(String pref, Object value, boolean flush) { - PrefsHelper.setPref(pref, value, flush); - } - - @Override // Actions - public PrefWaiter addPrefsObserver(String[] prefNames, PrefHandlerBase handler) { - final PrefProxy proxy = new PrefProxy(handler, prefNames, mAsserter); - PrefsHelper.addObserver(prefNames, proxy); - return proxy; - } - - @Override // Actions - public void removePrefsObserver(PrefWaiter proxy) { - PrefsHelper.removeObserver((PrefProxy) proxy); - } - - class PaintExpecter implements RepeatedEventExpecter { - private static final int MAX_WAIT_MS = 90000; - - private boolean mPaintDone; - private boolean mListening; - - private final LayerView mLayerView; - private final DrawListener mDrawListener; - - PaintExpecter() { - final PaintExpecter expecter = this; - mLayerView = GeckoAppShell.getLayerView(); - mDrawListener = new DrawListener() { - @Override - public void drawFinished() { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG, - "Received drawFinished notification"); - expecter.notifyOfEvent(); - } - }; - mLayerView.addDrawListener(mDrawListener); - mListening = true; - } - - private synchronized void notifyOfEvent() { - mPaintDone = true; - this.notifyAll(); - } - - public synchronized void blockForEvent(long millis, boolean failOnTimeout) { - if (!mListening) { - throw new IllegalStateException("draw listener not registered"); - } - long startTime = SystemClock.uptimeMillis(); - long endTime = 0; - while (!mPaintDone) { - try { - this.wait(millis); - } catch (InterruptedException ie) { - FennecNativeDriver.log(LogLevel.ERROR, ie); - break; - } - endTime = SystemClock.uptimeMillis(); - if (!mPaintDone && (endTime - startTime >= millis)) { - if (failOnTimeout) { - FennecNativeDriver.logAllStackTraces(FennecNativeDriver.LogLevel.ERROR); - mAsserter.ok(false, "PaintExpecter", "blockForEvent timeout"); - } - return; - } - } - } - - public synchronized void blockForEvent() { - blockForEvent(MAX_WAIT_MS, true); - } - - public synchronized String blockForEventData() { - blockForEvent(); - return null; - } - - public synchronized String blockForEventDataWithTimeout(long millis) { - blockForEvent(millis, false); - return null; - } - - public synchronized boolean eventReceived() { - return mPaintDone; - } - - public synchronized void blockUntilClear(long millis) { - if (!mListening) { - throw new IllegalStateException("draw listener not registered"); - } - if (millis <= 0) { - throw new IllegalArgumentException("millis must be > 0"); - } - // wait for at least one event - long startTime = SystemClock.uptimeMillis(); - long endTime = 0; - while (!mPaintDone) { - try { - this.wait(MAX_WAIT_MS); - } catch (InterruptedException ie) { - FennecNativeDriver.log(LogLevel.ERROR, ie); - break; - } - endTime = SystemClock.uptimeMillis(); - if (!mPaintDone && (endTime - startTime >= MAX_WAIT_MS)) { - FennecNativeDriver.logAllStackTraces(FennecNativeDriver.LogLevel.ERROR); - mAsserter.ok(false, "PaintExpecter", "blockUtilClear timeout"); - return; - } - } - // now wait for a period of millis where we don't get an event - startTime = SystemClock.uptimeMillis(); - while (true) { - try { - this.wait(millis); - } catch (InterruptedException ie) { - FennecNativeDriver.log(LogLevel.ERROR, ie); - break; - } - endTime = SystemClock.uptimeMillis(); - if (endTime - startTime >= millis) { - // success - break; - } - - // we got a notify() before we could wait long enough, so we need to start over - // Note, moving the goal post might have us race against a "drawFinished" flood - startTime = endTime; - } - } - - public synchronized void unregisterListener() { - if (!mListening) { - throw new IllegalStateException("listener not registered"); - } - - FennecNativeDriver.log(LogLevel.INFO, - "PaintExpecter: no longer listening for events"); - mLayerView.removeDrawListener(mDrawListener); - mListening = false; - } - } - - public RepeatedEventExpecter expectPaint() { - return new PaintExpecter(); - } - - public void sendSpecialKey(SpecialKey button) { - switch(button) { - case DOWN: - sendKeyCode(Solo.DOWN); - break; - case UP: - sendKeyCode(Solo.UP); - break; - case LEFT: - sendKeyCode(Solo.LEFT); - break; - case RIGHT: - sendKeyCode(Solo.RIGHT); - break; - case ENTER: - sendKeyCode(Solo.ENTER); - break; - case MENU: - sendKeyCode(Solo.MENU); - break; - case DELETE: - sendKeyCode(Solo.DELETE); - break; - default: - mAsserter.ok(false, "sendSpecialKey", "Unknown SpecialKey " + button); - break; - } - } - - public void sendKeyCode(int keyCode) { - if (keyCode <= 0 || keyCode > KeyEvent.getMaxKeyCode()) { - mAsserter.ok(false, "sendKeyCode", "Unknown keyCode " + keyCode); - } - mSolo.sendKey(keyCode); - } - - @Override - public void sendKeys(String input) { - mInstr.sendStringSync(input); - } - - public void drag(int startingX, int endingX, int startingY, int endingY) { - mSolo.drag(startingX, endingX, startingY, endingY, 10); - } - - public Cursor querySql(final String dbPath, final String sql) { - return new SQLiteBridge(dbPath).rawQuery(sql, null); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeDriver.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeDriver.java deleted file mode 100644 index 3931b7e20..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeDriver.java +++ /dev/null @@ -1,392 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import java.io.BufferedOutputStream; -import java.io.BufferedReader; -import java.io.DataOutputStream; -import java.io.File; -import java.io.FileOutputStream; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.io.PrintWriter; -import java.nio.IntBuffer; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.json.JSONException; -import org.json.JSONObject; -import org.mozilla.gecko.gfx.LayerView; -import org.mozilla.gecko.gfx.PanningPerfAPI; -import org.mozilla.gecko.util.GeckoEventListener; - -import android.app.Activity; -import android.util.Log; -import android.view.View; - -import com.robotium.solo.Solo; - -public class FennecNativeDriver implements Driver { - private static final int FRAME_TIME_THRESHOLD = 25; // allow 25ms per frame (40fps) - - private final Activity mActivity; - private final Solo mSolo; - private final String mRootPath; - - private static String mLogFile; - private static LogLevel mLogLevel = LogLevel.INFO; - - public enum LogLevel { - DEBUG(1), - INFO(2), - WARN(3), - ERROR(4); - - private final int mValue; - LogLevel(int value) { - mValue = value; - } - public boolean isEnabled(LogLevel configuredLevel) { - return mValue >= configuredLevel.getValue(); - } - private int getValue() { - return mValue; - } - } - - public FennecNativeDriver(Activity activity, Solo robocop, String rootPath) { - mActivity = activity; - mSolo = robocop; - mRootPath = rootPath; - } - - //Information on the location of the Gecko Frame. - private boolean mGeckoInfo = false; - private int mGeckoTop = 100; - private int mGeckoLeft = 0; - private int mGeckoHeight= 700; - private int mGeckoWidth = 1024; - - private void getGeckoInfo() { - View geckoLayout = mActivity.findViewById(R.id.gecko_layout); - if (geckoLayout != null) { - int[] pos = new int[2]; - geckoLayout.getLocationOnScreen(pos); - mGeckoTop = pos[1]; - mGeckoLeft = pos[0]; - mGeckoWidth = geckoLayout.getWidth(); - mGeckoHeight = geckoLayout.getHeight(); - mGeckoInfo = true; - } else { - throw new RoboCopException("Unable to find view gecko_layout"); - } - } - - @Override - public int getGeckoTop() { - if (!mGeckoInfo) { - getGeckoInfo(); - } - return mGeckoTop; - } - - @Override - public int getGeckoLeft() { - if (!mGeckoInfo) { - getGeckoInfo(); - } - return mGeckoLeft; - } - - @Override - public int getGeckoHeight() { - if (!mGeckoInfo) { - getGeckoInfo(); - } - return mGeckoHeight; - } - - @Override - public int getGeckoWidth() { - if (!mGeckoInfo) { - getGeckoInfo(); - } - return mGeckoWidth; - } - - /** Find the element with given id. - * - * @return An Element representing the view, or null if the view is not found. - */ - @Override - public Element findElement(Activity activity, int id) { - return new FennecNativeElement(id, activity); - } - - @Override - public void startFrameRecording() { - PanningPerfAPI.startFrameTimeRecording(); - } - - @Override - public int stopFrameRecording() { - final List frames = PanningPerfAPI.stopFrameTimeRecording(); - int badness = 0; - for (int i = 1; i < frames.size(); i++) { - long frameTime = frames.get(i) - frames.get(i - 1); - int delay = (int)(frameTime - FRAME_TIME_THRESHOLD); - // for each frame we miss, add the square of the delay. This - // makes large delays much worse than small delays. - if (delay > 0) { - badness += delay * delay; - } - } - - // Don't do any averaging of the numbers because really we want to - // know how bad the jank was at its worst - return badness; - } - - @Override - public void startCheckerboardRecording() { - PanningPerfAPI.startCheckerboardRecording(); - } - - @Override - public float stopCheckerboardRecording() { - final List checkerboard = PanningPerfAPI.stopCheckerboardRecording(); - float total = 0; - for (float val : checkerboard) { - total += val; - } - return total * 100.0f; - } - - private LayerView getSurfaceView() { - final LayerView layerView = mSolo.getView(LayerView.class, 0); - - if (layerView == null) { - log(LogLevel.WARN, "getSurfaceView could not find LayerView"); - for (final View v : mSolo.getViews()) { - log(LogLevel.WARN, " View: " + v); - } - } - return layerView; - } - - @Override - public PaintedSurface getPaintedSurface() { - final LayerView view = getSurfaceView(); - if (view == null) { - return null; - } - - final IntBuffer pixelBuffer = view.getPixels(); - - // now we need to (1) flip the image, because GL likes to do things up-side-down, - // and (2) rearrange the bits from AGBR-8888 to ARGB-8888. - int w = view.getWidth(); - int h = view.getHeight(); - pixelBuffer.position(0); - String mapFile = mRootPath + "/pixels.map"; - - FileOutputStream fos = null; - BufferedOutputStream bos = null; - DataOutputStream dos = null; - try { - fos = new FileOutputStream(mapFile); - bos = new BufferedOutputStream(fos); - dos = new DataOutputStream(bos); - - for (int y = h - 1; y >= 0; y--) { - for (int x = 0; x < w; x++) { - int agbr = pixelBuffer.get(); - dos.writeInt((agbr & 0xFF00FF00) | ((agbr >> 16) & 0x000000FF) | ((agbr << 16) & 0x00FF0000)); - } - } - } catch (IOException e) { - throw new RoboCopException("exception with pixel writer on file: " + mapFile); - } finally { - try { - if (dos != null) { - dos.flush(); - dos.close(); - } - // closing dos automatically closes bos - if (fos != null) { - fos.flush(); - fos.close(); - } - } catch (IOException e) { - log(LogLevel.ERROR, e); - throw new RoboCopException("exception closing pixel writer on file: " + mapFile); - } - } - return new PaintedSurface(mapFile, w, h); - } - - public int mHeight=0; - public int mScrollHeight=0; - public int mPageHeight=10; - - @Override - public int getScrollHeight() { - return mScrollHeight; - } - @Override - public int getPageHeight() { - return mPageHeight; - } - @Override - public int getHeight() { - return mHeight; - } - - @Override - public void setupScrollHandling() { - GeckoApp.getEventDispatcher().registerGeckoThreadListener(new GeckoEventListener() { - @Override - public void handleMessage(final String event, final JSONObject message) { - try { - mScrollHeight = message.getInt("y"); - mHeight = message.getInt("cheight"); - // We don't want a height of 0. That means it's a bad response. - if (mHeight > 0) { - mPageHeight = message.getInt("height"); - } - } catch (JSONException e) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.WARN, - "WARNING: ScrollReceived, but message does not contain " + - "expected fields: " + e); - } - } - }, "robocop:scroll"); - } - - /** - * Takes a filename, loads the file, and returns a string version of the entire file. - */ - public static String getFile(String filename) - { - StringBuilder text = new StringBuilder(); - - BufferedReader br = null; - try { - br = new BufferedReader(new FileReader(filename)); - String line; - - while ((line = br.readLine()) != null) { - text.append(line); - text.append('\n'); - } - } catch (IOException e) { - log(LogLevel.ERROR, e); - } finally { - try { - if (br != null) { - br.close(); - } - } catch (IOException e) { - } - } - return text.toString(); - } - - /** - * Takes a string of "key=value" pairs split by \n and creates a hash table. - */ - public static Map convertTextToTable(String data) - { - HashMap retVal = new HashMap(); - - String[] lines = data.split("\n"); - for (int i = 0; i < lines.length; i++) { - String[] parts = lines[i].split("=", 2); - retVal.put(parts[0].trim(), parts[1].trim()); - } - return retVal; - } - - public static void logAllStackTraces(LogLevel level) { - StringBuffer sb = new StringBuffer(); - sb.append("Dumping ALL the threads!\n"); - Map allStacks = Thread.getAllStackTraces(); - for (Thread t : allStacks.keySet()) { - sb.append(t.toString()).append('\n'); - for (StackTraceElement ste : allStacks.get(t)) { - sb.append(ste.toString()).append('\n'); - } - sb.append('\n'); - } - log(level, sb.toString()); - } - - /** - * Set the filename used for logging. If the file already exists, delete it - * as a safe-guard against accidentally appending to an old log file. - */ - public static void setLogFile(String filename) { - mLogFile = filename; - File file = new File(mLogFile); - if (file.exists()) { - file.delete(); - } - } - - public static void setLogLevel(LogLevel level) { - mLogLevel = level; - } - - public static void log(LogLevel level, String message) { - log(level, message, null); - } - - public static void log(LogLevel level, Throwable t) { - log(level, null, t); - } - - public static void log(LogLevel level, String message, Throwable t) { - if (mLogFile == null) { - throw new RuntimeException("No log file specified!"); - } - - if (level.isEnabled(mLogLevel)) { - PrintWriter pw = null; - try { - pw = new PrintWriter(new FileWriter(mLogFile, true)); - if (message != null) { - pw.println(message); - } - if (t != null) { - t.printStackTrace(pw); - } - } catch (IOException ioe) { - Log.e("Robocop", "exception with file writer on: " + mLogFile); - } finally { - if (pw != null) { - pw.close(); - } - } - - // PrintWriter doesn't throw IOE but sets an error flag instead, - // so check for that - if (pw != null && pw.checkError()) { - Log.e("Robocop", "exception with file writer on: " + mLogFile); - } - } - - if (level == LogLevel.INFO) { - Log.i("Robocop", message, t); - } else if (level == LogLevel.DEBUG) { - Log.d("Robocop", message, t); - } else if (level == LogLevel.WARN) { - Log.w("Robocop", message, t); - } else if (level == LogLevel.ERROR) { - Log.e("Robocop", message, t); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeElement.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeElement.java deleted file mode 100644 index 2a24344fd..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecNativeElement.java +++ /dev/null @@ -1,116 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import android.app.Activity; -import android.view.View; -import android.view.ViewGroup; -import android.widget.EditText; -import android.widget.TextSwitcher; -import android.widget.TextView; - -public class FennecNativeElement implements Element { - private final Activity mActivity; - private final Integer mId; - private final String mName; - - public FennecNativeElement(Integer id, Activity activity) { - mId = id; - mActivity = activity; - mName = activity.getResources().getResourceName(id); - } - - @Override - public Integer getId() { - return mId; - } - - private boolean mClickSuccess; - - @Override - public boolean click() { - mClickSuccess = false; - RobocopUtils.runOnUiThreadSync(mActivity, - new Runnable() { - @Override - public void run() { - View view = mActivity.findViewById(mId); - if (view != null) { - if (view.performClick()) { - mClickSuccess = true; - } else { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.WARN, - "Robocop called click on an element with no listener " + mId + " " + mName); - } - } else { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.ERROR, - "click: unable to find view " + mId + " " + mName); - } - } - }); - return mClickSuccess; - } - - private Object mText; - - @Override - public String getText() { - mText = null; - RobocopUtils.runOnUiThreadSync(mActivity, - new Runnable() { - @Override - public void run() { - View v = mActivity.findViewById(mId); - if (v instanceof EditText) { - EditText et = (EditText)v; - mText = et.getEditableText(); - } else if (v instanceof TextSwitcher) { - TextSwitcher ts = (TextSwitcher)v; - mText = ((TextView)ts.getCurrentView()).getText(); - } else if (v instanceof ViewGroup) { - ViewGroup vg = (ViewGroup)v; - for (int i = 0; i < vg.getChildCount(); i++) { - if (vg.getChildAt(i) instanceof TextView) { - mText = ((TextView)vg.getChildAt(i)).getText(); - } - } - } else if (v instanceof TextView) { - mText = ((TextView)v).getText(); - } else if (v == null) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.ERROR, - "getText: unable to find view " + mId + " " + mName); - } else { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.ERROR, - "getText: unhandled type for view " + mId + " " + mName); - } - } // end of run() method definition - } // end of anonymous Runnable object instantiation - ); - if (mText == null) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.WARN, - "getText: Text is null for view " + mId + " " + mName); - return null; - } - return mText.toString(); - } - - private boolean mDisplayed; - - @Override - public boolean isDisplayed() { - mDisplayed = false; - RobocopUtils.runOnUiThreadSync(mActivity, - new Runnable() { - @Override - public void run() { - View view = mActivity.findViewById(mId); - if (view != null) { - mDisplayed = true; - } - } - }); - return mDisplayed; - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecTalosAssert.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecTalosAssert.java deleted file mode 100644 index 862f66777..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/FennecTalosAssert.java +++ /dev/null @@ -1,74 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - - -public class FennecTalosAssert implements Assert { - - public FennecTalosAssert() { } - - /** - * Write information to a logfile and logcat - */ - public void dumpLog(String message) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.INFO, message); - } - - /** Write information to a logfile and logcat */ - public void dumpLog(String message, Throwable t) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.INFO, message, t); - } - - /** - * Set the filename used for dumpLog. - */ - public void setLogFile(String filename) { - FennecNativeDriver.setLogFile(filename); - } - - public void setTestName(String testName) { } - - public void endTest() { } - - public void ok(boolean condition, String name, String diag) { - if (!condition) { - dumpLog("__FAIL" + name + ": " + diag + "__FAIL"); - } - } - - public void is(Object actual, Object expected, String name) { - boolean pass = (actual == null ? expected == null : actual.equals(expected)); - ok(pass, name, "got " + actual + ", expected " + expected); - } - - public void isnot(Object actual, Object notExpected, String name) { - boolean fail = (actual == null ? notExpected == null : actual.equals(notExpected)); - ok(!fail, name, "got " + actual + ", expected not " + notExpected); - } - - public void ispixel(int actual, int r, int g, int b, String name) { - throw new UnsupportedOperationException(); - } - - public void isnotpixel(int actual, int r, int g, int b, String name) { - throw new UnsupportedOperationException(); - } - - public void todo(boolean condition, String name, String diag) { - throw new UnsupportedOperationException(); - } - - public void todo_is(Object actual, Object expected, String name) { - throw new UnsupportedOperationException(); - } - - public void todo_isnot(Object actual, Object notExpected, String name) { - throw new UnsupportedOperationException(); - } - - public void info(String name, String message) { - dumpLog(name + ": " + message); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/LaunchFennecWithConfigurationActivity.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/LaunchFennecWithConfigurationActivity.java deleted file mode 100644 index 208b2c7bd..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/LaunchFennecWithConfigurationActivity.java +++ /dev/null @@ -1,40 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import java.util.Map; - -import org.mozilla.gecko.tests.BaseRobocopTest; - -import android.app.Activity; -import android.content.Intent; -import android.os.Bundle; - -/** - * An Activity that extracts Robocop settings from robotium.config, launches - * Fennec with the Robocop testing parameters, and finishes itself. - *

          - * This is intended to be used by local testers using |mach robocop --serve|. - */ -public class LaunchFennecWithConfigurationActivity extends Activity { - @Override - public void onCreate(Bundle arguments) { - super.onCreate(arguments); - } - - @Override - public void onResume() { - super.onResume(); - - final String configFile = FennecNativeDriver.getFile(BaseRobocopTest.DEFAULT_ROOT_PATH + "/robotium.config"); - final Map config = FennecNativeDriver.convertTextToTable(configFile); - final Intent intent = BaseRobocopTest.createActivityIntent(config); - - intent.setClassName(AppConstants.ANDROID_PACKAGE_NAME, AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS); - - this.finish(); - this.startActivity(intent); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/PaintedSurface.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/PaintedSurface.java deleted file mode 100644 index 17d77b758..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/PaintedSurface.java +++ /dev/null @@ -1,105 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; -import java.nio.MappedByteBuffer; -import java.nio.channels.FileChannel; - -import android.graphics.Bitmap; -import android.util.Base64; -import android.util.Base64OutputStream; - -public class PaintedSurface { - private String mFileName; - private int mWidth; - private int mHeight; - private FileInputStream mPixelFile; - private MappedByteBuffer mPixelBuffer; - - public PaintedSurface(String filename, int width, int height) { - mFileName = filename; - mWidth = width; - mHeight = height; - - try { - File f = new File(filename); - int pixelSize = (int)f.length(); - - mPixelFile = new FileInputStream(filename); - mPixelBuffer = mPixelFile.getChannel().map(FileChannel.MapMode.READ_ONLY, 0, pixelSize); - } catch (java.io.FileNotFoundException e) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.ERROR, e); - } catch (java.io.IOException e) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.ERROR, e); - } - } - - public final int getWidth() { - return mWidth; - } - - public final int getHeight() { - return mHeight; - } - - private int pixelAtIndex(int index) { - int b1 = mPixelBuffer.get(index) & 0xFF; - int b2 = mPixelBuffer.get(index + 1) & 0xFF; - int b3 = mPixelBuffer.get(index + 2) & 0xFF; - int b4 = mPixelBuffer.get(index + 3) & 0xFF; - int value = (b1 << 24) + (b2 << 16) + (b3 << 8) + (b4 << 0); - return value; - } - - public final int getPixelAt(int x, int y) { - if (mPixelBuffer == null) { - throw new RoboCopException("Trying to access PaintedSurface with no active PixelBuffer"); - } - - if (x >= mWidth || x < 0) { - throw new RoboCopException("Trying to access PaintedSurface with invalid x value"); - } - - if (y >= mHeight || y < 0) { - throw new RoboCopException("Trying to access PaintedSurface with invalid y value"); - } - - // The rows are reversed so row 0 is at the end and we start with the last row. - // This is why we do mHeight-y; - int index = (x + ((mHeight - y - 1) * mWidth)) * 4; - return pixelAtIndex(index); - } - - public final String asDataUri() { - try { - Bitmap bm = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.ARGB_8888); - for (int y = 0; y < mHeight; y++) { - for (int x = 0; x < mWidth; x++) { - int index = (x + ((mHeight - y - 1) * mWidth)) * 4; - bm.setPixel(x, y, pixelAtIndex(index)); - } - } - ByteArrayOutputStream out = new ByteArrayOutputStream(); - out.write("data:image/png;base64,".getBytes()); - Base64OutputStream b64 = new Base64OutputStream(out, Base64.NO_WRAP); - bm.compress(Bitmap.CompressFormat.PNG, 100, b64); - return new String(out.toByteArray()); - } catch (Exception e) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.ERROR, e); - throw new RoboCopException("Unable to convert surface to a PNG data:uri"); - } - } - - public void close() { - try { - mPixelFile.close(); - } catch (Exception e) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.DEBUG, e); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RoboCopException.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RoboCopException.java deleted file mode 100644 index 420df818d..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RoboCopException.java +++ /dev/null @@ -1,24 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -public class RoboCopException extends RuntimeException { - - public RoboCopException() { - super(); - } - - public RoboCopException(String message) { - super(message); - } - - public RoboCopException(Throwable cause) { - super(cause); - } - - public RoboCopException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopShare1.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopShare1.java deleted file mode 100644 index 80ab3396c..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopShare1.java +++ /dev/null @@ -1,17 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import android.os.Bundle; -import android.support.v4.app.FragmentActivity; - -public class RobocopShare1 extends FragmentActivity { - private static Bundle sArguments; - - @Override - public void onCreate(Bundle arguments) { - super.onCreate(arguments); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopShare2.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopShare2.java deleted file mode 100644 index 4874dffb7..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopShare2.java +++ /dev/null @@ -1,17 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import android.os.Bundle; -import android.support.v4.app.FragmentActivity; - -public class RobocopShare2 extends FragmentActivity { - private static Bundle sArguments; - - @Override - public void onCreate(Bundle arguments) { - super.onCreate(arguments); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopUtils.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopUtils.java deleted file mode 100644 index 7a33abfa6..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/RobocopUtils.java +++ /dev/null @@ -1,58 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import java.util.concurrent.atomic.AtomicBoolean; - -import android.app.Activity; - -public final class RobocopUtils { - private static final int MAX_WAIT_MS = 20000; - - private RobocopUtils() {} - - public static void runOnUiThreadSync(Activity activity, final Runnable runnable) { - final AtomicBoolean sentinel = new AtomicBoolean(false); - - // On the UI thread, run the Runnable, then set sentinel to true and wake this thread. - activity.runOnUiThread( - new Runnable() { - @Override - public void run() { - runnable.run(); - - synchronized (sentinel) { - sentinel.set(true); - sentinel.notifyAll(); - } - } - } - ); - - - // Suspend this thread, until the other thread completes its work or until a timeout is - // reached. - long startTimestamp = System.currentTimeMillis(); - - synchronized (sentinel) { - while (!sentinel.get()) { - try { - sentinel.wait(MAX_WAIT_MS); - } catch (InterruptedException e) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.ERROR, e); - } - - // Abort if we woke up due to timeout (instead of spuriously). - if (System.currentTimeMillis() - startTimestamp >= MAX_WAIT_MS) { - FennecNativeDriver.log(FennecNativeDriver.LogLevel.ERROR, - "time-out waiting for UI thread"); - FennecNativeDriver.logAllStackTraces(FennecNativeDriver.LogLevel.ERROR); - - return; - } - } - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/StructuredLogger.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/StructuredLogger.java deleted file mode 100644 index 87d5a3c25..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/StructuredLogger.java +++ /dev/null @@ -1,188 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko; - -import java.util.HashSet; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.json.JSONObject; - -// This implements the structured logging API described here: http://mozbase.readthedocs.org/en/latest/mozlog_structured.html -public class StructuredLogger { - private final static HashSet validTestStatus = new HashSet(Arrays.asList("PASS", "FAIL", "TIMEOUT", "NOTRUN", "ASSERT")); - private final static HashSet validTestEnd = new HashSet(Arrays.asList("PASS", "FAIL", "OK", "ERROR", "TIMEOUT", - "CRASH", "ASSERT", "SKIP")); - - private String mName; - private String mComponent; - private LoggerCallback mCallback; - - static public interface LoggerCallback { - public void call(String output); - } - - /* A default logger callback that prints the JSON output to stdout. - * This is not to be used in robocop as we write to a log file. */ - static class StandardLoggerCallback implements LoggerCallback { - public void call(String output) { - System.out.println(output); - } - } - - public StructuredLogger(String name, String component, LoggerCallback callback) { - mName = name; - mComponent = component; - mCallback = callback; - } - - public StructuredLogger(String name, String component) { - this(name, component, new StandardLoggerCallback()); - } - - public StructuredLogger(String name, LoggerCallback callback) { - this(name, null, callback); - } - - public StructuredLogger(String name) { - this(name, null, new StandardLoggerCallback()); - } - - public void suiteStart(List tests, Map runInfo) { - HashMap data = new HashMap(); - data.put("tests", tests); - if (runInfo != null) { - data.put("run_info", runInfo); - } - this.logData("suite_start", data); - } - - public void suiteStart(List tests) { - this.suiteStart(tests, null); - } - - public void suiteEnd() { - this.logData("suite_end"); - } - - public void testStart(String test) { - HashMap data = new HashMap(); - data.put("test", test); - this.logData("test_start", data); - } - - public void testStatus(String test, String subtest, String status, String expected, String message) { - status = status.toUpperCase(); - if (!StructuredLogger.validTestStatus.contains(status)) { - throw new IllegalArgumentException("Unrecognized status: " + status); - } - - HashMap data = new HashMap(); - data.put("test", test); - data.put("subtest", subtest); - data.put("status", status); - - if (message != null) { - data.put("message", message); - } - if (!expected.equals(status)) { - data.put("expected", expected); - } - - this.logData("test_status", data); - } - - public void testStatus(String test, String subtest, String status, String message) { - this.testStatus(test, subtest, status, "PASS", message); - } - - public void testEnd(String test, String status, String expected, String message, Map extra) { - status = status.toUpperCase(); - if (!StructuredLogger.validTestEnd.contains(status)) { - throw new IllegalArgumentException("Unrecognized status: " + status); - } - - HashMap data = new HashMap(); - data.put("test", test); - data.put("status", status); - - if (message != null) { - data.put("message", message); - } - if (extra != null) { - data.put("extra", extra); - } - if (!expected.equals(status) && !status.equals("SKIP")) { - data.put("expected", expected); - } - - this.logData("test_end", data); - } - - public void testEnd(String test, String status, String expected, String message) { - this.testEnd(test, status, expected, message, null); - } - - public void testEnd(String test, String status, String message) { - this.testEnd(test, status, "OK", message, null); - } - - - public void debug(String message) { - this.log("debug", message); - } - - public void info(String message) { - this.log("info", message); - } - - public void warning(String message) { - this.log("warning", message); - } - - public void error(String message) { - this.log("error", message); - } - - public void critical(String message) { - this.log("critical", message); - } - - private void log(String level, String message) { - HashMap data = new HashMap(); - data.put("message", message); - data.put("level", level); - this.logData("log", data); - } - - private HashMap makeLogData(String action, Map data) { - HashMap allData = new HashMap(); - allData.put("action", action); - allData.put("time", System.currentTimeMillis()); - allData.put("thread", JSONObject.NULL); - allData.put("pid", JSONObject.NULL); - allData.put("source", mName); - if (mComponent != null) { - allData.put("component", mComponent); - } - - allData.putAll(data); - - return allData; - } - - private void logData(String action, Map data) { - HashMap logData = this.makeLogData(action, data); - JSONObject jsonObject = new JSONObject(logData); - mCallback.call(jsonObject.toString()); - } - - private void logData(String action) { - this.logData(action, new HashMap()); - } - -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/AboutHomeTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/AboutHomeTest.java deleted file mode 100644 index cadb5df93..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/AboutHomeTest.java +++ /dev/null @@ -1,252 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.util.ArrayList; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.home.HomePager; - -import android.support.v4.view.ViewPager; -import android.support.v7.widget.RecyclerView; -import android.text.TextUtils; -import android.view.View; -import android.view.ViewGroup; -import android.widget.ListAdapter; -import android.widget.ListView; -import android.widget.TabWidget; -import android.widget.TextView; - -import com.robotium.solo.Condition; - -/** - * This class is an extension of BaseTest that helps with interaction with about:home - * This class contains methods that access the different tabs from about:home, methods that get information like history and bookmarks from the database, edit and remove bookmarks and history items - * The purpose of this class is to collect all the logically connected methods that deal with about:home - * To use any of these methods in your test make sure it extends AboutHomeTest instead of BaseTest - */ -abstract class AboutHomeTest extends PixelTest { - protected enum AboutHomeTabs { - RECENT_TABS, - HISTORY, - TOP_SITES, - BOOKMARKS, - }; - - private final ArrayList aboutHomeTabs = new ArrayList() {{ - add("TOP_SITES"); - add("BOOKMARKS"); - }}; - - - @Override - public void setUp() throws Exception { - super.setUp(); - - if (aboutHomeTabs.size() < 4) { - // Update it for tablets vs. phones. - if (mDevice.type.equals("phone")) { - aboutHomeTabs.add(0, AboutHomeTabs.HISTORY.toString()); - aboutHomeTabs.add(0, AboutHomeTabs.RECENT_TABS.toString()); - } else { - aboutHomeTabs.add(AboutHomeTabs.HISTORY.toString()); - aboutHomeTabs.add(AboutHomeTabs.RECENT_TABS.toString()); - } - } - } - - /** - * FIXME: Write new versions of these methods and update their consumers to use the new about:home pages. - */ - protected ListView getHistoryList(String waitText, int expectedChildCount) { - return null; - } - protected ListView getHistoryList(String waitText) { - return null; - } - - // Returns true if the bookmark is displayed in the bookmarks tab, false otherwise - does not check in folders - protected void isBookmarkDisplayed(final String url) { - boolean isCorrect = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - View bookmark = getDisplayedBookmark(url); - return bookmark != null; - } - }, MAX_WAIT_MS); - - mAsserter.ok(isCorrect, "Checking that " + url + " displayed as a bookmark", url + " displayed"); - } - - // Loads a bookmark by tapping on the bookmark view in the Bookmarks tab - protected void loadBookmark(String url) { - View bookmark = getDisplayedBookmark(url); - if (bookmark != null) { - Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded"); - mSolo.clickOnView(bookmark); - contentEventExpecter.blockForEvent(); - contentEventExpecter.unregisterListener(); - } else { - mAsserter.ok(false, url + " is not one of the displayed bookmarks", "Please make sure the url provided is bookmarked"); - } - } - - // Opens the bookmark context menu by long-tapping on it - protected void openBookmarkContextMenu(String url) { - View bookmark = getDisplayedBookmark(url); - if (bookmark != null) { - mSolo.waitForView(bookmark); - mSolo.clickLongOnView(bookmark, LONG_PRESS_TIME); - mSolo.waitForDialogToOpen(); - } else { - mAsserter.ok(false, url + " is not one of the displayed bookmarks", "Please make sure the url provided is bookmarked"); - } - } - - // @return the View associated with bookmark for the provided url or null if the link is not bookmarked - protected View getDisplayedBookmark(String url) { - openAboutHomeTab(AboutHomeTabs.BOOKMARKS); - mSolo.hideSoftKeyboard(); - getInstrumentation().waitForIdleSync(); - ListView bookmarksTabList = findListViewWithTag(HomePager.LIST_TAG_BOOKMARKS); - waitForNonEmptyListToLoad(bookmarksTabList); - ListAdapter adapter = bookmarksTabList.getAdapter(); - if (adapter != null) { - for (int i = 0; i < adapter.getCount(); i++ ) { - // I am unable to click the view taken with getView for some reason so getting the child at i - bookmarksTabList.smoothScrollToPosition(i); - View bookmarkView = bookmarksTabList.getChildAt(i); - if (bookmarkView instanceof android.widget.LinearLayout) { - ViewGroup bookmarkItemView = (ViewGroup) bookmarkView; - for (int j = 0 ; j < bookmarkItemView.getChildCount(); j++) { - View bookmarkContent = bookmarkItemView.getChildAt(j); - if (bookmarkContent instanceof android.widget.LinearLayout) { - ViewGroup bookmarkItemLayout = (ViewGroup) bookmarkContent; - for (int k = 0 ; k < bookmarkItemLayout.getChildCount(); k++) { - // Both the title and url are represented as text views so we can cast the view without any issues - TextView bookmarkTextContent = (TextView)bookmarkItemLayout.getChildAt(k); - if (url.equals(bookmarkTextContent.getText().toString())) { - return bookmarkView; - } - } - } - } - } - } - } - return null; - } - - /** - * Waits for the given ListView to have a non-empty adapter and be populated - * with a minimum number of items. - * - * This method will return false if the given ListView or its adapter is null, - * or if the ListView does not have the minimum number of items. - */ - protected boolean waitForListToLoad(final ListView listView, final int minSize) { - Condition listWaitCondition = new Condition() { - @Override - public boolean isSatisfied() { - if (listView == null) { - return false; - } - - final ListAdapter adapter = listView.getAdapter(); - if (adapter == null) { - return false; - } - - return (listView.getCount() - listView.getHeaderViewsCount() >= minSize); - } - }; - return waitForCondition(listWaitCondition, MAX_WAIT_MS); - } - - protected boolean waitForNonEmptyListToLoad(final ListView listView) { - return waitForListToLoad(listView, 1); - } - - /** - * Get an active ListView with the specified tag . - * - * This method uses the predefined tags in HomePager. - */ - protected final ListView findListViewWithTag(String tag) { - for (ListView listView : mSolo.getCurrentViews(ListView.class)) { - final String listTag = (String) listView.getTag(); - if (TextUtils.isEmpty(listTag)) { - continue; - } - - if (TextUtils.equals(listTag, tag)) { - return listView; - } - } - - return null; - } - - // A wait in order for the about:home tab to be rendered after drag/tab selection - private void waitForAboutHomeTab(final int tabIndex) { - boolean correctTab = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - ViewPager pager = mSolo.getView(ViewPager.class, 0); - return (pager.getCurrentItem() == tabIndex); - } - }, MAX_WAIT_MS); - mAsserter.ok(correctTab, "Checking that the correct tab is displayed", "The " + aboutHomeTabs.get(tabIndex) + " tab is displayed"); - } - - private void clickAboutHomeTab(AboutHomeTabs tab) { - mSolo.clickOnText(tab.toString().replace("_", " ")); - } - - /** - * Swipes to an about:home tab. - * @param swipeVector swipeVector Value and direction to swipe (go left for negative, right for positive). - */ - private void swipeAboutHome(int swipeVector) { - // Increase swipe width, which will especially impact tablets. - int swipeWidth = mDriver.getGeckoWidth() - 1; - int swipeHeight = mDriver.getGeckoHeight() / 2; - - if (swipeVector >= 0) { - // Emulate swipe motion from right to left. - for (int i = 0; i < swipeVector; i++) { - mActions.drag(swipeWidth, 0, swipeHeight, swipeHeight); - mSolo.sleep(100); - } - } else { - // Emulate swipe motion from left to right. - for (int i = 0; i > swipeVector; i--) { - mActions.drag(0, swipeWidth, swipeHeight, swipeHeight); - mSolo.sleep(100); - } - } - } - - /** - * This method can be used to open the different tabs of about:home. - */ - protected void openAboutHomeTab(AboutHomeTabs tab) { - focusUrlBar(); - ViewPager pager = mSolo.getView(ViewPager.class, 0); - final int currentTabIndex = pager.getCurrentItem(); - int tabOffset; - - // Handle tablets by just clicking the visible tab title. - if (mDevice.type.equals("tablet")) { - clickAboutHomeTab(tab); - return; - } - - // Handle phones (non-tablets). - tabOffset = aboutHomeTabs.indexOf(tab.toString()) - currentTabIndex; - swipeAboutHome(tabOffset); - waitForAboutHomeTab(aboutHomeTabs.indexOf(tab.toString())); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseRobocopTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseRobocopTest.java deleted file mode 100644 index 3033524e8..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseRobocopTest.java +++ /dev/null @@ -1,288 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.app.Activity; -import android.content.Context; -import android.content.Intent; -import android.os.PowerManager; -import android.test.ActivityInstrumentationTestCase2; -import android.text.TextUtils; -import android.util.Log; - -import com.robotium.solo.Solo; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.AppConstants; -import org.mozilla.gecko.Assert; -import org.mozilla.gecko.BrowserApp; -import org.mozilla.gecko.Driver; -import org.mozilla.gecko.FennecInstrumentationTestRunner; -import org.mozilla.gecko.FennecMochitestAssert; -import org.mozilla.gecko.FennecNativeActions; -import org.mozilla.gecko.FennecNativeDriver; -import org.mozilla.gecko.FennecTalosAssert; -import org.mozilla.gecko.GeckoAppShell; -import org.mozilla.gecko.GeckoProfile; -import org.mozilla.gecko.updater.UpdateServiceHelper; - -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.Map; - -@SuppressWarnings("unchecked") -public abstract class BaseRobocopTest extends ActivityInstrumentationTestCase2 { - public static final String LOGTAG = "BaseTest"; - - public enum Type { - MOCHITEST, - TALOS - } - - public static final String DEFAULT_ROOT_PATH = "/mnt/sdcard/tests"; - - // How long to wait for a Robocop:Quit message to actually kill Fennec. - private static final int ROBOCOP_QUIT_WAIT_MS = 180000; - - /** - * The Java Class instance that launches the browser. - *

          - * This should always agree with {@link AppConstants#MOZ_ANDROID_BROWSER_INTENT_CLASS}. - */ - public static final Class BROWSER_INTENT_CLASS; - - // Use reflection here so we don't have to preprocess this file. - static { - Class cl; - try { - cl = (Class) Class.forName(AppConstants.MOZ_ANDROID_BROWSER_INTENT_CLASS); - } catch (ClassNotFoundException e) { - // Oh well. - cl = Activity.class; - } - BROWSER_INTENT_CLASS = cl; - } - - protected Assert mAsserter; - protected String mLogFile; - - protected String mBaseHostnameUrl; - protected String mBaseIpUrl; - - protected Map mConfig; - protected String mRootPath; - - protected Solo mSolo; - protected Driver mDriver; - protected Actions mActions; - - protected String mProfile; - - protected StringHelper mStringHelper; - - /** - * The browser is started at the beginning of this test. A single test is a - * class inheriting from BaseRobocopTest that contains test - * methods. - *

          - * If a test should not start the browser at the beginning of a test, - * specify a different activity class to the one-argument constructor. To do - * as little as possible, specify Activity.class. - */ - public BaseRobocopTest() { - this((Class) BROWSER_INTENT_CLASS); - } - - /** - * Start the given activity class at the beginning of this test. - *

          - * You should use the no-argument constructor in almost all cases. - * - * @param activityClass to start before this test. - */ - protected BaseRobocopTest(Class activityClass) { - super(activityClass); - } - - /** - * Returns the test type: mochitest or talos. - *

          - * By default tests are mochitests, but a test can override this method in - * order to change its type. Most Robocop tests are mochitests. - */ - protected Type getTestType() { - return Type.MOCHITEST; - } - - // Member function to allow specialization. - protected Intent createActivityIntent() { - return BaseRobocopTest.createActivityIntent(mConfig); - } - - // Static function to allow re-use. - public static Intent createActivityIntent(Map config) { - final Intent intent = new Intent(Intent.ACTION_MAIN); - intent.putExtra("args", "-no-remote -profile " + config.get("profile")); - // Don't show the first run experience. - intent.putExtra(BrowserApp.EXTRA_SKIP_STARTPANE, true); - - final String envString = config.get("envvars"); - if (!TextUtils.isEmpty(envString)) { - final String[] envStrings = envString.split(","); - - for (int iter = 0; iter < envStrings.length; iter++) { - intent.putExtra("env" + iter, envStrings[iter]); - } - } - - return intent; - } - - @Override - protected void setUp() throws Exception { - // Disable the updater. - UpdateServiceHelper.setEnabled(false); - - // Load config file from root path (set up by Python script). - mRootPath = FennecInstrumentationTestRunner.getFennecArguments().getString("deviceroot"); - if (mRootPath == null) { - Log.w("Robocop", "Did not find deviceroot in arguments; falling back to: " + DEFAULT_ROOT_PATH); - mRootPath = DEFAULT_ROOT_PATH; - } - String configFile = FennecNativeDriver.getFile(mRootPath + "/robotium.config"); - mConfig = FennecNativeDriver.convertTextToTable(configFile); - mLogFile = mConfig.get("logfile"); - mProfile = mConfig.get("profile"); - mBaseHostnameUrl = mConfig.get("host").replaceAll("(/$)", ""); - mBaseIpUrl = mConfig.get("rawhost").replaceAll("(/$)", ""); - - // Initialize the asserter. - if (getTestType() == Type.TALOS) { - mAsserter = new FennecTalosAssert(); - } else { - mAsserter = new FennecMochitestAssert(); - } - mAsserter.setLogFile(mLogFile); - mAsserter.setTestName(getClass().getName()); - - // Start the activity. - final Intent intent = createActivityIntent(); - setActivityIntent(intent); - - // Set up Robotium.solo and Driver objects - Activity tempActivity = getActivity(); - - StringHelper.initialize(tempActivity.getResources()); - mStringHelper = StringHelper.get(); - - mSolo = new Solo(getInstrumentation(), tempActivity); - mDriver = new FennecNativeDriver(tempActivity, mSolo, mRootPath); - mActions = new FennecNativeActions(tempActivity, mSolo, getInstrumentation(), mAsserter); - } - - @Override - protected void runTest() throws Throwable { - try { - super.runTest(); - } catch (Throwable t) { - // save screenshot -- written to /mnt/sdcard/Robotium-Screenshots - // as .jpg - mSolo.takeScreenshot("robocop-screenshot-"+getClass().getName()); - if (mAsserter != null) { - mAsserter.dumpLog("Exception caught during test!", t); - mAsserter.ok(false, "Exception caught", t.toString()); - } - // re-throw to continue bail-out - throw t; - } - } - - @Override - public void tearDown() throws Exception { - try { - mAsserter.endTest(); - - // By default, we don't quit Fennec on finish, and we don't finish - // all opened activities. Not quiting Fennec entirely is intended to - // make life better for local testers, who might want to alter a - // test that is under development rather than Fennec itself. Not - // finishing activities is intended to allow local testers to - // manually inspect an activity's state after a test - // run. runtestsremote.py sets this to "1". Testers running via an - // IDE will not have this set at all. - final String quitAndFinish = FennecInstrumentationTestRunner.getFennecArguments() - .getString("quit_and_finish"); // null means not specified. - if ("1".equals(quitAndFinish)) { - // Request the browser force quit and wait for it to take effect. - Log.i(LOGTAG, "Requesting force quit."); - mActions.sendGeckoEvent("Robocop:Quit", null); - mSolo.sleep(ROBOCOP_QUIT_WAIT_MS); - - // If still running, finish activities as recommended by Robotium. - Log.i(LOGTAG, "Finishing all opened activities."); - mSolo.finishOpenedActivities(); - } else { - // This has the effect of keeping the activity-under-test - // around; if we don't set it to null, it is killed, either by - // finishOpenedActivities above or super.tearDown below. - Log.i(LOGTAG, "Not requesting force quit and trying to keep started activity alive."); - setActivity(null); - } - } catch (Throwable e) { - e.printStackTrace(); - } - super.tearDown(); - } - - /** - * Function to early abort if we can't reach the given HTTP server. Provides local testers - * with diagnostic information. Not currently available for TALOS tests, which are rarely run - * locally in any case. - */ - public void throwIfHttpGetFails() { - if (getTestType() == Type.TALOS) { - return; - } - - // rawURL to test fetching from. This should be a raw (IP) URL, not an alias - // (like mochi.test). We can't (easily) test fetching from the aliases, since - // those are managed by Fennec's proxy settings. - final String rawUrl = ((String) mConfig.get("rawhost")).replaceAll("(/$)", ""); - - HttpURLConnection urlConnection = null; - - try { - urlConnection = (HttpURLConnection) new URL(rawUrl).openConnection(); - - final int statusCode = urlConnection.getResponseCode(); - if (200 != statusCode) { - throw new IllegalStateException("Status code: " + statusCode); - } - } catch (Exception e) { - mAsserter.ok(false, "Robocop tests on your device need network/wifi access to reach: [" + rawUrl + "].", e.toString()); - } finally { - if (urlConnection != null) { - urlConnection.disconnect(); - } - } - } - - /** - * Ensure that the screen on the test device is powered on during tests. - */ - public void throwIfScreenNotOn() { - final PowerManager pm = (PowerManager) getActivity().getSystemService(Context.POWER_SERVICE); - mAsserter.ok(pm.isScreenOn(), - "Robocop tests need the test device screen to be powered on.", ""); - } - - protected GeckoProfile getTestProfile() { - if (mProfile.startsWith("/")) { - return GeckoProfile.get(getActivity(), /* profileName */ null, mProfile); - } - - return GeckoProfile.get(getActivity(), mProfile); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseTest.java deleted file mode 100644 index a8dfedc4e..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/BaseTest.java +++ /dev/null @@ -1,976 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.util.ArrayList; -import java.util.HashSet; - -import org.json.JSONException; -import org.json.JSONObject; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Element; -import org.mozilla.gecko.GeckoAppShell; -import org.mozilla.gecko.GeckoProfile; -import org.mozilla.gecko.GeckoThread; -import org.mozilla.gecko.R; -import org.mozilla.gecko.RobocopUtils; -import org.mozilla.gecko.Tab; -import org.mozilla.gecko.Tabs; - -import android.content.ContentValues; -import android.content.res.AssetManager; -import android.database.Cursor; -import android.os.Build; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.app.FragmentManager; -import android.support.v7.widget.RecyclerView; -import android.text.TextUtils; -import android.util.DisplayMetrics; -import android.view.View; -import android.widget.AdapterView; -import android.widget.Button; -import android.widget.EditText; -import android.widget.ListAdapter; -import android.widget.TextView; - -import com.robotium.solo.Condition; -import com.robotium.solo.Timeout; - -/** - * A convenient base class suitable for most Robocop tests. - */ -@SuppressWarnings("unchecked") -abstract class BaseTest extends BaseRobocopTest { - private static final int VERIFY_URL_TIMEOUT = 2000; - private static final int MAX_WAIT_ENABLED_TEXT_MS = 15000; - private static final int MAX_WAIT_HOME_PAGER_HIDDEN_MS = 15000; - private static final int MAX_WAIT_VERIFY_PAGE_TITLE_MS = 15000; - public static final int MAX_WAIT_MS = 4500; - public static final int LONG_PRESS_TIME = 6000; - private static final int GECKO_READY_WAIT_MS = 180000; - - protected static final String URL_HTTP_PREFIX = "http://"; - - public Device mDevice; - protected DatabaseHelper mDatabaseHelper; - protected int mScreenMidWidth; - protected int mScreenMidHeight; - private final HashSet mKnownTabIDs = new HashSet(); - - protected void blockForDelayedStartup() { - try { - Actions.EventExpecter delayedStartupExpector = mActions.expectGeckoEvent("Gecko:DelayedStartup"); - delayedStartupExpector.blockForEvent(GECKO_READY_WAIT_MS, true); - delayedStartupExpector.unregisterListener(); - } catch (Exception e) { - mAsserter.dumpLog("Exception in blockForDelayedStartup", e); - } - } - - protected void blockForGeckoReady() { - try { - Actions.EventExpecter geckoReadyExpector = mActions.expectGeckoEvent("Gecko:Ready"); - if (!GeckoThread.isRunning()) { - geckoReadyExpector.blockForEvent(GECKO_READY_WAIT_MS, true); - } - geckoReadyExpector.unregisterListener(); - } catch (Exception e) { - mAsserter.dumpLog("Exception in blockForGeckoReady", e); - } - } - - @Override - public void setUp() throws Exception { - super.setUp(); - - mDevice = new Device(); - mDatabaseHelper = new DatabaseHelper(getActivity(), mAsserter); - - // Ensure Robocop tests have access to network, and are run with Display powered on. - throwIfHttpGetFails(); - throwIfScreenNotOn(); - } - - protected void initializeProfile() { - final GeckoProfile profile = getTestProfile(); - - // In Robocop tests, we typically don't get initialized correctly, because - // GeckoProfile doesn't create the profile directory. - profile.enqueueInitialization(profile.getDir()); - } - - /** - * Click on the URL bar to focus it and enter editing mode. - */ - protected final void focusUrlBar() { - // Click on the browser toolbar to enter editing mode - mSolo.waitForView(R.id.browser_toolbar); - final View toolbarView = mSolo.getView(R.id.browser_toolbar); - mSolo.clickOnView(toolbarView); - - // Wait for highlighed text to gain focus - boolean success = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - mSolo.waitForView(R.id.url_edit_text); - EditText urlEditText = (EditText) mSolo.getView(R.id.url_edit_text); - if (urlEditText.isInputMethodTarget()) { - return true; - } - return false; - } - }, MAX_WAIT_ENABLED_TEXT_MS); - - mAsserter.ok(success, "waiting for urlbar text to gain focus", "urlbar text gained focus"); - } - - protected final void enterUrl(String url) { - focusUrlBar(); - - final EditText urlEditView = (EditText) mSolo.getView(R.id.url_edit_text); - - // Send the keys for the URL we want to enter - mSolo.clearEditText(urlEditView); - mSolo.typeText(urlEditView, url); - - // Get the URL text from the URL bar EditText view - final String urlBarText = urlEditView.getText().toString(); - mAsserter.is(url, urlBarText, "URL typed properly"); - } - - protected final Fragment getBrowserSearch() { - final FragmentManager fm = ((FragmentActivity) getActivity()).getSupportFragmentManager(); - return fm.findFragmentByTag("browser_search"); - } - - protected final void hitEnterAndWait() { - Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded"); - mActions.sendSpecialKey(Actions.SpecialKey.ENTER); - // wait for screen to load - contentEventExpecter.blockForEvent(); - contentEventExpecter.unregisterListener(); - } - - /** - * Load url by sending key strokes to the URL bar UI. - * - * This method waits synchronously for the DOMContentLoaded - * message from Gecko before returning. - * - * Unless you need to test text entry in the url bar, consider using loadUrl - * instead -- it loads pages more directly and quickly. - */ - protected final void inputAndLoadUrl(String url) { - enterUrl(url); - hitEnterAndWait(); - } - - /** - * Load url using the internal - * org.mozilla.gecko.Tabs API. - * - * This method does not wait for any confirmation from Gecko before - * returning -- consider using verifyUrlBarTitle or a similar approach - * to wait for the page to load, or at least use loadUrlAndWait. - */ - protected final void loadUrl(final String url) { - try { - Tabs.getInstance().loadUrl(url); - } catch (Exception e) { - mAsserter.dumpLog("Exception in loadUrl", e); - throw new RuntimeException(e); - } - } - - /** - * Load url using the internal - * org.mozilla.gecko.Tabs API and wait for DOMContentLoaded. - */ - protected final void loadUrlAndWait(final String url) { - Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded"); - loadUrl(url); - contentEventExpecter.blockForEvent(); - contentEventExpecter.unregisterListener(); - } - - protected final void closeTab(int tabId) { - Tabs tabs = Tabs.getInstance(); - Tab tab = tabs.getTab(tabId); - tabs.closeTab(tab); - } - - public final void verifyUrl(String url) { - final EditText urlEditText = (EditText) mSolo.getView(R.id.url_edit_text); - String urlBarText = null; - if (urlEditText != null) { - // wait for a short time for the expected text, in case there is a delay - // in updating the view - waitForCondition(new VerifyTextViewText(urlEditText, url), VERIFY_URL_TIMEOUT); - urlBarText = urlEditText.getText().toString(); - - } - mAsserter.is(urlBarText, url, "Browser toolbar URL stayed the same"); - } - - class VerifyTextViewText implements Condition { - private final TextView mTextView; - private final String mExpected; - public VerifyTextViewText(TextView textView, String expected) { - mTextView = textView; - mExpected = expected; - } - - @Override - public boolean isSatisfied() { - String textValue = mTextView.getText().toString(); - return mExpected.equals(textValue); - } - } - - class VerifyContentDescription implements Condition { - private final View view; - private final String expected; - - public VerifyContentDescription(View view, String expected) { - this.view = view; - this.expected = expected; - } - - @Override - public boolean isSatisfied() { - final CharSequence actual = view.getContentDescription(); - return TextUtils.equals(actual, expected); - } - } - - protected final String getAbsoluteUrl(String url) { - return mBaseHostnameUrl + "/" + url.replaceAll("(^/)", ""); - } - - protected final String getAbsoluteRawUrl(String url) { - return mBaseIpUrl + "/" + url.replaceAll("(^/)", ""); - } - - /* - * Wrapper method for mSolo.waitForCondition with additional logging. - */ - protected final boolean waitForCondition(Condition condition, int timeout) { - boolean result = mSolo.waitForCondition(condition, timeout); - if (!result) { - // Log timeout failure for diagnostic purposes only; a failed wait may - // be normal and does not necessarily warrant a test assertion/failure. - mAsserter.dumpLog("waitForCondition timeout after " + timeout + " ms."); - } - return result; - } - - public void SqliteCompare(String dbName, String sqlCommand, ContentValues[] cvs) { - File profile = new File(mProfile); - String dbPath = new File(profile, dbName).getPath(); - - Cursor c = mActions.querySql(dbPath, sqlCommand); - SqliteCompare(c, cvs); - } - - public void SqliteCompare(Cursor c, ContentValues[] cvs) { - mAsserter.is(c.getCount(), cvs.length, "List is correct length"); - if (c.moveToFirst()) { - do { - boolean found = false; - for (int i = 0; !found && i < cvs.length; i++) { - if (CursorMatches(c, cvs[i])) { - found = true; - } - } - mAsserter.is(found, true, "Password was found"); - } while (c.moveToNext()); - } - } - - public boolean CursorMatches(Cursor c, ContentValues cv) { - for (int i = 0; i < c.getColumnCount(); i++) { - String column = c.getColumnName(i); - if (cv.containsKey(column)) { - mAsserter.info("Comparing", "Column values for: " + column); - Object value = cv.get(column); - if (value == null) { - if (!c.isNull(i)) { - return false; - } - } else { - if (c.isNull(i) || !value.toString().equals(c.getString(i))) { - return false; - } - } - } - } - return true; - } - - public InputStream getAsset(String filename) throws IOException { - AssetManager assets = getInstrumentation().getContext().getAssets(); - return assets.open(filename); - } - - public boolean waitForText(final String text) { - // false is the default value for finding only - // visible views in `Solo.waitForText(String)`. - return waitForText(text, false); - } - - public boolean waitForText(final String text, final boolean onlyVisibleViews) { - // We use the default robotium values from - // `Waiter.waitForText(String)` for unspecified arguments. - final boolean rc = - mSolo.waitForText(text, 0, Timeout.getLargeTimeout(), true, onlyVisibleViews); - if (!rc) { - // log out failed wait for diagnostic purposes only; - // waitForText failures are sometimes expected/normal - mAsserter.dumpLog("waitForText timeout on "+text); - } - return rc; - } - - // waitForText usually scrolls down in a view when text is not visible. - // For PreferenceScreens and dialogs, Solo.waitForText scrolling does not - // work, so we use this hack to do the same thing. - protected boolean waitForPreferencesText(String txt) { - boolean foundText = waitForText(txt); - if (!foundText) { - if ((mScreenMidWidth == 0) || (mScreenMidHeight == 0)) { - mScreenMidWidth = mDriver.getGeckoWidth()/2; - mScreenMidHeight = mDriver.getGeckoHeight()/2; - } - - // If we don't see the item, scroll down once in case it's off-screen. - // Hacky way to scroll down. solo.scroll* does not work in dialogs. - MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop()); - meh.dragSync(mScreenMidWidth, mScreenMidHeight+100, mScreenMidWidth, mScreenMidHeight-100); - - foundText = mSolo.waitForText(txt); - } - return foundText; - } - - /** - * Wait for to be visible and also be enabled/clickable. - */ - public boolean waitForEnabledText(String text) { - final String testText = text; - boolean rc = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - // Solo.getText() could be used here, except that it sometimes - // hits an assertion when the requested text is not found. - ArrayList views = mSolo.getCurrentViews(); - for (View view : views) { - if (view instanceof TextView) { - TextView tv = (TextView)view; - String viewText = tv.getText().toString(); - if (tv.isEnabled() && viewText != null && viewText.matches(testText)) { - return true; - } - } - } - return false; - } - }, MAX_WAIT_ENABLED_TEXT_MS); - if (!rc) { - // log out failed wait for diagnostic purposes only; - // failures are sometimes expected/normal - mAsserter.dumpLog("waitForEnabledText timeout on "+text); - } - return rc; - } - - - /** - * Select from Menu > "Settings" >

          . - */ - public void selectSettingsItem(String section, String item) { - String[] itemPath = { "Settings", section, item }; - selectMenuItemByPath(itemPath); - } - - /** - * Traverses the items in listItems in order in the menu. - */ - public void selectMenuItemByPath(String[] listItems) { - int listLength = listItems.length; - if (listLength > 0) { - selectMenuItem(listItems[0]); - } - if (listLength > 1) { - for (int i = 1; i < listLength; i++) { - String itemName = "^" + listItems[i] + "$"; - mAsserter.ok(waitForPreferencesText(itemName), "Waiting for and scrolling once to find item " + itemName, itemName + " found"); - mAsserter.ok(waitForEnabledText(itemName), "Waiting for enabled text " + itemName, itemName + " option is present and enabled"); - mSolo.clickOnText(itemName); - } - } - } - - public final void selectMenuItem(String menuItemName) { - // build the item name ready to be used - String itemName = "^" + menuItemName + "$"; - final View menuView = mSolo.getView(R.id.menu); - mAsserter.isnot(menuView, null, "Menu view is not null"); - mSolo.clickOnView(menuView, true); - mAsserter.ok(waitForEnabledText(itemName), "Waiting for menu item " + itemName, itemName + " is present and enabled"); - mSolo.clickOnText(itemName); - } - - public final void verifyHomePagerHidden() { - final View homePagerContainer = mSolo.getView(R.id.home_screen_container); - - boolean rc = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return homePagerContainer.getVisibility() != View.VISIBLE; - } - }, MAX_WAIT_HOME_PAGER_HIDDEN_MS); - - if (!rc) { - mAsserter.ok(rc, "Verify HomePager is hidden", "HomePager is hidden"); - } - } - - public final void verifyUrlBarTitle(String url) { - mAsserter.isnot(url, null, "The url argument is not null"); - - final String expected; - if (mStringHelper.ABOUT_HOME_URL.equals(url)) { - expected = mStringHelper.ABOUT_HOME_TITLE; - } else if (url.startsWith(URL_HTTP_PREFIX)) { - expected = url.substring(URL_HTTP_PREFIX.length()); - } else { - expected = url; - } - - final TextView urlBarTitle = (TextView) mSolo.getView(R.id.url_bar_title); - String pageTitle = null; - if (urlBarTitle != null) { - // Wait for the title to make sure it has been displayed in case the view - // does not update fast enough - waitForCondition(new VerifyTextViewText(urlBarTitle, expected), MAX_WAIT_VERIFY_PAGE_TITLE_MS); - pageTitle = urlBarTitle.getText().toString(); - } - mAsserter.is(pageTitle, expected, "Page title is correct"); - } - - public final void verifyUrlInContentDescription(String url) { - mAsserter.isnot(url, null, "The url argument is not null"); - - final String expected; - if (mStringHelper.ABOUT_HOME_URL.equals(url)) { - expected = mStringHelper.ABOUT_HOME_TITLE; - } else if (url.startsWith(URL_HTTP_PREFIX)) { - expected = url.substring(URL_HTTP_PREFIX.length()); - } else { - expected = url; - } - - final View urlDisplayLayout = mSolo.getView(R.id.display_layout); - assertNotNull("ToolbarDisplayLayout is not null", urlDisplayLayout); - - String actualUrl = null; - - // Wait for the title to make sure it has been displayed in case the view - // does not update fast enough - waitForCondition(new VerifyContentDescription(urlDisplayLayout, expected), MAX_WAIT_VERIFY_PAGE_TITLE_MS); - if (urlDisplayLayout.getContentDescription() != null) { - actualUrl = urlDisplayLayout.getContentDescription().toString(); - } - - mAsserter.is(actualUrl, expected, "Url is correct"); - } - - public final void verifyTabCount(int expectedTabCount) { - Element tabCount = mDriver.findElement(getActivity(), R.id.tabs_counter); - String tabCountText = tabCount.getText(); - int tabCountInt = Integer.parseInt(tabCountText); - mAsserter.is(tabCountInt, expectedTabCount, "The correct number of tabs are opened"); - } - - public void verifyPinned(final boolean isPinned, final String gridItemTitle) { - boolean viewFound = waitForText(gridItemTitle); - mAsserter.ok(viewFound, "Found top site title: " + gridItemTitle, null); - - boolean success = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - // We set the left compound drawable (index 0) to the pin icon. - final TextView gridItemTextView = mSolo.getText(gridItemTitle); - return isPinned == (gridItemTextView.getCompoundDrawables()[0] != null); - } - }, MAX_WAIT_MS); - mAsserter.ok(success, "Top site item was pinned: " + isPinned, null); - } - - public void pinTopSite(String gridItemTitle) { - verifyPinned(false, gridItemTitle); - mSolo.clickLongOnText(gridItemTitle); - boolean dialogOpened = mSolo.waitForDialogToOpen(); - mAsserter.ok(dialogOpened, "Pin site dialog opened: " + gridItemTitle, null); - boolean pinSiteFound = waitForText(mStringHelper.CONTEXT_MENU_PIN_SITE); - mAsserter.ok(pinSiteFound, "Found pin site menu item", null); - mSolo.clickOnText(mStringHelper.CONTEXT_MENU_PIN_SITE); - verifyPinned(true, gridItemTitle); - } - - public void unpinTopSite(String gridItemTitle) { - verifyPinned(true, gridItemTitle); - mSolo.clickLongOnText(gridItemTitle); - boolean dialogOpened = mSolo.waitForDialogToOpen(); - mAsserter.ok(dialogOpened, "Pin site dialog opened: " + gridItemTitle, null); - boolean unpinSiteFound = waitForText(mStringHelper.CONTEXT_MENU_UNPIN_SITE); - mAsserter.ok(unpinSiteFound, "Found unpin site menu item", null); - mSolo.clickOnText(mStringHelper.CONTEXT_MENU_UNPIN_SITE); - verifyPinned(false, gridItemTitle); - } - - // Used to perform clicks on pop-up buttons without having to close the virtual keyboard - public void clickOnButton(String label) { - final Button button = mSolo.getButton(label); - try { - runTestOnUiThread(new Runnable() { - @Override - public void run() { - button.performClick(); - } - }); - } catch (Throwable throwable) { - mAsserter.ok(false, "Unable to click the button","Was unable to click button "); - } - } - - private void waitForAnimationsToFinish() { - // Ideally we'd actually wait for animations to finish but since we have - // no good way of doing that, we just wait an arbitrary unit of time. - mSolo.sleep(3500); - } - - public void addTab() { - mSolo.clickOnView(mSolo.getView(R.id.tabs)); - waitForAnimationsToFinish(); - - // wait for addTab to appear (this is usually immediate) - boolean success = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - View addTabView = mSolo.getView(R.id.add_tab); - if (addTabView == null) { - return false; - } - return true; - } - }, MAX_WAIT_MS); - mAsserter.ok(success, "waiting for add tab view", "add tab view available"); - final Actions.RepeatedEventExpecter pageShowExpecter = mActions.expectGeckoEvent("Content:PageShow"); - mSolo.clickOnView(mSolo.getView(R.id.add_tab)); - waitForAnimationsToFinish(); - - // Wait until we get a PageShow event for a new tab ID - for(;;) { - try { - JSONObject data = new JSONObject(pageShowExpecter.blockForEventData()); - int tabID = data.getInt("tabID"); - if (tabID == 0) { - mAsserter.dumpLog("addTab ignoring PageShow for tab 0"); - continue; - } - if (!mKnownTabIDs.contains(tabID)) { - mKnownTabIDs.add(tabID); - break; - } - } catch(JSONException e) { - mAsserter.ok(false, "Exception in addTab", getStackTraceString(e)); - } - } - pageShowExpecter.unregisterListener(); - } - - public void addTab(String url) { - addTab(); - - // Adding a new tab opens about:home, so now we just need to load the url in it. - loadUrlAndWait(url); - } - - public void closeAddedTabs() { - for(int tabID : mKnownTabIDs) { - closeTab(tabID); - } - } - - // A temporary tabs list/grid holder while the list and grid views are being transitioned to - // RecyclerViews (bug 1116415 and bug 1310081). - private static class TabsView { - private AdapterView gridView; - private RecyclerView listView; - - public TabsView(View view) { - if (view instanceof RecyclerView) { - listView = (RecyclerView) view; - } else { - gridView = (AdapterView) view; - } - } - - public void bringPositionIntoView(int index) { - if (gridView != null) { - gridView.setSelection(index); - } else { - listView.scrollToPosition(index); - } - } - - public View getViewAtIndex(int index) { - if (gridView != null) { - return gridView.getChildAt(index - gridView.getFirstVisiblePosition()); - } else { - final RecyclerView.ViewHolder itemViewHolder = listView.findViewHolderForLayoutPosition(index); - return itemViewHolder == null ? null : itemViewHolder.itemView; - } - } - - public void post(Runnable runnable) { - if (gridView != null) { - gridView.post(runnable); - } else { - listView.post(runnable); - } - } - } - /** - * Gets the AdapterView of the tabs list. - * - * @return List view in the tabs panel - */ - private final TabsView getTabsLayout() { - Element tabs = mDriver.findElement(getActivity(), R.id.tabs); - tabs.click(); - return new TabsView(getActivity().findViewById(R.id.normal_tabs)); - } - - /** - * Gets the view in the tabs panel at the specified index. - * - * @return View at index - */ - private View getTabViewAt(final int index) { - final View[] childView = { null }; - - final TabsView view = getTabsLayout(); - - runOnUiThreadSync(new Runnable() { - @Override - public void run() { - view.bringPositionIntoView(index); - - // The selection isn't updated synchronously; posting a - // runnable to the view's queue guarantees we'll run after the - // layout pass. - view.post(new Runnable() { - @Override - public void run() { - // Index is relative to all views in the list. - childView[0] = view.getViewAtIndex(index); - } - }); - } - }); - - boolean result = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return childView[0] != null; - } - }, MAX_WAIT_MS); - - mAsserter.ok(result, "list item at index " + index + " exists", null); - - return childView[0]; - } - - /** - * Selects the tab at the specified index. - * - * @param index Index of tab to select - */ - public void selectTabAt(final int index) { - mSolo.clickOnView(getTabViewAt(index)); - } - - public final void runOnUiThreadSync(Runnable runnable) { - RobocopUtils.runOnUiThreadSync(getActivity(), runnable); - } - - /* Tap the "star" (bookmark) button to bookmark or un-bookmark the current page */ - public void toggleBookmark() { - mActions.sendSpecialKey(Actions.SpecialKey.MENU); - waitForText("Settings"); - - // On ICS+ phones, there is no button labeled "Bookmarks" - // instead we have to just dig through every button on the screen - ArrayList images = mSolo.getCurrentViews(); - for (int i = 0; i < images.size(); i++) { - final View view = images.get(i); - boolean found = false; - found = "Bookmark".equals(view.getContentDescription()); - - // on older android versions, try looking at the button's text - if (!found) { - if (view instanceof TextView) { - found = "Bookmark".equals(((TextView)view).getText()); - } - } - - if (found) { - int[] xy = new int[2]; - view.getLocationOnScreen(xy); - - final int viewWidth = view.getWidth(); - final int viewHeight = view.getHeight(); - final float x = xy[0] + (viewWidth / 2.0f); - float y = xy[1] + (viewHeight / 2.0f); - - mSolo.clickOnScreen(x, y); - } - } - } - - class Device { - public final String version; // 2.x or 3.x or 4.x - public String type; // "tablet" or "phone" - public final int width; - public final int height; - public final float density; - - public Device() { - // Determine device version - int sdk = Build.VERSION.SDK_INT; - if (sdk < Build.VERSION_CODES.HONEYCOMB) { - version = "2.x"; - } else { - if (sdk > Build.VERSION_CODES.HONEYCOMB_MR2) { - version = "4.x"; - } else { - version = "3.x"; - } - } - // Determine with and height - DisplayMetrics dm = new DisplayMetrics(); - getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm); - height = dm.heightPixels; - width = dm.widthPixels; - density = dm.density; - // Determine device type - type = "phone"; - try { - if (GeckoAppShell.isTablet()) { - type = "tablet"; - } - } catch (Exception e) { - mAsserter.dumpLog("Exception in detectDevice", e); - } - } - } - - class Navigation { - private final String devType; - private final String osVersion; - - public Navigation(Device mDevice) { - devType = mDevice.type; - osVersion = mDevice.version; - } - - public void back() { - Actions.EventExpecter pageShowExpecter = mActions.expectGeckoEvent("Content:PageShow"); - - if (devType.equals("tablet")) { - Element backBtn = mDriver.findElement(getActivity(), R.id.back); - backBtn.click(); - } else { - mSolo.goBack(); - } - - pageShowExpecter.blockForEvent(); - pageShowExpecter.unregisterListener(); - } - - public void forward() { - Actions.EventExpecter pageShowExpecter = mActions.expectGeckoEvent("Content:PageShow"); - - if (devType.equals("tablet")) { - mSolo.waitForView(R.id.forward); - mSolo.clickOnView(mSolo.getView(R.id.forward)); - } else { - mActions.sendSpecialKey(Actions.SpecialKey.MENU); - waitForText("^New Tab$"); - if (!osVersion.equals("2.x")) { - mSolo.waitForView(R.id.forward); - mSolo.clickOnView(mSolo.getView(R.id.forward)); - } else { - mSolo.clickOnText("^Forward$"); - } - ensureMenuClosed(); - } - - pageShowExpecter.blockForEvent(); - pageShowExpecter.unregisterListener(); - } - - // DEPRECATED! - // Use BaseTest.toggleBookmark() in new code. - public void bookmark() { - mActions.sendSpecialKey(Actions.SpecialKey.MENU); - waitForText("^New Tab$"); - if (mSolo.searchText("^Bookmark$")) { - // This is the Android 2.x so the button has text - mSolo.clickOnText("^Bookmark$"); - } else { - Element bookmarkBtn = mDriver.findElement(getActivity(), R.id.bookmark); - if (bookmarkBtn != null) { - // We are on Android 4.x so the button is an image button - bookmarkBtn.click(); - } - } - ensureMenuClosed(); - } - - // On some devices, the menu may not be dismissed after clicking on an - // item. Close it here. - private void ensureMenuClosed() { - if (mSolo.searchText("^New Tab$")) { - mSolo.goBack(); - } - } - } - - /** - * Gets the string representation of a stack trace. - * - * @param t Throwable to get stack trace for - * @return Stack trace as a string - */ - public static String getStackTraceString(Throwable t) { - StringWriter sw = new StringWriter(); - t.printStackTrace(new PrintWriter(sw)); - return sw.toString(); - } - - /** - * Condition class that waits for a view, and allows callers access it when done. - */ - private class DescriptionCondition implements Condition { - public T mView; - private final String mDescr; - private final Class mCls; - - public DescriptionCondition(Class cls, String descr) { - mDescr = descr; - mCls = cls; - } - - @Override - public boolean isSatisfied() { - mView = findViewWithContentDescription(mCls, mDescr); - return (mView != null); - } - } - - /** - * Wait for a view with the specified description . - */ - public T waitForViewWithDescription(Class cls, String description) { - DescriptionCondition c = new DescriptionCondition(cls, description); - waitForCondition(c, MAX_WAIT_ENABLED_TEXT_MS); - return c.mView; - } - - /** - * Get an active view with the specified description . - */ - public T findViewWithContentDescription(Class cls, String description) { - for (T view : mSolo.getCurrentViews(cls)) { - final String descr = (String) view.getContentDescription(); - if (TextUtils.isEmpty(descr)) { - continue; - } - - if (TextUtils.equals(description, descr)) { - return view; - } - } - - return null; - } - - /** - * Abstract class for running small test cases within a BaseTest. - */ - abstract class TestCase implements Runnable { - /** - * Implement tests here. setUp and tearDown for the test case - * should be handled by the parent test. This is so we can avoid the - * overhead of starting Gecko and creating profiles. - */ - protected abstract void test() throws Exception; - - @Override - public void run() { - try { - test(); - } catch (Exception e) { - mAsserter.ok(false, - "Test " + this.getClass().getName() + " threw exception: " + e, - ""); - } - } - } - - /** - * Set the preference and wait for it to change before proceeding with the test. - */ - public void setPreferenceAndWaitForChange(final String name, final Object value) { - blockForGeckoReady(); - mActions.setPref(name, value, /* flush */ false); - - // Wait for confirmation of the pref change before proceeding with the test. - mActions.getPrefs(new String[] { name }, new Actions.PrefHandlerBase() { - - @Override // Actions.PrefHandlerBase - public void prefValue(String pref, boolean changedValue) { - mAsserter.is(pref, name, "Expecting correct pref name"); - mAsserter.ok(value instanceof Boolean, "Expecting boolean pref", ""); - mAsserter.is(changedValue, value, "Expecting matching pref value"); - } - - @Override // Actions.PrefHandlerBase - public void prefValue(String pref, int changedValue) { - mAsserter.is(pref, name, "Expecting correct pref name"); - mAsserter.ok(value instanceof Integer, "Expecting int pref", ""); - mAsserter.is(changedValue, value, "Expecting matching pref value"); - } - - @Override // Actions.PrefHandlerBase - public void prefValue(String pref, String changedValue) { - mAsserter.is(pref, name, "Expecting correct pref name"); - mAsserter.ok(value instanceof CharSequence, "Expecting string pref", ""); - mAsserter.is(changedValue, value, "Expecting matching pref value"); - } - - }).waitForFinish(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentContextMenuTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentContextMenuTest.java deleted file mode 100644 index 5a1d09f8c..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentContextMenuTest.java +++ /dev/null @@ -1,135 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.util.Clipboard; -import org.mozilla.gecko.Element; -import org.mozilla.gecko.R; - -import android.util.DisplayMetrics; - -import com.robotium.solo.Condition; - -/** - * This class covers interactions with the context menu opened from web content - */ -abstract class ContentContextMenuTest extends PixelTest { - private static final int MAX_TEST_TIMEOUT = 30000; // 30 seconds (worst case) - - // This method opens the context menu of any web content. It assumes that the page is already loaded - protected void openWebContentContextMenu(String waitText) { - DisplayMetrics dm = new DisplayMetrics(); - getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm); - - // The web content we are trying to open the context menu for should be positioned at the top of the page, at least 60px high and aligned to the middle - float top = mDriver.getGeckoTop() + 30 * dm.density; - float left = mDriver.getGeckoLeft() + mDriver.getGeckoWidth() / 2; - - mAsserter.dumpLog("long-clicking at "+left+", "+top); - mSolo.clickLongOnScreen(left, top); - waitForText(waitText); - } - - protected void verifyContextMenuItems(String[] items) { - // Test that the menu items are displayed - if (!mSolo.searchText(items[0])) { - openWebContentContextMenu(items[0]); // Open the context menu if it is not already - } - - for (String option:items) { - mAsserter.ok(mSolo.searchText(option), "Checking that the option: " + option + " is available", "The option is available"); - } - } - - protected void openTabFromContextMenu(String contextMenuOption, int expectedTabCount) { - if (!mSolo.searchText(contextMenuOption)) { - openWebContentContextMenu(contextMenuOption); // Open the context menu if it is not already - } - Actions.EventExpecter tabEventExpecter = mActions.expectGeckoEvent("Tab:Added"); - mSolo.clickOnText(contextMenuOption); - tabEventExpecter.blockForEvent(); - tabEventExpecter.unregisterListener(); - verifyTabCount(expectedTabCount); - } - - protected void verifyTabs(String[] items) { - if (!mSolo.searchText(items[0])) { - openWebContentContextMenu(items[0]); - } - - for (String option:items) { - mAsserter.ok(mSolo.searchText(option), "Checking that the option: " + option + " is available", "The option is available"); - } - } - - protected void switchTabs(String tab) { - if (!mSolo.searchText(tab)) { - openWebContentContextMenu(tab); - } - mSolo.clickOnText(tab); - } - - - protected void verifyCopyOption(String copyOption, final String copiedText) { - if (!mSolo.searchText(copyOption)) { - openWebContentContextMenu(copyOption); // Open the context menu if it is not already - } - mSolo.clickOnText(copyOption); - boolean correctText = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - final String clipboardText = Clipboard.getText(); - mAsserter.dumpLog("Clipboard text = " + clipboardText + " , expected text = " + copiedText); - return clipboardText.contains(copiedText); - } - }, MAX_TEST_TIMEOUT); - mAsserter.ok(correctText, "Checking if the text is correctly copied", "The text was correctly copied"); - } - - - - protected void verifyShareOption(String shareOption, String pageTitle) { - waitForText(pageTitle); // Even if this fails, it won't assert - if (!mSolo.searchText(shareOption)) { - openWebContentContextMenu(shareOption); // Open the context menu if it is not already - } - mSolo.clickOnText(shareOption); - mAsserter.ok(waitForText(shareOption), "Checking that the share pop-up is displayed", "The pop-up has been displayed"); - - // Close the Share Link option menu and wait for the page to be focused again - mSolo.goBack(); - waitForText(pageTitle); - } - - protected void verifyViewImageOption(String viewImageOption, final String imageUrl, String pageTitle) { - if (!mSolo.searchText(viewImageOption)) { - openWebContentContextMenu(viewImageOption); - } - mSolo.clickOnText(viewImageOption); - - boolean viewedImage = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - final Element urlBarElement = mDriver.findElement(getActivity(), R.id.url_edit_text); - final String loadedUrl = urlBarElement.getText(); - return loadedUrl.contentEquals(imageUrl); - } - }, MAX_TEST_TIMEOUT); - mAsserter.ok(viewedImage, "Checking if the image is correctly viewed", "The image was correctly viewed"); - - mSolo.goBack(); - waitForText(pageTitle); - } - - protected void verifyBookmarkLinkOption(String bookmarkOption, String link) { - if (!mSolo.searchText(bookmarkOption)) { - openWebContentContextMenu(bookmarkOption); // Open the context menu if it is not already - } - mSolo.clickOnText(bookmarkOption); - mAsserter.ok(waitForText("Bookmark added"), "Waiting for the Bookmark added toaster notification", "The notification has been displayed"); - mAsserter.ok(mDatabaseHelper.isBookmark(link), "Checking if the link has been added as a bookmark", "The link has been bookmarked"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentProviderTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentProviderTest.java deleted file mode 100644 index 5496c97d2..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/ContentProviderTest.java +++ /dev/null @@ -1,255 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.File; -import java.util.ArrayList; -import java.util.LinkedList; -import java.util.concurrent.Callable; - -import org.mozilla.gecko.db.BrowserContract; -import org.mozilla.gecko.db.BrowserProvider; - -import android.content.ContentProvider; -import android.content.ContentProviderOperation; -import android.content.ContentProviderResult; -import android.content.ContentValues; -import android.content.Context; -import android.content.OperationApplicationException; -import android.content.SharedPreferences; -import android.content.pm.ApplicationInfo; -import android.content.res.AssetManager; -import android.content.res.Resources; -import android.database.ContentObserver; -import android.database.Cursor; -import android.net.Uri; -import android.os.Build; -import android.test.IsolatedContext; -import android.test.RenamingDelegatingContext; -import android.test.mock.MockContentResolver; -import android.test.mock.MockContext; - -/* - * ContentProviderTest provides the infrastructure to run content provider - * tests in an controlled/isolated environment, guaranteeing that your tests - * will not affect or be affected by any UI-related code. This is basically - * a heavily adapted port of Android's ProviderTestCase2 to work on Mozilla's - * infrastructure. - * - * For some tests, we need to have access to UI parts, or at least launch - * the activity so the assets with test data become available, which requires - * that we derive this test from BaseTest and consequently pull in some more - * UI code than we'd ideally want. Furthermore, we need to pass the - * Activity and not the instrumentation Context for the UI part to find some - * of its required resources. - * Similarly, we need to pass the Activity instead of the Instrumentation - * Context down to some of our users (still wrapped in the Delegating Provider) - * because they will stop working correctly if we do not. A typical problem - * is that databases used in the ContentProvider will be attempted to be - * opened twice. - */ -abstract class ContentProviderTest extends BaseTest { - protected ContentProvider mProvider; - protected ChangeRecordingMockContentResolver mResolver; - protected ArrayList mTests; - protected String mDatabaseName; - protected String mProviderAuthority; - protected IsolatedContext mProviderContext; - - private class ContentProviderMockContext extends MockContext { - @Override - public Resources getResources() { - // We will fail to find some resources if we don't point - // at the original activity. - return ((Context)getActivity()).getResources(); - } - - @Override - public String getPackageName() { - return getInstrumentation().getContext().getPackageName(); - } - - @Override - public String getPackageResourcePath() { - return getInstrumentation().getContext().getPackageResourcePath(); - } - - @Override - public File getDir(String name, int mode) { - return getInstrumentation().getContext().getDir(this.getClass().getSimpleName() + "_" + name, mode); - } - - @Override - public Context getApplicationContext() { - return this; - } - - @Override - public SharedPreferences getSharedPreferences(String name, int mode) { - return getInstrumentation().getContext().getSharedPreferences(name, mode); - } - - @Override - public ApplicationInfo getApplicationInfo() { - return getInstrumentation().getContext().getApplicationInfo(); - } - } - - protected class DelegatingTestContentProvider extends ContentProvider { - ContentProvider mTargetProvider; - - public DelegatingTestContentProvider(ContentProvider targetProvider) { - super(); - mTargetProvider = targetProvider; - } - - private Uri appendTestParam(Uri uri) { - try { - return appendUriParam(uri, BrowserContract.PARAM_IS_TEST, "1"); - } catch (Exception e) {} - - return null; - } - - @Override - public boolean onCreate() { - return mTargetProvider.onCreate(); - } - - @Override - public String getType(Uri uri) { - return mTargetProvider.getType(uri); - } - - @Override - public int delete(Uri uri, String selection, String[] selectionArgs) { - return mTargetProvider.delete(appendTestParam(uri), selection, selectionArgs); - } - - @Override - public Uri insert(Uri uri, ContentValues values) { - return mTargetProvider.insert(appendTestParam(uri), values); - } - - @Override - public int update(Uri uri, ContentValues values, String selection, - String[] selectionArgs) { - return mTargetProvider.update(appendTestParam(uri), values, - selection, selectionArgs); - } - - @Override - public Cursor query(Uri uri, String[] projection, String selection, - String[] selectionArgs, String sortOrder) { - return mTargetProvider.query(appendTestParam(uri), projection, selection, - selectionArgs, sortOrder); - } - - @Override - public ContentProviderResult[] applyBatch (ArrayList operations) - throws OperationApplicationException { - return mTargetProvider.applyBatch(operations); - } - - @Override - public int bulkInsert(Uri uri, ContentValues[] values) { - return mTargetProvider.bulkInsert(appendTestParam(uri), values); - } - - public ContentProvider getTargetProvider() { - return mTargetProvider; - } - } - - /* - * A MockContentResolver that records each URI that is supplied to - * notifyChange. Warning: the list of changed URIs is not - * synchronized. - */ - protected class ChangeRecordingMockContentResolver extends MockContentResolver { - public final LinkedList notifyChangeList = new LinkedList(); - - @Override - public void notifyChange(Uri uri, ContentObserver observer, boolean syncToNetwork) { - notifyChangeList.addLast(uri); - - super.notifyChange(uri, observer, syncToNetwork); - } - } - - /** - * Factory function that makes new ContentProvider instances. - *

          - * We want a fresh provider each test, so this should be invoked in - * setUp before each individual test. - */ - protected static Callable sBrowserProviderCallable = new Callable() { - @Override - public ContentProvider call() { - return new BrowserProvider(); - } - }; - - private void setUpContentProvider(ContentProvider targetProvider) throws Exception { - mResolver = new ChangeRecordingMockContentResolver(); - - final String filenamePrefix = this.getClass().getSimpleName() + "."; - RenamingDelegatingContext targetContextWrapper = - new RenamingDelegatingContext( - new ContentProviderMockContext(), - (Context)getActivity(), - filenamePrefix); - - mProviderContext = new IsolatedContext(mResolver, targetContextWrapper); - - targetProvider.attachInfo(mProviderContext, null); - - mProvider = new DelegatingTestContentProvider(targetProvider); - mProvider.attachInfo(mProviderContext, null); - - mResolver.addProvider(mProviderAuthority, mProvider); - } - - public static Uri appendUriParam(Uri uri, String param, String value) { - return uri.buildUpon().appendQueryParameter(param, value).build(); - } - - public void setTestName(String testName) { - mAsserter.setTestName(this.getClass().getName() + " - " + testName); - } - - @Override - public void setUp() throws Exception { - throw new UnsupportedOperationException("You should call setUp(authority, databaseName) instead"); - } - - public void setUp(Callable contentProviderFactory, String authority, String databaseName) throws Exception { - super.setUp(); - - mTests = new ArrayList(); - mDatabaseName = databaseName; - - mProviderAuthority = authority; - - setUpContentProvider(contentProviderFactory.call()); - } - - @Override - public void tearDown() throws Exception { - if (Build.VERSION.SDK_INT >= 11) { - mProvider.shutdown(); - } - - if (mDatabaseName != null) { - mProviderContext.deleteDatabase(mDatabaseName); - } - - super.tearDown(); - } - - public AssetManager getAssetManager() { - return getInstrumentation().getContext().getAssets(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/DatabaseHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/DatabaseHelper.java deleted file mode 100644 index c87dc2432..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/DatabaseHelper.java +++ /dev/null @@ -1,170 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.util.ArrayList; - -import org.mozilla.gecko.AppConstants; -import org.mozilla.gecko.Assert; -import org.mozilla.gecko.GeckoProfile; -import org.mozilla.gecko.db.BrowserDB; - -import android.app.Activity; -import android.content.ContentResolver; -import android.database.Cursor; -import android.net.Uri; - -class DatabaseHelper { - protected enum BrowserDataType {BOOKMARKS, HISTORY}; - private final Activity mActivity; - private final Assert mAsserter; - - public DatabaseHelper(Activity activity, Assert asserter) { - mActivity = activity; - mAsserter = asserter; - } - /** - * This method can be used to check if an URL is present in the bookmarks database - */ - protected boolean isBookmark(String url) { - final ContentResolver resolver = mActivity.getContentResolver(); - return getProfileDB().isBookmark(resolver, url); - } - - protected Uri buildUri(BrowserDataType dataType) { - Uri uri = null; - if (dataType == BrowserDataType.BOOKMARKS || dataType == BrowserDataType.HISTORY) { - uri = Uri.parse("content://" + AppConstants.ANDROID_PACKAGE_NAME + ".db.browser/" + dataType.toString().toLowerCase()); - } else { - mAsserter.ok(false, "The wrong data type has been provided = " + dataType.toString(), "Please provide the correct data type"); - } - uri = uri.buildUpon().appendQueryParameter("profile", GeckoProfile.DEFAULT_PROFILE) - .appendQueryParameter("sync", "true").build(); - return uri; - } - - /** - * Adds a bookmark. - */ - protected void addMobileBookmark(String title, String url) { - final ContentResolver resolver = mActivity.getContentResolver(); - getProfileDB().addBookmark(resolver, title, url); - mAsserter.ok(true, "Inserting a new bookmark", "Inserting the bookmark with the title = " + title + " and the url = " + url); - } - - /** - * Updates the title and keyword of a bookmark with the given URL. - * - * Warning: This method assumes that there's only one bookmark with the given URL. - */ - protected void updateBookmark(String url, String title, String keyword) { - final ContentResolver resolver = mActivity.getContentResolver(); - // Get the id for the bookmark with the given URL. - Cursor c = null; - try { - c = getProfileDB().getBookmarkForUrl(resolver, url); - if (!c.moveToFirst()) { - mAsserter.ok(false, "Getting bookmark with url", "Couldn't find bookmark with url = " + url); - return; - } - - int id = c.getInt(c.getColumnIndexOrThrow("_id")); - getProfileDB().updateBookmark(resolver, id, url, title, keyword); - - mAsserter.ok(true, "Updating bookmark", "Updating bookmark with url = " + url); - } finally { - if (c != null) { - c.close(); - } - } - } - - protected void deleteBookmark(String url) { - final ContentResolver resolver = mActivity.getContentResolver(); - getProfileDB().removeBookmarksWithURL(resolver, url); - } - - protected void deleteHistoryItem(String url) { - final ContentResolver resolver = mActivity.getContentResolver(); - getProfileDB().removeHistoryEntry(resolver, url); - } - - // About the same implementation as getFolderIdFromGuid from LocalBrowserDB because it is declared private and we can't use reflections to access it - protected long getFolderIdFromGuid(String guid) { - final ContentResolver resolver = mActivity.getContentResolver(); - long folderId = -1L; - final Uri bookmarksUri = buildUri(BrowserDataType.BOOKMARKS); - - Cursor c = null; - try { - c = resolver.query(bookmarksUri, - new String[] { "_id" }, - "guid = ?", - new String[] { guid }, - null); - if (c.moveToFirst()) { - folderId = c.getLong(c.getColumnIndexOrThrow("_id")); - } - - if (folderId == -1) { - mAsserter.ok(false, "Trying to get the folder id" ,"We did not get the correct folder id"); - } - } finally { - if (c != null) { - c.close(); - } - } - return folderId; - } - - /** - * Returns all of the bookmarks or history entries in a database. - * - * @return an ArrayList of the urls in the Firefox for Android Bookmarks or History databases. - */ - protected ArrayList getBrowserDBUrls(BrowserDataType dataType) { - final ArrayList browserData = new ArrayList(); - final ContentResolver resolver = mActivity.getContentResolver(); - - Cursor cursor = null; - final BrowserDB db = getProfileDB(); - if (dataType == BrowserDataType.HISTORY) { - cursor = db.getAllVisitedHistory(resolver); - } else if (dataType == BrowserDataType.BOOKMARKS) { - cursor = db.getBookmarksInFolder(resolver, getFolderIdFromGuid("mobile")); - } - - if (cursor == null) { - mAsserter.ok(false, "We could not retrieve any data from the database", "The cursor was null"); - return browserData; - } - - try { - if (!cursor.moveToFirst()) { - // Nothing here, but that's OK -- maybe there are zero results. The calling test will fail. - return browserData; - } - - do { - // The URL field may be null for folders in the structure of the Bookmarks table for Firefox. Eliminate those. - if (cursor.getString(cursor.getColumnIndex("url")) != null) { - browserData.add(cursor.getString(cursor.getColumnIndex("url"))); - } - } while (cursor.moveToNext()); - - return browserData; - } finally { - cursor.close(); - } - } - - protected BrowserDB getProfileDB() { - return BrowserDB.from(mActivity); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptBridgeTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptBridgeTest.java deleted file mode 100644 index a71f8fd49..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptBridgeTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.*; - -import org.mozilla.gecko.tests.helpers.GeckoHelper; -import org.mozilla.gecko.tests.helpers.JavascriptBridge; -import org.mozilla.gecko.tests.helpers.NavigationHelper; - -/** - * Extended to write tests using JavascriptBridge, which allows Java and JS to communicate back-and-forth. - * If you don't need back-and-forth communication, consider {@link JavascriptTest}. - * - * To write a test: - * * Extend this class - * * Add your javascript file to the base robocop directory (see where `testJavascriptBridge.js` is located) - * * In the main test method, call {@link #blockForReadyAndLoadJS(String)} with your javascript file name - * (don't include the path) or if you're loading a non-harness url, be sure to call {@link GeckoHelper#blockForReady()} - * * You can access js calls via the {@link #getJS()} method - * - Read {@link JavascriptBridge} javadoc for more information about using the API. - */ -public class JavascriptBridgeTest extends UITest { - - private static final long WAIT_GET_FROM_JS_MILLIS = 20000; - - private JavascriptBridge js; - - // Feel free to implement additional return types. - private boolean isAsyncValueSet; - private String asyncValueStr; - - @Override - public void setUp() throws Exception { - super.setUp(); - js = new JavascriptBridge(this); - } - - @Override - public void tearDown() throws Exception { - js.disconnect(); - super.tearDown(); - } - - public JavascriptBridge getJS() { - return js; - } - - protected void blockForReadyAndLoadJS(final String jsFilename) { - NavigationHelper.enterAndLoadUrl(mStringHelper.getHarnessUrlForJavascript(jsFilename)); - } - - /** - * Used to retrieve values from js when it's required to call async methods (e.g. promises). - * This method will block until the value is retrieved else timeout. - * - * This method is not thread-safe. - * - * Ideally, we could just have Javascript call Java when the callback completes but Java won't - * listen for messages unless we call into JS again (bug 1253467). - * - * To use this method: - * * Call this method with a name argument, henceforth known as `varName`. Note that it will be capitalized - * in all function names. - * * Create a js function, `"getAsync" + varName` (e.g. if `varName == "clientId`, the function is - * `getAsyncClientId`) of no args. This function should call the async get method and assign a global variable to - * the return value. - * * Create a js function, `"pollGetAsync" + varName` (e.g. `pollGetAsyncClientId`) of no args. It should call - * `java.asyncCall('blockingFromJsResponseString', ...` with two args: a boolean if the async value has been set yet - * and a String with the global return value (`null` or `undefined` are acceptable if the value has not been set). - */ - public String getBlockingFromJsString(final String varName) { - isAsyncValueSet = false; - final String fnSuffix = capitalize(varName); - getJS().syncCall("getAsync" + fnSuffix); // Initiate async callback - - final long timeoutMillis = System.currentTimeMillis() + WAIT_GET_FROM_JS_MILLIS; - do { - // Avoid sleeping! The async callback may have already completed so - // we test for completion here, rather than in the loop predicate. - getJS().syncCall("pollGetAsync" + fnSuffix); - if (isAsyncValueSet) { - break; - } - - if (System.currentTimeMillis() > timeoutMillis) { - fFail("Retrieving " + varName + " from JS has timed out"); - } - try { - Thread.sleep(500, 0); // Give time for JS to complete its operation. (emulator one core?) - } catch (final InterruptedException e) { } - } while (true); - - return asyncValueStr; - } - - public void blockingFromJsResponseString(final boolean isValueSet, final String value) { - this.isAsyncValueSet = isValueSet; - this.asyncValueStr = value; - } - - private String capitalize(final String str) { - return str.substring(0, 1).toUpperCase() + str.substring(1); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptTest.java deleted file mode 100644 index 52893510d..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/JavascriptTest.java +++ /dev/null @@ -1,87 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.json.JSONObject; -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.tests.helpers.JavascriptBridge; -import org.mozilla.gecko.tests.helpers.JavascriptMessageParser; - -import android.util.Log; - -/** - * Extended to test stand-alone Javascript in automation. If you're looking to test JS interactions - * with Java, see {@link JavascriptBridgeTest}. - * - * There are also other tests that run stand-alone javascript but are more difficult for the mobile - * team to run (e.g. xpcshell). - */ -public class JavascriptTest extends BaseTest { - private static final String LOGTAG = "JavascriptTest"; - private static final String EVENT_TYPE = JavascriptBridge.EVENT_TYPE; - - // Calculate these once, at initialization. isLoggable is too expensive to - // have in-line in each log call. - private static final boolean logDebug = Log.isLoggable(LOGTAG, Log.DEBUG); - private static final boolean logVerbose = Log.isLoggable(LOGTAG, Log.VERBOSE); - - private final String javascriptUrl; - - public JavascriptTest(String javascriptUrl) { - super(); - this.javascriptUrl = javascriptUrl; - } - - public void testJavascript() throws Exception { - blockForGeckoReady(); - - doTestJavascript(); - } - - protected void doTestJavascript() throws Exception { - // We want to be waiting for Robocop messages before the page is loaded - // because the test harness runs each test in the suite (and possibly - // completes testing) before the page load event is fired. - final Actions.EventExpecter expecter = mActions.expectGeckoEvent(EVENT_TYPE); - mAsserter.dumpLog("Registered listener for " + EVENT_TYPE); - - final String url = getAbsoluteUrl(mStringHelper.getHarnessUrlForJavascript(javascriptUrl)); - mAsserter.dumpLog("Loading JavaScript test from " + url); - loadUrl(url); - - final JavascriptMessageParser testMessageParser = - new JavascriptMessageParser(mAsserter, false); - try { - while (!testMessageParser.isTestFinished()) { - if (logVerbose) { - Log.v(LOGTAG, "Waiting for " + EVENT_TYPE); - } - String data = expecter.blockForEventData(); - if (logVerbose) { - Log.v(LOGTAG, "Got event with data '" + data + "'"); - } - - JSONObject o = new JSONObject(data); - String innerType = o.getString("innerType"); - if (!"progress".equals(innerType)) { - throw new Exception("Unexpected event innerType " + innerType); - } - - String message = o.getString("message"); - if (message == null) { - throw new Exception("Progress message must not be null"); - } - testMessageParser.logMessage(message); - } - - if (logDebug) { - Log.d(LOGTAG, "Got test finished message"); - } - } finally { - expecter.unregisterListener(); - mAsserter.dumpLog("Unregistered listener for " + EVENT_TYPE); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventHelper.java deleted file mode 100644 index 5b8254e99..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventHelper.java +++ /dev/null @@ -1,210 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.GeckoAppShell; -import org.mozilla.gecko.gfx.LayerView; -import org.mozilla.gecko.PrefsHelper; - -import android.app.Instrumentation; -import android.os.SystemClock; -import android.util.Log; -import android.view.MotionEvent; - -class MotionEventHelper { - private static final String LOGTAG = "RobocopMotionEventHelper"; - - private static final long DRAG_EVENTS_PER_SECOND = 20; // 20 move events per second when doing a drag - - private final Instrumentation mInstrumentation; - private final int mSurfaceOffsetX; - private final int mSurfaceOffsetY; - private final LayerView layerView; - private boolean mApzEnabled; - private float mTouchStartTolerance; - private final int mDpi; - - public MotionEventHelper(Instrumentation inst, int surfaceOffsetX, int surfaceOffsetY) { - mInstrumentation = inst; - mSurfaceOffsetX = surfaceOffsetX; - mSurfaceOffsetY = surfaceOffsetY; - layerView = GeckoAppShell.getLayerView(); - mApzEnabled = false; - mTouchStartTolerance = 0.0f; - mDpi = GeckoAppShell.getDpi(); - Log.i(LOGTAG, "Initialized using offset (" + mSurfaceOffsetX + "," + mSurfaceOffsetY + ")"); - PrefsHelper.getPref("layers.async-pan-zoom.enabled", new PrefsHelper.PrefHandlerBase() { - @Override public void prefValue(String pref, boolean value) { - mApzEnabled = value; - } - }); - PrefsHelper.getPref("apz.touch_start_tolerance", new PrefsHelper.PrefHandlerBase() { - @Override public void prefValue(String pref, String value) { - mTouchStartTolerance = Float.parseFloat(value); - } - }); - } - - public long down(float x, float y) { - Log.d(LOGTAG, "Triggering down at (" + x + "," + y + ")"); - long downTime = SystemClock.uptimeMillis(); - MotionEvent event = MotionEvent.obtain(downTime, downTime, MotionEvent.ACTION_DOWN, mSurfaceOffsetX + x, mSurfaceOffsetY + y, 0); - try { - mInstrumentation.sendPointerSync(event); - } finally { - event.recycle(); - event = null; - } - return downTime; - } - - public long move(long downTime, float x, float y) { - return move(downTime, SystemClock.uptimeMillis(), x, y); - } - - public long move(long downTime, long moveTime, float x, float y) { - Log.d(LOGTAG, "Triggering move to (" + x + "," + y + ")"); - MotionEvent event = MotionEvent.obtain(downTime, moveTime, MotionEvent.ACTION_MOVE, mSurfaceOffsetX + x, mSurfaceOffsetY + y, 0); - try { - mInstrumentation.sendPointerSync(event); - } finally { - event.recycle(); - event = null; - } - return downTime; - } - - public long up(long downTime, float x, float y) { - return up(downTime, SystemClock.uptimeMillis(), x, y); - } - - public long up(long downTime, long upTime, float x, float y) { - Log.d(LOGTAG, "Triggering up at (" + x + "," + y + ")"); - MotionEvent event = MotionEvent.obtain(downTime, upTime, MotionEvent.ACTION_UP, mSurfaceOffsetX + x, mSurfaceOffsetY + y, 0); - try { - mInstrumentation.sendPointerSync(event); - } finally { - event.recycle(); - event = null; - } - return -1L; - } - - private long movePastTouchStartTolerance(float startX, float startY, float endX, float endY) { - long downTime = 0; - float eventDx = (endX - startX); - float eventDy = (endY - startY); - if (mApzEnabled && (mTouchStartTolerance > 0.0f) && (eventDx != 0 || eventDy !=0)) { - final float dragLength = (float)Math.sqrt((eventDx * eventDx) + (eventDy * eventDy)); - final float extraDragLength = (float)Math.ceil(mTouchStartTolerance * mDpi); - final float extraDx = (eventDx / dragLength) * extraDragLength * (eventDx > 0.0f ? -1.0f : 1.0f); - final float extraDy = (eventDy / dragLength) * extraDragLength * (eventDy > 0.0f ? -1.0f : 1.0f); - downTime = down(startX + extraDx, startY + extraDy); - downTime = move(downTime, startX + extraDx, startY + extraDy); - try { - Thread.sleep(1000L / DRAG_EVENTS_PER_SECOND); - } catch (InterruptedException ie) { - ie.printStackTrace(); - } - } else { - downTime = down(startX, startY); - } - return downTime; - } - - public Thread dragAsync(final float startX, final float startY, final float endX, final float endY, final long durationMillis) { - Thread t = new Thread() { - @Override - public void run() { - layerView.setIsLongpressEnabled(false); - - int numEvents = (int)(durationMillis * DRAG_EVENTS_PER_SECOND / 1000); - float eventDx = (endX - startX) / numEvents; - float eventDy = (endY - startY) / numEvents; - long downTime = movePastTouchStartTolerance(startX, startY, endX, endY); - for (int i = 0; i < numEvents - 1; i++) { - downTime = move(downTime, startX + (eventDx * i), startY + (eventDy * i)); - try { - Thread.sleep(1000L / DRAG_EVENTS_PER_SECOND); - } catch (InterruptedException ie) { - ie.printStackTrace(); - } - } - // sleep a bit before sending the last move so that the calculated - // fling velocity is low and we don't end up doing a fling afterwards. - try { - Thread.sleep(1000L); - } catch (InterruptedException ie) { - ie.printStackTrace(); - } - // do the last one using endX/endY directly to avoid rounding errors - downTime = move(downTime, endX, endY); - downTime = up(downTime, endX, endY); - - layerView.setIsLongpressEnabled(true); - } - }; - t.start(); - return t; - } - - public void dragSync(float startX, float startY, float endX, float endY, long durationMillis) { - try { - dragAsync(startX, startY, endX, endY, durationMillis).join(); - mInstrumentation.waitForIdleSync(); - } catch (InterruptedException ie) { - ie.printStackTrace(); - } - } - - public void dragSync(float startX, float startY, float endX, float endY) { - dragSync(startX, startY, endX, endY, 1000); - } - - public Thread flingAsync(final float startX, final float startY, final float endX, final float endY, final float velocity) { - // note that the first move after the touch-down is used to get over the panning threshold, and - // is basically cancelled out. this means we need to generate (at least) two move events, with - // the last move event hitting the target velocity. to do this we just slice the total distance - // in half, assuming the first half will get us over the panning threshold and the second half - // will trigger the fling. - final float dx = (endX - startX) / 2; - final float dy = (endY - startY) / 2; - float distance = (float) Math.sqrt((dx * dx) + (dy * dy)); - final long time = (long)(distance / velocity); - if (time <= 0) { - throw new IllegalArgumentException( "Fling parameters require too small a time period" ); - } - Thread t = new Thread() { - @Override - public void run() { - long downTime = down(startX, startY); - downTime = move(downTime, downTime + time, startX + dx, startY + dy); - downTime = move(downTime, downTime + time + time, endX, endY); - downTime = up(downTime, downTime + time + time + time, endX, endY); - } - }; - t.start(); - return t; - } - - public void flingSync(float startX, float startY, float endX, float endY, float velocity) { - try { - flingAsync(startX, startY, endX, endY, velocity).join(); - mInstrumentation.waitForIdleSync(); - } catch (InterruptedException ie) { - ie.printStackTrace(); - } - } - - public void tap(float x, float y) { - long downTime = down(x, y); - downTime = up(downTime, x, y); - } - - public void doubleTap(float x, float y) { - tap(x, y); - tap(x, y); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventReplayer.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventReplayer.java deleted file mode 100644 index 508c6b197..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/MotionEventReplayer.java +++ /dev/null @@ -1,224 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.HashMap; -import java.util.Map; -import java.util.StringTokenizer; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import android.app.Instrumentation; -import android.os.Build; -import android.os.SystemClock; -import android.util.Log; -import android.view.MotionEvent; - -class MotionEventReplayer { - private static final String LOGTAG = "RobocopMotionEventReplayer"; - - // the inner dimensions of the window on which the motion event capture was taken from - private static final int CAPTURE_WINDOW_WIDTH = 720; - private static final int CAPTURE_WINDOW_HEIGHT = 1038; - - private final Instrumentation mInstrumentation; - private final int mSurfaceOffsetX; - private final int mSurfaceOffsetY; - private final int mSurfaceWidth; - private final int mSurfaceHeight; - private final Map mActionTypes; - private Method mObtainNanoMethod; - - public MotionEventReplayer(Instrumentation inst, int surfaceOffsetX, int surfaceOffsetY, int surfaceWidth, int surfaceHeight) { - mInstrumentation = inst; - mSurfaceOffsetX = surfaceOffsetX; - mSurfaceOffsetY = surfaceOffsetY; - mSurfaceWidth = surfaceWidth; - mSurfaceHeight = surfaceHeight; - Log.i(LOGTAG, "Initialized using offset (" + mSurfaceOffsetX + "," + mSurfaceOffsetY + ")"); - - mActionTypes = new HashMap(); - mActionTypes.put("ACTION_CANCEL", MotionEvent.ACTION_CANCEL); - mActionTypes.put("ACTION_DOWN", MotionEvent.ACTION_DOWN); - mActionTypes.put("ACTION_MOVE", MotionEvent.ACTION_MOVE); - mActionTypes.put("ACTION_POINTER_DOWN", MotionEvent.ACTION_POINTER_DOWN); - mActionTypes.put("ACTION_POINTER_UP", MotionEvent.ACTION_POINTER_UP); - mActionTypes.put("ACTION_UP", MotionEvent.ACTION_UP); - } - - private int parseAction(String action) { - int index = 0; - - // ACTION_POINTER_DOWN and ACTION_POINTER_UP might be followed by - // pointer index in parentheses, like ACTION_POINTER_UP(1) - int beginParen = action.indexOf("("); - if (beginParen >= 0) { - int endParen = action.indexOf(")", beginParen + 1); - index = Integer.parseInt(action.substring(beginParen + 1, endParen)); - action = action.substring(0, beginParen); - } - - return mActionTypes.get(action) | (index << MotionEvent.ACTION_POINTER_INDEX_SHIFT); - } - - private int parseInt(String value) { - if (value == null) { - return 0; - } - if (value.startsWith("0x")) { - return Integer.parseInt(value.substring(2), 16); - } - return Integer.parseInt(value); - } - - private float scaleX(float value) { - return value * mSurfaceWidth / CAPTURE_WINDOW_WIDTH; - } - - private float scaleY(float value) { - return value * mSurfaceHeight / CAPTURE_WINDOW_HEIGHT; - } - - public void replayEvents(InputStream eventDescriptions) - throws IOException, IllegalAccessException, InvocationTargetException, NoSuchMethodException - { - // As an example, a line in the input stream might look like: - // - // MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=424.41055, y[0]=825.2412, - // toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, - // edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=21972329, - // downTime=21972329, deviceId=6, source=0x1002 } - // - // These can be generated by printing out event.toString() in LayerView's - // onTouchEvent function on a phone running Ice Cream Sandwich. Different - // Android versions have different serializations of the motion event, and this - // code could probably be modified to parse other serializations if needed. - Pattern p = Pattern.compile("MotionEvent \\{ (.*?) \\}"); - Map eventProperties = new HashMap(); - - boolean firstEvent = true; - long timeDelta = 0L; - long lastEventTime = 0L; - - BufferedReader br = new BufferedReader(new InputStreamReader(eventDescriptions)); - try { - for (String eventStr = br.readLine(); eventStr != null; eventStr = br.readLine()) { - Matcher m = p.matcher(eventStr); - if (! m.find()) { - // this line doesn't have any MotionEvent data, skip it - continue; - } - - // extract the key-value pairs from the description and store them - // in the eventProperties table - StringTokenizer keyValues = new StringTokenizer(m.group(1), ","); - while (keyValues.hasMoreTokens()) { - String keyValue = keyValues.nextToken(); - String key = keyValue.substring(0, keyValue.indexOf('=')).trim(); - String value = keyValue.substring(keyValue.indexOf('=') + 1).trim(); - eventProperties.put(key, value); - } - - // set up the values we need to build the MotionEvent - long downTime = Long.parseLong(eventProperties.get("downTime")); - long eventTime = Long.parseLong(eventProperties.get("eventTime")); - int action = parseAction(eventProperties.get("action")); - float pressure = 1.0f; - float size = 1.0f; - int metaState = parseInt(eventProperties.get("metaState")); - float xPrecision = 1.0f; - float yPrecision = 1.0f; - int deviceId = 0; - int edgeFlags = parseInt(eventProperties.get("edgeFlags")); - int source = parseInt(eventProperties.get("source")); - int flags = parseInt(eventProperties.get("flags")); - - int pointerCount = parseInt(eventProperties.get("pointerCount")); - int[] pointerIds = new int[pointerCount]; - Object pointerData; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { - MotionEvent.PointerCoords[] pointerCoords = new MotionEvent.PointerCoords[pointerCount]; - for (int i = 0; i < pointerCount; i++) { - pointerIds[i] = Integer.parseInt(eventProperties.get("id[" + i + "]")); - pointerCoords[i] = new MotionEvent.PointerCoords(); - pointerCoords[i].x = mSurfaceOffsetX + scaleX(Float.parseFloat(eventProperties.get("x[" + i + "]"))); - pointerCoords[i].y = mSurfaceOffsetY + scaleY(Float.parseFloat(eventProperties.get("y[" + i + "]"))); - } - pointerData = pointerCoords; - } else { - // pre-gingerbread we have to use a hidden API to create the motion event, and we have - // to create a flattened list of floats rather than an array of PointerCoords - final int NUM_SAMPLE_DATA = 4; // MotionEvent.NUM_SAMPLE_DATA - final int SAMPLE_X = 0; // MotionEvent.SAMPLE_X - final int SAMPLE_Y = 1; // MotionEvent.SAMPLE_Y - float[] sampleData = new float[pointerCount * NUM_SAMPLE_DATA]; - for (int i = 0; i < pointerCount; i++) { - pointerIds[i] = Integer.parseInt(eventProperties.get("id[" + i + "]")); - sampleData[(i * NUM_SAMPLE_DATA) + SAMPLE_X] = - mSurfaceOffsetX + scaleX(Float.parseFloat(eventProperties.get("x[" + i + "]"))); - sampleData[(i * NUM_SAMPLE_DATA) + SAMPLE_Y] = - mSurfaceOffsetY + scaleY(Float.parseFloat(eventProperties.get("y[" + i + "]"))); - } - pointerData = sampleData; - } - - // we want to adjust the timestamps on all the generated events so that they line up with - // the time that this function is executing on-device. - long now = SystemClock.uptimeMillis(); - if (firstEvent) { - timeDelta = now - eventTime; - firstEvent = false; - } - downTime += timeDelta; - eventTime += timeDelta; - - // we also generate the events in "real-time" (i.e. have delays between events that - // correspond to the delays in the event timestamps). - if (now < eventTime) { - try { - Thread.sleep(eventTime - now); - } catch (InterruptedException ie) { - } - } - - // and finally we dispatch the event - MotionEvent event; - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD) { - event = MotionEvent.obtain(downTime, eventTime, action, pointerCount, - pointerIds, (MotionEvent.PointerCoords[])pointerData, metaState, - xPrecision, yPrecision, deviceId, edgeFlags, source, flags); - } else { - // pre-gingerbread we have to use a hidden API to accomplish this - if (mObtainNanoMethod == null) { - mObtainNanoMethod = MotionEvent.class.getMethod("obtainNano", long.class, - long.class, long.class, int.class, int.class, pointerIds.getClass(), - pointerData.getClass(), int.class, float.class, float.class, - int.class, int.class); - } - event = (MotionEvent)mObtainNanoMethod.invoke(null, downTime, eventTime, - eventTime * 1000000, action, pointerCount, pointerIds, (float[])pointerData, - metaState, xPrecision, yPrecision, deviceId, edgeFlags); - } - try { - Log.v(LOGTAG, "Injecting " + event.toString()); - mInstrumentation.sendPointerSync(event); - } finally { - event.recycle(); - event = null; - } - - eventProperties.clear(); - } - } finally { - br.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/PixelTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/PixelTest.java deleted file mode 100644 index a33ecf241..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/PixelTest.java +++ /dev/null @@ -1,117 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.PaintedSurface; - -abstract class PixelTest extends BaseTest { - private static final long PAINT_CLEAR_DELAY = 10000; // milliseconds - - protected final PaintedSurface loadAndGetPainted(String url) { - Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint(); - loadUrlAndWait(url); - verifyHomePagerHidden(); - paintExpecter.blockUntilClear(PAINT_CLEAR_DELAY); - paintExpecter.unregisterListener(); - PaintedSurface p = mDriver.getPaintedSurface(); - if (p == null) { - mAsserter.ok(p != null, "checking that painted surface loaded", - "painted surface loaded"); - } - return p; - } - - protected final void loadAndPaint(String url) { - PaintedSurface painted = loadAndGetPainted(url); - painted.close(); - } - - protected final PaintedSurface reloadAndGetPainted() { - Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint(); - - mActions.sendSpecialKey(Actions.SpecialKey.MENU); - waitForText(mStringHelper.RELOAD_LABEL); - mSolo.clickOnText(mStringHelper.RELOAD_LABEL); - - paintExpecter.blockUntilClear(PAINT_CLEAR_DELAY); - paintExpecter.unregisterListener(); - PaintedSurface p = mDriver.getPaintedSurface(); - if (p == null) { - mAsserter.ok(p != null, "checking that painted surface loaded", - "painted surface loaded"); - } - return p; - } - - protected final void reloadAndPaint() { - PaintedSurface painted = reloadAndGetPainted(); - painted.close(); - } - - protected final PaintedSurface waitForPaint(Actions.RepeatedEventExpecter expecter) { - expecter.blockUntilClear(PAINT_CLEAR_DELAY); - PaintedSurface p = mDriver.getPaintedSurface(); - if (p == null) { - mAsserter.ok(p != null, "checking that painted surface loaded", - "painted surface loaded"); - } - return p; - } - - protected final PaintedSurface waitWithNoPaint(Actions.RepeatedEventExpecter expecter) { - try { - Thread.sleep(PAINT_CLEAR_DELAY); - } catch (InterruptedException ie) { - ie.printStackTrace(); - } - mAsserter.is(expecter.eventReceived(), false, "Checking gecko didn't draw unnecessarily"); - PaintedSurface p = mDriver.getPaintedSurface(); - if (p == null) { - mAsserter.ok(p != null, "checking that painted surface loaded", - "painted surface loaded"); - } - return p; - } - - // this matches the algorithm in robocop_boxes.html - protected final int[] getBoxColorAt(int x, int y) { - int r = ((int)Math.floor(x / 3) % 256); - r = r & 0xF8; - int g = (x + y) % 256; - g = g & 0xFC; - int b = ((int)Math.floor(y / 3) % 256); - b = b & 0xF8; - return new int[] { r, g, b }; - } - - /** - * Checks the top-left corner of the visible area of the page is at (x,y) of robocop_boxes.html. - */ - protected final void checkScrollWithBoxes(PaintedSurface painted, int x, int y) { - int[] color = getBoxColorAt(x, y); - mAsserter.ispixel(painted.getPixelAt(0, 0), color[0], color[1], color[2], "Pixel at 0, 0"); - color = getBoxColorAt(x + 100, y); - mAsserter.ispixel(painted.getPixelAt(100, 0), color[0], color[1], color[2], "Pixel at 100, 0"); - color = getBoxColorAt(x, y + 100); - mAsserter.ispixel(painted.getPixelAt(0, 100), color[0], color[1], color[2], "Pixel at 0, 100"); - color = getBoxColorAt(x + 100, y + 100); - mAsserter.ispixel(painted.getPixelAt(100, 100), color[0], color[1], color[2], "Pixel at 100, 100"); - } - - /** - * Loads the robocop_boxes.html file and verifies that we are positioned at (0,0) on it. - * @param url URL of the robocop_boxes.html file. - * @return The painted surface after rendering the file. - */ - protected final void loadAndVerifyBoxes(String url) { - PaintedSurface painted = loadAndGetPainted(url); - try { - checkScrollWithBoxes(painted, 0, 0); - } finally { - painted.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/SelectionHandlerTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/SelectionHandlerTest.java deleted file mode 100644 index eb808b542..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/SelectionHandlerTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.EventDispatcher; -import org.mozilla.gecko.tests.helpers.GeckoHelper; -import org.mozilla.gecko.tests.helpers.NavigationHelper; - -import android.util.Log; - -import org.json.JSONObject; - -/** - * A base test class for selection handler tests. - */ -abstract class SelectionHandlerTest extends UITest { - private static final String geckoEventString = "Robocop:testSelectionHandler"; - private final String url; - - public SelectionHandlerTest(String url) { - this.url = url; - } - - public void testSelection() { - GeckoHelper.blockForReady(); - - Actions.EventExpecter robocopTestExpecter = getActions().expectGeckoEvent(geckoEventString); - NavigationHelper.enterAndLoadUrl(url); - mToolbar.assertTitle(url); - - while (!test(robocopTestExpecter)) { - // do nothing - } - - robocopTestExpecter.unregisterListener(); - } - - protected boolean test(Actions.EventExpecter expecter) { - final JSONObject eventData; - try { - eventData = new JSONObject(expecter.blockForEventData()); - } catch(Exception ex) { - // Log and ignore - getAsserter().ok(false, "JS Test", "Error decoding data " + ex); - return false; - } - - if (eventData.has("result")) { - getAsserter().ok(eventData.optBoolean("result"), "JS Test", eventData.optString("msg")); - } else if (eventData.has("todo")) { - getAsserter().todo(eventData.optBoolean("todo"), "JS TODO", eventData.optString("msg")); - } - - EventDispatcher.sendResponse(eventData, new JSONObject()); - return eventData.optBoolean("done", false); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/SessionTest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/SessionTest.java deleted file mode 100644 index e07a9750c..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/SessionTest.java +++ /dev/null @@ -1,407 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Assert; -import org.mozilla.gecko.FennecMochitestAssert; - -public abstract class SessionTest extends BaseTest { - protected Navigation mNavigation; - - @Override - public void setUp() throws Exception { - super.setUp(); - - mNavigation = new Navigation(mDevice); - } - - /** - * A generic session object representing a collection of items that has a - * selected index. - */ - protected abstract class SessionObject { - private final int mIndex; - private final T[] mItems; - - public SessionObject(int index, T... items) { - mIndex = index; - mItems = items; - } - - public int getIndex() { - return mIndex; - } - - public T[] getItems() { - return mItems; - } - } - - protected class PageInfo { - private final String url; - private final String title; - - public PageInfo(String key) { - if (key.startsWith("about:")) { - url = key; - } else { - url = getPage(key); - } - title = key; - } - } - - protected class SessionTab extends SessionObject { - public SessionTab(int index, PageInfo... items) { - super(index, items); - } - } - - protected class Session extends SessionObject { - public Session(int index, SessionTab... items) { - super(index, items); - } - } - - /** - * Walker for visiting items in a browser-like navigation order. - */ - protected abstract class NavigationWalker { - private final T[] mItems; - private final int mIndex; - - public NavigationWalker(SessionObject obj) { - mItems = obj.getItems(); - mIndex = obj.getIndex(); - } - - /** - * Walks over the list of items, calling the onItem() callback for each. - * - * The selected item is the first item visited. Each item after the - * selected item is then visited in ascending index order. Finally, the - * list is iterated in reverse, and each item before the selected item - * is visited in descending index order. - */ - public void walk() { - onItem(mItems[mIndex], mIndex); - for (int i = mIndex + 1; i < mItems.length; i++) { - goForward(); - onItem(mItems[i], i); - } - if (mIndex > 0) { - for (int i = mItems.length - 2; i >= 0; i--) { - goBack(); - if (i < mIndex) { - onItem(mItems[i], i); - } - } - } - } - - /** - * Callback when an item is visited during a walk. - * - * Only one callback is executed per item. - */ - public abstract void onItem(T item, int currentIndex); - - /** - * Callback executed for each back step of the walk. - */ - public void goBack() {} - - /** - * Callback executed for each forward step of the walk. - */ - public void goForward() {} - } - - /** - * Loads a set of tabs in the browser specified by the given session. - * - * @param session Session to load - */ - protected void loadSessionTabs(Session session) { - // Verify initial about:home tab - verifyTabCount(1); - verifyUrl(mStringHelper.ABOUT_HOME_URL); - - SessionTab[] tabs = session.getItems(); - for (int i = 0; i < tabs.length; i++) { - final SessionTab tab = tabs[i]; - final PageInfo[] pages = tab.getItems(); - - // New tabs always start with about:home, so make sure about:home - // is always the first entry. - mAsserter.is(pages[0].url, mStringHelper.ABOUT_HOME_URL, "first page in tab is " + - mStringHelper.ABOUT_HOME_URL); - - // If this is the first tab, the tab already exists, so no need to - // create a new one. Otherwise, create a new tab if we're loading - // the first the first page in the set. - if (i > 0) { - addTab(); - } - - for (int j = 1; j < pages.length; j++) { - Actions.EventExpecter pageShowExpecter = mActions.expectGeckoEvent("Content:PageShow"); - - loadUrl(pages[j].url); - - pageShowExpecter.blockForEvent(); - pageShowExpecter.unregisterListener(); - } - - final int index = tab.getIndex(); - for (int j = pages.length - 1; j > index; j--) { - mNavigation.back(); - } - } - - selectTabAt(session.getIndex()); - } - - /** - * Verifies that the set of open tabs matches the given session. - * - * @param session Session to verify - */ - protected void verifySessionTabs(Session session) { - verifyTabCount(session.getItems().length); - - (new NavigationWalker(session) { - boolean mFirstTabVisited; - - @Override - public void onItem(SessionTab tab, int currentIndex) { - // The first tab to check should already be selected at startup - if (mFirstTabVisited) { - selectTabAt(currentIndex); - } else { - mFirstTabVisited = true; - } - - (new NavigationWalker(tab) { - @Override - public void onItem(PageInfo page, int currentIndex) { - final String text; - if (mStringHelper.ABOUT_HOME_URL.equals(page.url)) { - text = mStringHelper.TITLE_PLACE_HOLDER; - } else if (page.url.startsWith(URL_HTTP_PREFIX)) { - text = page.url.substring(URL_HTTP_PREFIX.length()); - } else { - text = page.url; - } - waitForText(text); - - verifyUrlBarTitle(page.url); - } - - @Override - public void goBack() { - mNavigation.back(); - } - - @Override - public void goForward() { - mNavigation.forward(); - } - }).walk(); - } - }).walk(); - } - - /** - * Gets session restore JSON corresponding to the open session. - * - * The JSON format follows the format used in Gecko for session restore and - * should be interchangeable with the Gecko's generated sessionstore.js. - * - * @param session Session to serialize - * @return JSON string of session - */ - protected String buildSessionJSON(Session session) { - final SessionTab[] sessionTabs = session.getItems(); - String sessionString = null; - - try { - final JSONArray tabs = new JSONArray(); - - for (int i = 0; i < sessionTabs.length; i++) { - final JSONObject tab = new JSONObject(); - final JSONArray entries = new JSONArray(); - final SessionTab sessionTab = sessionTabs[i]; - final PageInfo[] pages = sessionTab.getItems(); - - for (int j = 0; j < pages.length; j++) { - final PageInfo page = pages[j]; - final JSONObject entry = new JSONObject(); - entry.put("url", page.url); - entry.put("title", page.title); - entries.put(entry); - } - - tab.put("entries", entries); - tab.put("index", sessionTab.getIndex() + 1); - tabs.put(tab); - } - - JSONObject window = new JSONObject(); - window.put("tabs", tabs); - window.put("selected", session.getIndex() + 1); - sessionString = new JSONObject().put("windows", new JSONArray().put(window)).toString(); - } catch (JSONException e) { - mAsserter.ok(false, "JSON exception", getStackTraceString(e)); - } - - return sessionString; - } - - /** - * @see SessionTest#verifySessionJSON(Session, String, Assert) - */ - protected void verifySessionJSON(Session session, String sessionString) { - verifySessionJSON(session, sessionString, mAsserter); - } - - /** - * Verifies a session JSON string against the given session. - * - * @param session Session to verify against - * @param sessionString JSON string to verify - * @param asserter Assert class to use during verification - */ - protected void verifySessionJSON(Session session, String sessionString, Assert asserter) { - final SessionTab[] sessionTabs = session.getItems(); - - try { - final JSONObject window = new JSONObject(sessionString).getJSONArray("windows").getJSONObject(0); - final JSONArray tabs = window.getJSONArray("tabs"); - final int optSelected = window.optInt("selected", -1); - - asserter.is(optSelected, session.getIndex() + 1, "selected tab matches"); - - for (int i = 0; i < tabs.length(); i++) { - final JSONObject tab = tabs.getJSONObject(i); - final int index = tab.getInt("index"); - final JSONArray entries = tab.getJSONArray("entries"); - final SessionTab sessionTab = sessionTabs[i]; - final PageInfo[] pages = sessionTab.getItems(); - - asserter.is(index, sessionTab.getIndex() + 1, "selected page index matches"); - - for (int j = 0; j < entries.length(); j++) { - final JSONObject entry = entries.getJSONObject(j); - final String url = entry.getString("url"); - final String title = entry.optString("title"); - final PageInfo page = pages[j]; - - asserter.is(url, page.url, "URL in JSON matches session URL"); - if (!page.url.startsWith("about:")) { - asserter.is(title, page.title, "title in JSON matches session title"); - } - } - } - } catch (JSONException e) { - asserter.ok(false, "JSON exception", getStackTraceString(e)); - } - } - - /** - * Exception thrown by NonFatalAsserter for assertion failures. - */ - public static class AssertException extends RuntimeException { - public AssertException(String msg) { - super(msg); - } - } - - /** - * Asserter that throws an AssertException on failure instead of aborting - * the test. - * - * This can be used in methods called via waitForCondition() where an assertion - * might not immediately succeed. - */ - public class NonFatalAsserter extends FennecMochitestAssert { - @Override - public void ok(boolean condition, String name, String diag) { - if (!condition) { - String details = (diag == null ? "" : " | " + diag); - throw new AssertException("Assertion failed: " + name + details); - } - mAsserter.ok(condition, name, diag); - } - } - - /** - * Gets a URL for a dynamically-generated page. - * - * The page will have a URL unique to the given ID, and the page's title - * will match the given ID. - * - * @param id ID used to generate page URL - * @return URL of the page - */ - protected String getPage(String id) { - return getAbsoluteUrl("/robocop/robocop_dynamic.sjs?id=" + id); - } - - protected String readProfileFile(String filename) { - try { - return readFile(new File(mProfile, filename)); - } catch (IOException e) { - mAsserter.ok(false, "Error reading" + filename, getStackTraceString(e)); - } - return null; - } - - protected void writeProfileFile(String filename, String data) { - try { - writeFile(new File(mProfile, filename), data); - } catch (IOException e) { - mAsserter.ok(false, "Error writing to " + filename, getStackTraceString(e)); - } - } - - private String readFile(File target) throws IOException { - if (!target.exists()) { - return null; - } - - FileReader fr = new FileReader(target); - try { - StringBuffer sb = new StringBuffer(); - char[] buf = new char[8192]; - int read = fr.read(buf); - while (read >= 0) { - sb.append(buf, 0, read); - read = fr.read(buf); - } - return sb.toString(); - } finally { - fr.close(); - } - } - - private void writeFile(File target, String data) throws IOException { - FileWriter writer = new FileWriter(target); - try { - writer.write(data); - } finally { - writer.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/StringHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/StringHelper.java deleted file mode 100644 index 6f5db560d..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/StringHelper.java +++ /dev/null @@ -1,401 +0,0 @@ -/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.content.res.Resources; - -import org.mozilla.gecko.R; - -public class StringHelper { - private static StringHelper instance; - - // This needs to be accessed statically, before an instance of StringHelper can be created. - public static String STATIC_ABOUT_HOME_URL = "about:home"; - - public final String OK; - public final String CANCEL; - public final String CLEAR; - - // Note: DEFAULT_BOOKMARKS_TITLES.length == DEFAULT_BOOKMARKS_URLS.length - public final String[] DEFAULT_BOOKMARKS_TITLES; - public final String[] DEFAULT_BOOKMARKS_URLS; - public final int DEFAULT_BOOKMARKS_COUNT; - - // About pages - public final String ABOUT_BLANK_URL = "about:blank"; - public final String ABOUT_FIREFOX_URL; - public final String ABOUT_HOME_URL = "about:home"; - public final String ABOUT_ADDONS_URL = "about:addons"; - public final String ABOUT_SCHEME = "about:"; - - // About pages' titles - public final String ABOUT_HOME_TITLE = ""; - - // Context Menu item strings - public final String CONTEXT_MENU_BOOKMARK_LINK = "Bookmark Link"; - public final String CONTEXT_MENU_OPEN_LINK_IN_NEW_TAB = "Open Link in New Tab"; - public final String CONTEXT_MENU_OPEN_IN_NEW_TAB; - public final String CONTEXT_MENU_OPEN_LINK_IN_PRIVATE_TAB = "Open Link in Private Tab"; - public final String CONTEXT_MENU_OPEN_IN_PRIVATE_TAB; - public final String CONTEXT_MENU_COPY_LINK = "Copy Link"; - public final String CONTEXT_MENU_SHARE_LINK = "Share Link"; - public final String CONTEXT_MENU_EDIT; - public final String CONTEXT_MENU_SHARE; - public final String CONTEXT_MENU_REMOVE; - public final String CONTEXT_MENU_COPY_ADDRESS; - public final String CONTEXT_MENU_EDIT_SITE_SETTINGS; - public final String CONTEXT_MENU_SITE_SETTINGS_SAVE_PASSWORD = "Save Password"; - public final String CONTEXT_MENU_ADD_TO_HOME_SCREEN; - public final String CONTEXT_MENU_PIN_SITE; - public final String CONTEXT_MENU_UNPIN_SITE; - - // Context Menu menu items - public final String[] CONTEXT_MENU_ITEMS_IN_PRIVATE_TAB; - - public final String[] CONTEXT_MENU_ITEMS_IN_NORMAL_TAB; - - public final String[] BOOKMARK_CONTEXT_MENU_ITEMS; - - public final String[] CONTEXT_MENU_ITEMS_IN_URL_BAR; - - public final String TITLE_PLACE_HOLDER; - - // Robocop page urls - // Note: please use getAbsoluteUrl(String url) on each robocop url to get the correct url - public final String ROBOCOP_BIG_LINK_URL = "/robocop/robocop_big_link.html"; - public final String ROBOCOP_BIG_MAILTO_URL = "/robocop/robocop_big_mailto.html"; - public final String ROBOCOP_BLANK_PAGE_01_URL = "/robocop/robocop_blank_01.html"; - public final String ROBOCOP_BLANK_PAGE_02_URL = "/robocop/robocop_blank_02.html"; - public final String ROBOCOP_BLANK_PAGE_03_URL = "/robocop/robocop_blank_03.html"; - public final String ROBOCOP_BLANK_PAGE_04_URL = "/robocop/robocop_blank_04.html"; - public final String ROBOCOP_BLANK_PAGE_05_URL = "/robocop/robocop_blank_05.html"; - public final String ROBOCOP_BOXES_URL = "/robocop/robocop_boxes.html"; - public final String ROBOCOP_GEOLOCATION_URL = "/robocop/robocop_geolocation.html"; - public final String ROBOCOP_LOGIN_01_URL= "/robocop/robocop_login_01.html"; - public final String ROBOCOP_LOGIN_02_URL= "/robocop/robocop_login_02.html"; - public final String ROBOCOP_POPUP_URL = "/robocop/robocop_popup.html"; - public final String ROBOCOP_OFFLINE_STORAGE_URL = "/robocop/robocop_offline_storage.html"; - public final String ROBOCOP_PICTURE_LINK_URL = "/robocop/robocop_picture_link.html"; - public final String ROBOCOP_SEARCH_URL = "/robocop/robocop_search.html"; - public final String ROBOCOP_TEXT_PAGE_URL = "/robocop/robocop_text_page.html"; - public final String ROBOCOP_ADOBE_FLASH_URL = "/robocop/robocop_adobe_flash.html"; - public final String ROBOCOP_INPUT_URL = "/robocop/robocop_input.html"; - public final String ROBOCOP_READER_MODE_BASIC_ARTICLE = "/robocop/reader_mode_pages/basic_article.html"; - public final String ROBOCOP_LINK_TO_SLOW_LOADING = "/robocop/robocop_link_to_slow_loading.html"; - - private final String ROBOCOP_JS_HARNESS_URL = "/robocop/robocop_javascript.html"; - - // Robocop page images - public final String ROBOCOP_PICTURE_URL = "/robocop/Firefox.jpg"; - - // Robocop page titles - public final String ROBOCOP_BIG_LINK_TITLE = "Big Link"; - public final String ROBOCOP_BIG_MAILTO_TITLE = "Big Mailto"; - public final String ROBOCOP_BLANK_PAGE_01_TITLE = "Browser Blank Page 01"; - public final String ROBOCOP_BLANK_PAGE_02_TITLE = "Browser Blank Page 02"; - public final String ROBOCOP_GEOLOCATION_TITLE = "Geolocation Test Page"; - public final String ROBOCOP_PICTURE_LINK_TITLE = "Picture Link"; - public final String ROBOCOP_SEARCH_TITLE = "Robocop Search Engine"; - - // Distribution tile labels - public final String DISTRIBUTION1_LABEL = "Distribution 1"; - public final String DISTRIBUTION2_LABEL = "Distribution 2"; - - // Settings menu strings - public final String PRIVACY_SECTION_LABEL; - public final String MOZILLA_SECTION_LABEL; - - // Mozilla - public final String BRAND_NAME = "(Fennec|Nightly|Firefox Aurora|Firefox Beta|Firefox)"; - public final String ABOUT_LABEL = "About " + BRAND_NAME ; - public final String LOCATION_SERVICES_LABEL = "Mozilla Location Service"; - - // Labels for the about:home tabs - public final String HISTORY_LABEL; - public final String TOP_SITES_LABEL; - public final String BOOKMARKS_LABEL; - public final String TODAY_LABEL; - - // Desktop default bookmarks folders - public final String BOOKMARKS_UP_TO; - public final String BOOKMARKS_ROOT_LABEL; - public final String DESKTOP_FOLDER_LABEL; - public final String TOOLBAR_FOLDER_LABEL; - public final String BOOKMARKS_MENU_FOLDER_LABEL; - public final String UNSORTED_FOLDER_LABEL; - - // Menu items - some of the items are found only on android 2.3 and lower and some only on android 3.0+ - public final String NEW_TAB_LABEL; - public final String NEW_PRIVATE_TAB_LABEL; - public final String SHARE_LABEL; - public final String FIND_IN_PAGE_LABEL; - public final String DESKTOP_SITE_LABEL; - public final String PDF_LABEL; - public final String DOWNLOADS_LABEL; - public final String ADDONS_LABEL; - public final String LOGINS_LABEL; - public final String SETTINGS_LABEL; - public final String GUEST_MODE_LABEL; - public final String TAB_QUEUE_LABEL; - public final String TAB_QUEUE_SUMMARY; - - // Android 3.0+ - public final String TOOLS_LABEL; - public final String PAGE_LABEL; - - // Android 2.3 and lower only - public final String MORE_LABEL = "More"; - public final String RELOAD_LABEL; - public final String FORWARD_LABEL; - public final String BOOKMARK_LABEL; - - // Bookmark Toast Notification - public final String BOOKMARK_ADDED_LABEL; - public final String BOOKMARK_REMOVED_LABEL; - public final String BOOKMARK_UPDATED_LABEL; - public final String BOOKMARK_OPTIONS_LABEL; - - // Edit Bookmark screen - public final String EDIT_BOOKMARK; - - // Strings used in doorhanger messages and buttons - public final String GEO_MESSAGE = "Share your location with"; - public final String GEO_ALLOW; - public final String GEO_DENY = "Don't share"; - - public final String OFFLINE_MESSAGE = "to store data on your device for offline use"; - public final String OFFLINE_ALLOW = "Allow"; - public final String OFFLINE_DENY = "Don't allow"; - - public final String LOGIN_MESSAGE = "Would you like " + BRAND_NAME + " to remember this login?"; - public final String LOGIN_ALLOW = "Remember"; - public final String LOGIN_DENY = "Never"; - - public final String POPUP_MESSAGE = "prevented this site from opening"; - public final String POPUP_ALLOW; - public final String POPUP_DENY = "Don't show"; - - // Strings used as content description, e.g. for ImageButtons - public final String CONTENT_DESCRIPTION_READER_MODE_BUTTON = "Enter Reader View"; - - // Home Panel Settings - public final String CUSTOMIZE_HOME; - public final String ENABLED; - public final String HISTORY; - public final String PANELS; - - // Search Settings - public final String SEARCH_TITLE; - public final String SEARCH_SUGGESTIONS; - public final String SEARCH_INSTALLED; - - // Advanced Settings - public final String ADVANCED; - public final String DONT_SHOW_MENU; - public final String SHOW_MENU; - public final String DISABLED; - public final String TAP_TO_PLAY; - public final String HIDE_TITLE_BAR; - - // Update Settings - public final String AUTOMATIC_UPDATES; - public final String OVER_WIFI_OPTION; - public final String DOWNLOAD_UPDATES_AUTO; - public final String ALWAYS; - public final String NEVER; - - // Restore Tabs Settings - public final String DONT_RESTORE_TABS; - public final String ALWAYS_RESTORE_TABS; - public final String DONT_RESTORE_QUIT; - - private StringHelper(final Resources res) { - - OK = res.getString(R.string.button_ok); - CANCEL = res.getString(R.string.button_cancel); - CLEAR = res.getString(R.string.button_clear); - - // Note: DEFAULT_BOOKMARKS_TITLES.length == DEFAULT_BOOKMARKS_URLS.length - DEFAULT_BOOKMARKS_TITLES = new String[] { - res.getString(R.string.bookmarkdefaults_title_aboutfirefox), - res.getString(R.string.bookmarkdefaults_title_support), - res.getString(R.string.bookmarkdefaults_title_addons) - }; - DEFAULT_BOOKMARKS_URLS = new String[] { - res.getString(R.string.bookmarkdefaults_url_aboutfirefox), - res.getString(R.string.bookmarkdefaults_url_support), - res.getString(R.string.bookmarkdefaults_url_addons) - }; - DEFAULT_BOOKMARKS_COUNT = DEFAULT_BOOKMARKS_TITLES.length; - - // About pages - ABOUT_FIREFOX_URL = res.getString(R.string.bookmarkdefaults_url_aboutfirefox); - - // Context Menu item strings - CONTEXT_MENU_OPEN_IN_NEW_TAB = res.getString(R.string.contextmenu_open_new_tab); - CONTEXT_MENU_OPEN_IN_PRIVATE_TAB = res.getString(R.string.contextmenu_open_private_tab); - CONTEXT_MENU_EDIT = res.getString(R.string.contextmenu_top_sites_edit); - CONTEXT_MENU_SHARE = res.getString(R.string.contextmenu_share); - CONTEXT_MENU_REMOVE = res.getString(R.string.contextmenu_remove); - CONTEXT_MENU_COPY_ADDRESS = res.getString(R.string.contextmenu_copyurl); - CONTEXT_MENU_EDIT_SITE_SETTINGS = res.getString(R.string.contextmenu_site_settings); - CONTEXT_MENU_ADD_TO_HOME_SCREEN = res.getString(R.string.contextmenu_add_to_launcher); - CONTEXT_MENU_PIN_SITE = res.getString(R.string.contextmenu_top_sites_pin); - CONTEXT_MENU_UNPIN_SITE = res.getString(R.string.contextmenu_top_sites_unpin); - - // Context Menu menu items - CONTEXT_MENU_ITEMS_IN_PRIVATE_TAB = new String[] { - CONTEXT_MENU_OPEN_LINK_IN_PRIVATE_TAB, - CONTEXT_MENU_COPY_LINK, - CONTEXT_MENU_SHARE_LINK, - CONTEXT_MENU_BOOKMARK_LINK - }; - - CONTEXT_MENU_ITEMS_IN_NORMAL_TAB = new String[] { - CONTEXT_MENU_OPEN_LINK_IN_NEW_TAB, - CONTEXT_MENU_OPEN_LINK_IN_PRIVATE_TAB, - CONTEXT_MENU_COPY_LINK, - CONTEXT_MENU_SHARE_LINK, - CONTEXT_MENU_BOOKMARK_LINK - }; - - BOOKMARK_CONTEXT_MENU_ITEMS = new String[] { - CONTEXT_MENU_OPEN_IN_NEW_TAB, - CONTEXT_MENU_OPEN_IN_PRIVATE_TAB, - CONTEXT_MENU_COPY_ADDRESS, - CONTEXT_MENU_SHARE, - CONTEXT_MENU_EDIT, - CONTEXT_MENU_REMOVE, - CONTEXT_MENU_ADD_TO_HOME_SCREEN - }; - - CONTEXT_MENU_ITEMS_IN_URL_BAR = new String[] { - CONTEXT_MENU_SHARE, - CONTEXT_MENU_COPY_ADDRESS, - CONTEXT_MENU_EDIT_SITE_SETTINGS, - CONTEXT_MENU_ADD_TO_HOME_SCREEN - }; - - TITLE_PLACE_HOLDER = res.getString(R.string.url_bar_default_text); - - // Settings menu strings - PRIVACY_SECTION_LABEL = res.getString(R.string.pref_category_privacy_short); - MOZILLA_SECTION_LABEL = res.getString(R.string.pref_category_vendor); - - // Labels for the about:home tabs - HISTORY_LABEL = res.getString(R.string.home_history_title); - TOP_SITES_LABEL = res.getString(R.string.home_top_sites_title); - BOOKMARKS_LABEL = res.getString(R.string.bookmarks_title); - TODAY_LABEL = res.getString(R.string.history_today_section); - - BOOKMARKS_UP_TO = res.getString(R.string.home_move_back_to_filter); - BOOKMARKS_ROOT_LABEL = res.getString(R.string.bookmarks_title); - DESKTOP_FOLDER_LABEL = res.getString(R.string.bookmarks_folder_desktop); - TOOLBAR_FOLDER_LABEL = res.getString(R.string.bookmarks_folder_toolbar); - BOOKMARKS_MENU_FOLDER_LABEL = res.getString(R.string.bookmarks_folder_menu); - UNSORTED_FOLDER_LABEL = res.getString(R.string.bookmarks_folder_unfiled); - - // Menu items - some of the items are found only on android 2.3 and lower and some only on android 3.0+ - NEW_TAB_LABEL = res.getString(R.string.new_tab); - NEW_PRIVATE_TAB_LABEL = res.getString(R.string.new_private_tab); - SHARE_LABEL = res.getString(R.string.share); - FIND_IN_PAGE_LABEL = res.getString(R.string.find_in_page); - DESKTOP_SITE_LABEL = res.getString(R.string.desktop_mode); - PDF_LABEL = res.getString(R.string.save_as_pdf); - DOWNLOADS_LABEL = res.getString(R.string.downloads); - ADDONS_LABEL = res.getString(R.string.addons); - LOGINS_LABEL = res.getString(R.string.logins); - SETTINGS_LABEL = res.getString(R.string.settings); - GUEST_MODE_LABEL = res.getString(R.string.new_guest_session); - TAB_QUEUE_LABEL = res.getString(R.string.pref_tab_queue_title); - TAB_QUEUE_SUMMARY = res.getString(R.string.pref_tab_queue_summary); - - // Android 3.0+ - TOOLS_LABEL = res.getString(R.string.tools); - PAGE_LABEL = res.getString(R.string.page); - - // Android 2.3 and lower only - RELOAD_LABEL = res.getString(R.string.reload); - FORWARD_LABEL = res.getString(R.string.forward); - BOOKMARK_LABEL = res.getString(R.string.bookmark); - - // Bookmark Toast Notification - BOOKMARK_ADDED_LABEL = res.getString(R.string.bookmark_added); - BOOKMARK_REMOVED_LABEL = res.getString(R.string.bookmark_removed); - BOOKMARK_UPDATED_LABEL = res.getString(R.string.bookmark_updated); - BOOKMARK_OPTIONS_LABEL = res.getString(R.string.bookmark_options); - - // Edit Bookmark screen - EDIT_BOOKMARK = res.getString(R.string.bookmark_edit_title); - - // Strings used in doorhanger messages and buttons - GEO_ALLOW = res.getString(R.string.share); - - POPUP_ALLOW = res.getString(R.string.pref_panels_show); - - // Home Settings - PANELS = res.getString(R.string.pref_category_home_panels); - CUSTOMIZE_HOME = res.getString(R.string.pref_category_home); - ENABLED = res.getString(R.string.pref_home_updates_enabled); - HISTORY = res.getString(R.string.home_history_title); - - // Search Settings - SEARCH_TITLE = res.getString(R.string.search); - SEARCH_SUGGESTIONS = res.getString(R.string.pref_search_suggestions); - SEARCH_INSTALLED = res.getString(R.string.pref_category_installed_search_engines); - - // Advanced Settings - ADVANCED = res.getString(R.string.pref_category_advanced); - DONT_SHOW_MENU = res.getString(R.string.pref_char_encoding_off); - SHOW_MENU = res.getString(R.string.pref_char_encoding_on); - DISABLED = res.getString(R.string.pref_plugins_disabled ); - TAP_TO_PLAY = res.getString(R.string.pref_plugins_tap_to_play); - HIDE_TITLE_BAR = res.getString(R.string.pref_scroll_title_bar_summary ); - - // Update Settings - AUTOMATIC_UPDATES = res.getString(R.string.pref_home_updates); - OVER_WIFI_OPTION = res.getString(R.string.pref_update_autodownload_wifi); - DOWNLOAD_UPDATES_AUTO = res.getString(R.string.pref_update_autodownload); - ALWAYS = res.getString(R.string.pref_update_autodownload_enabled); - NEVER = res.getString(R.string.pref_update_autodownload_disabled); - - // Restore Tabs Settings - DONT_RESTORE_TABS = res.getString(R.string.pref_restore_quit); - ALWAYS_RESTORE_TABS = res.getString(R.string.pref_restore_always); - DONT_RESTORE_QUIT = res.getString(R.string.pref_restore_quit); - } - - public static void initialize(Resources res) { - if (instance != null) { - throw new IllegalStateException(StringHelper.class.getSimpleName() + " already Initialized"); - } - instance = new StringHelper(res); - } - - public static StringHelper get() { - if (instance == null) { - throw new IllegalStateException(StringHelper.class.getSimpleName() + " instance is not yet initialized. Use StringHelper.initialize(Resources) first."); - } - return instance; - } - - /** - * Build a URL for loading a Javascript file in the Robocop Javascript - * harness. - *

          - * We append a random slug to avoid caching: see - * https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache. - * - * @param javascriptUrl to load. - * @return URL with harness wrapper. - */ - public String getHarnessUrlForJavascript(String javascriptUrl) { - // We include a slug to make sure we never cache the harness. - return ROBOCOP_JS_HARNESS_URL + - "?slug=" + System.currentTimeMillis() + - "&path=" + javascriptUrl; - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITest.java deleted file mode 100644 index da952b5cb..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITest.java +++ /dev/null @@ -1,203 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Assert; -import org.mozilla.gecko.Driver; -import org.mozilla.gecko.tests.components.AboutHomeComponent; -import org.mozilla.gecko.tests.components.AppMenuComponent; -import org.mozilla.gecko.tests.components.BaseComponent; -import org.mozilla.gecko.tests.components.GeckoViewComponent; -import org.mozilla.gecko.tests.components.TabStripComponent; -import org.mozilla.gecko.tests.components.ToolbarComponent; -import org.mozilla.gecko.tests.helpers.HelperInitializer; - -import com.robotium.solo.Solo; - -/** - * A base test class for Robocop (UI-centric) tests. This and the related classes attempt to - * provide a framework to improve upon the issues discovered with the previous BaseTest - * implementation by providing simple test authorship and framework extension, consistency, - * and reliability. - * - * For documentation on writing tests and extending the framework, see - * https://wiki.mozilla.org/Mobile/Fennec/Android/UITest - */ -abstract class UITest extends BaseRobocopTest - implements UITestContext { - - private static final String JUNIT_FAILURE_MSG = "A JUnit method was called. Make sure " + - "you are using AssertionHelper to make assertions. Try `fAssert*(...);`"; - - protected AboutHomeComponent mAboutHome; - protected AppMenuComponent mAppMenu; - protected GeckoViewComponent mGeckoView; - protected TabStripComponent mTabStrip; - protected ToolbarComponent mToolbar; - - @Override - protected void setUp() throws Exception { - super.setUp(); - - // Helpers depend on components so initialize them first. - initComponents(); - initHelpers(); - - // Ensure Robocop tests have access to network, and are run with Display powered on. - throwIfHttpGetFails(); - throwIfScreenNotOn(); - } - - private void initComponents() { - mAboutHome = new AboutHomeComponent(this); - mAppMenu = new AppMenuComponent(this); - mGeckoView = new GeckoViewComponent(this); - mTabStrip = new TabStripComponent(this); - mToolbar = new ToolbarComponent(this); - } - - private void initHelpers() { - HelperInitializer.init(this); - } - - @Override - public Solo getSolo() { - return mSolo; - } - - @Override - public Assert getAsserter() { - return mAsserter; - } - - @Override - public Driver getDriver() { - return mDriver; - } - - @Override - public Actions getActions() { - return mActions; - } - - @Override - public StringHelper getStringHelper() { - return mStringHelper; - } - - @Override - public void dumpLog(final String logtag, final String message) { - mAsserter.dumpLog(logtag + ": " + message); - } - - @Override - public void dumpLog(final String logtag, final String message, final Throwable t) { - mAsserter.dumpLog(logtag + ": " + message, t); - } - - @Override - public BaseComponent getComponent(final ComponentType type) { - switch (type) { - case ABOUTHOME: - return mAboutHome; - - case APPMENU: - return mAppMenu; - - case GECKOVIEW: - return mGeckoView; - - case TOOLBAR: - return mToolbar; - - default: - fail("Unknown component type, " + type + "."); - return null; // Should not reach this statement but required by javac. - } - } - - /** - * Returns the test type. By default this returns MOCHITEST, but tests can override this - * method in order to change the type of the test. - */ - @Override - protected Type getTestType() { - return Type.MOCHITEST; - } - - @Override - public String getAbsoluteHostnameUrl(final String url) { - return getAbsoluteUrl(mBaseHostnameUrl, url); - } - - @Override - public String getAbsoluteIpUrl(final String url) { - return getAbsoluteUrl(mBaseIpUrl, url); - } - - private String getAbsoluteUrl(final String baseUrl, final String url) { - return baseUrl + "/" + url.replaceAll("(^/)", ""); - } - - /** - * Throws an Exception. Called from overridden JUnit methods to ensure JUnit assertions - * are not accidentally used over AssertionHelper assertions (the latter of which contains - * additional logging facilities for use in our test harnesses). - */ - private static void junit() { - throw new UnsupportedOperationException(JUNIT_FAILURE_MSG); - } - - // Note: inexplicably, javac does not think we're overriding these methods, - // so we can't use the @Override annotation. - public static void assertEquals(short e, short a) { junit(); } - public static void assertEquals(String m, int e, int a) { junit(); } - public static void assertEquals(String m, short e, short a) { junit(); } - public static void assertEquals(char e, char a) { junit(); } - public static void assertEquals(String m, String e, String a) { junit(); } - public static void assertEquals(int e, int a) { junit(); } - public static void assertEquals(String m, double e, double a, double delta) { junit(); } - public static void assertEquals(String m, long e, long a) { junit(); } - public static void assertEquals(byte e, byte a) { junit(); } - public static void assertEquals(Object e, Object a) { junit(); } - public static void assertEquals(boolean e, boolean a) { junit(); } - public static void assertEquals(String m, float e, float a, float delta) { junit(); } - public static void assertEquals(String m, boolean e, boolean a) { junit(); } - public static void assertEquals(String e, String a) { junit(); } - public static void assertEquals(float e, float a, float delta) { junit(); } - public static void assertEquals(String m, byte e, byte a) { junit(); } - public static void assertEquals(double e, double a, double delta) { junit(); } - public static void assertEquals(String m, char e, char a) { junit(); } - public static void assertEquals(String m, Object e, Object a) { junit(); } - public static void assertEquals(long e, long a) { junit(); } - - public static void assertFalse(String m, boolean c) { junit(); } - public static void assertFalse(boolean c) { junit(); } - - public static void assertNotNull(String m, Object o) { junit(); } - public static void assertNotNull(Object o) { junit(); } - - public static void assertNotSame(Object e, Object a) { junit(); } - public static void assertNotSame(String m, Object e, Object a) { junit(); } - - public static void assertNull(Object o) { junit(); } - public static void assertNull(String m, Object o) { junit(); } - - public static void assertSame(Object e, Object a) { junit(); } - public static void assertSame(String m, Object e, Object a) { junit(); } - - public static void assertTrue(String m, boolean c) { junit(); } - public static void assertTrue(boolean c) { junit(); } - - public static void fail(String m) { junit(); } - public static void fail() { junit(); } - - public static void failNotEquals(String m, Object e, Object a) { junit(); } - public static void failNotSame(String m, Object e, Object a) { junit(); } - public static void failSame(String m) { junit(); } - - public static String format(String m, Object e, Object a) { junit(); return null; } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITestContext.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITestContext.java deleted file mode 100644 index c825a20a4..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/UITestContext.java +++ /dev/null @@ -1,51 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Assert; -import org.mozilla.gecko.Driver; -import org.mozilla.gecko.tests.components.BaseComponent; - -import android.app.Activity; -import android.app.Instrumentation; - -import com.robotium.solo.Solo; - -/** - * Interface to the global information about a UITest environment. - */ -public interface UITestContext { - - public static enum ComponentType { - ABOUTHOME, - APPMENU, - GECKOVIEW, - TOOLBAR - } - - public Activity getActivity(); - public Solo getSolo(); - public Assert getAsserter(); - public Driver getDriver(); - public Actions getActions(); - public Instrumentation getInstrumentation(); - public StringHelper getStringHelper(); - - public void dumpLog(final String logtag, final String message); - public void dumpLog(final String logtag, final String message, final Throwable t); - - /** - * Returns the absolute version of the given URL using the host's hostname. - */ - public String getAbsoluteHostnameUrl(final String url); - - /** - * Returns the absolute version of the given URL using the host's IP address. - */ - public String getAbsoluteIpUrl(final String url); - - public BaseComponent getComponent(final ComponentType type); -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AboutHomeComponent.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AboutHomeComponent.java deleted file mode 100644 index b12e0d23e..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AboutHomeComponent.java +++ /dev/null @@ -1,193 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.components; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertEquals; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -import java.util.Arrays; -import java.util.List; - -import org.mozilla.gecko.AboutPages; -import org.mozilla.gecko.R; -import org.mozilla.gecko.Tabs; -import org.mozilla.gecko.home.HomeConfig.PanelType; -import org.mozilla.gecko.tests.UITestContext; -import org.mozilla.gecko.tests.helpers.WaitHelper; - -import android.os.Build; -import android.support.v4.view.ViewPager; -import android.view.View; -import android.widget.TextView; - -import com.robotium.solo.Condition; -import com.robotium.solo.Solo; - -/** - * A class representing any interactions that take place on the Awesomescreen. - */ -public class AboutHomeComponent extends BaseComponent { - private static final String LOGTAG = AboutHomeComponent.class.getSimpleName(); - - private static final List PANEL_ORDERING = Arrays.asList( - PanelType.TOP_SITES, - PanelType.BOOKMARKS, - PanelType.COMBINED_HISTORY - ); - - // The percentage of the panel to swipe between 0 and 1. This value was set through - // testing: 0.55f was tested on try and fails on armv6 devices. - private static final float SWIPE_PERCENTAGE = 0.70f; - - public AboutHomeComponent(final UITestContext testContext) { - super(testContext); - } - - private View getHomePagerContainer() { - return mSolo.getView(R.id.home_screen_container); - } - - private ViewPager getHomePagerView() { - return (ViewPager) mSolo.getView(R.id.home_pager); - } - - private View getHomeBannerView() { - if (mSolo.waitForView(R.id.home_banner)) { - return mSolo.getView(R.id.home_banner); - } - return null; - } - - public AboutHomeComponent assertCurrentPanel(final PanelType expectedPanel) { - assertVisible(); - - final int expectedPanelIndex = PANEL_ORDERING.indexOf(expectedPanel); - fAssertEquals("The current HomePager panel is " + expectedPanel, - expectedPanelIndex, getHomePagerView().getCurrentItem()); - return this; - } - - public AboutHomeComponent assertNotVisible() { - fAssertTrue("The HomePager is not visible", - getHomePagerContainer().getVisibility() != View.VISIBLE || - getHomePagerView().getVisibility() != View.VISIBLE); - return this; - } - - public AboutHomeComponent assertVisible() { - fAssertTrue("The HomePager is visible", - getHomePagerContainer().getVisibility() == View.VISIBLE && - getHomePagerView().getVisibility() == View.VISIBLE); - return this; - } - - public AboutHomeComponent assertBannerNotVisible() { - View banner = getHomeBannerView(); - if (Build.VERSION.SDK_INT >= 11) { - fAssertTrue("The HomeBanner is not visible", - getHomePagerContainer().getVisibility() != View.VISIBLE || - banner == null || - banner.getVisibility() != View.VISIBLE || - banner.getTranslationY() == banner.getHeight()); - } else { - // getTranslationY is not available before api 11. - // This check is a little less specific. - fAssertTrue("The HomeBanner is not visible", - getHomePagerContainer().getVisibility() != View.VISIBLE || - banner == null || - banner.isShown() == false); - } - return this; - } - - public AboutHomeComponent assertBannerVisible() { - fAssertTrue("The HomeBanner is visible", - getHomePagerContainer().getVisibility() == View.VISIBLE && - getHomeBannerView().getVisibility() == View.VISIBLE); - return this; - } - - public AboutHomeComponent assertBannerText(String text) { - assertBannerVisible(); - - final TextView textView = (TextView) getHomeBannerView().findViewById(R.id.text); - fAssertEquals("The correct HomeBanner text is shown", - text, textView.getText().toString()); - return this; - } - - public AboutHomeComponent clickOnBanner() { - assertBannerVisible(); - - mTestContext.dumpLog(LOGTAG, "Clicking on HomeBanner."); - mSolo.clickOnView(getHomeBannerView()); - return this; - } - - public AboutHomeComponent dismissBanner() { - assertBannerVisible(); - - mTestContext.dumpLog(LOGTAG, "Clicking on HomeBanner close button."); - mSolo.clickOnView(getHomeBannerView().findViewById(R.id.close)); - return this; - } - - public AboutHomeComponent swipeToPanelOnRight() { - mTestContext.dumpLog(LOGTAG, "Swiping to the panel on the right."); - swipeToPanel(Solo.RIGHT); - return this; - } - - public AboutHomeComponent swipeToPanelOnLeft() { - mTestContext.dumpLog(LOGTAG, "Swiping to the panel on the left."); - swipeToPanel(Solo.LEFT); - return this; - } - - private void swipeToPanel(final int panelDirection) { - fAssertTrue("Swiping in a valid direction", - panelDirection == Solo.LEFT || panelDirection == Solo.RIGHT); - assertVisible(); - - final int panelIndex = getHomePagerView().getCurrentItem(); - - mSolo.scrollViewToSide(getHomePagerView(), panelDirection, SWIPE_PERCENTAGE); - - // The panel on the left is a lower index and vice versa. - final int unboundedPanelIndex = panelIndex + (panelDirection == Solo.LEFT ? -1 : 1); - final int maxPanelIndex = PANEL_ORDERING.size() - 1; - final int expectedPanelIndex = Math.min(Math.max(0, unboundedPanelIndex), maxPanelIndex); - - waitForPanelIndex(expectedPanelIndex); - } - - private void waitForPanelIndex(final int expectedIndex) { - final String panelName = PANEL_ORDERING.get(expectedIndex).name(); - - WaitHelper.waitFor("HomePager " + panelName + " panel", new Condition() { - @Override - public boolean isSatisfied() { - return (getHomePagerView().getCurrentItem() == expectedIndex); - } - }); - } - - /** - * Navigate directly to a built-in panel by its panel type. - *

          - * If the panel type is not part of the active Home Panel configuration, the - * default about:home panel is displayed. If the panel type is not a - * built-in panel, an IllegalArgumentException is thrown. - * - * @param panelType to navigate to. - * @return self, for chaining. - */ - public AboutHomeComponent navigateToBuiltinPanelType(PanelType panelType) throws IllegalArgumentException { - Tabs.getInstance().loadUrl(AboutPages.getURLForBuiltinPanelType(panelType)); - final int expectedPanelIndex = PANEL_ORDERING.indexOf(panelType); - waitForPanelIndex(expectedPanelIndex); - return this; - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AppMenuComponent.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AppMenuComponent.java deleted file mode 100644 index 278cc7564..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/AppMenuComponent.java +++ /dev/null @@ -1,295 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.components; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertEquals; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertFalse; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotNull; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -import java.util.List; -import java.util.concurrent.Callable; - -import org.mozilla.gecko.AppConstants; -import org.mozilla.gecko.R; -import org.mozilla.gecko.menu.MenuItemActionBar; -import org.mozilla.gecko.menu.MenuItemDefault; -import org.mozilla.gecko.tests.UITestContext; -import org.mozilla.gecko.tests.helpers.DeviceHelper; -import org.mozilla.gecko.tests.helpers.RobotiumHelper; -import org.mozilla.gecko.tests.helpers.WaitHelper; - -import android.text.TextUtils; -import android.view.View; -import android.widget.TextView; -import android.widget.RelativeLayout; - -import com.robotium.solo.Condition; -import com.robotium.solo.RobotiumUtils; -import com.robotium.solo.Solo; - -/** - * A class representing any interactions that take place on the app menu. - */ -public class AppMenuComponent extends BaseComponent { - private static final int MAX_WAITTIME_FOR_MENU_UPDATE_IN_MS = 7500; - - public enum MenuItem { - FORWARD(R.string.forward), - NEW_TAB(R.string.new_tab), - PAGE(R.string.page), - RELOAD(R.string.reload); - - private final int resourceID; - private String stringResource; - - MenuItem(final int resourceID) { - this.resourceID = resourceID; - } - - public String getString(final Solo solo) { - if (stringResource == null) { - stringResource = solo.getString(resourceID); - } - - return stringResource; - } - }; - - public enum PageMenuItem { - SAVE_AS_PDF(R.string.save_as_pdf); - - private static final MenuItem PARENT_MENU = MenuItem.PAGE; - - private final int resourceID; - private String stringResource; - - PageMenuItem(final int resourceID) { - this.resourceID = resourceID; - } - - public String getString(final Solo solo) { - if (stringResource == null) { - stringResource = solo.getString(resourceID); - } - - return stringResource; - } - }; - - public AppMenuComponent(final UITestContext testContext) { - super(testContext); - } - - public void assertMenuIsOpen() { - fAssertTrue("Menu is open", isMenuOpen()); - } - - public void assertMenuIsNotOpen() { - fAssertFalse("Menu is not open", isMenuOpen()); - } - - public void assertMenuItemIsDisabledAndVisible(PageMenuItem pageMenuItem) { - openAppMenu(); - - // Non-legacy devices have hierarchical menu, check for parent menu item "page". - final View parentMenuItemView = findAppMenuItemView(MenuItem.PAGE.getString(mSolo)); - if (parentMenuItemView.isEnabled()) { - fAssertTrue("The parent 'page' menu item is enabled", parentMenuItemView.isEnabled()); - fAssertEquals("The parent 'page' menu item is visible", View.VISIBLE, - parentMenuItemView.getVisibility()); - - // Parent menu "page" is enabled, open page menu and check for menu item represented by pageMenuItem. - pressMenuItem(MenuItem.PAGE.getString(mSolo)); - - final View pageMenuItemView = findAppMenuItemView(pageMenuItem.getString(mSolo)); - fAssertNotNull("The page menu item is not null", pageMenuItemView); - fAssertFalse("The page menu item is not enabled", pageMenuItemView.isEnabled()); - fAssertEquals("The page menu item is visible", View.VISIBLE, pageMenuItemView.getVisibility()); - } else { - fAssertFalse("The parent 'page' menu item is not enabled", parentMenuItemView.isEnabled()); - fAssertEquals("The parent 'page' menu item is visible", View.VISIBLE, parentMenuItemView.getVisibility()); - } - // Close the App Menu. - mSolo.goBack(); - } - - private View getOverflowMenuButtonView() { - return mSolo.getView(R.id.menu); - } - - /** - * Try to find a MenuItemActionBar/MenuItemDefault with the given text set as contentDescription / text. - * - * When using legacy menus, make sure the menu has been opened to the appropriate level - * (i.e. base menu or "More" menu) to ensure the appropriate menu views are in memory. - * TODO: ^ Maybe we just need to have opened the "More" menu and the current one doesn't matter. - * - * This method is dependent on not having two views with equivalent contentDescription / text. - */ - private View findAppMenuItemView(final String text) { - return WaitHelper.waitFor(String.format("menu item view '%s'", text), new Callable() { - @Override - public View call() throws Exception { - final List views = mSolo.getViews(); - - final List menuItemActionBarList = RobotiumUtils.filterViews(MenuItemActionBar.class, views); - for (MenuItemActionBar menuItem : menuItemActionBarList) { - if (TextUtils.equals(menuItem.getContentDescription(), text)) { - return menuItem; - } - } - - final List menuItemDefaultList = RobotiumUtils.filterViews(MenuItemDefault.class, views); - for (MenuItemDefault menuItem : menuItemDefaultList) { - if (TextUtils.equals(menuItem.getText(), text)) { - return menuItem; - } - } - - // On Android 2.3, menu items may be instances of - // com.android.internal.view.menu.ListMenuItemView, each with a child - // android.widget.RelativeLayout which in turn has a child - // TextView with the appropriate text. - final List textViewList = RobotiumUtils.filterViews(TextView.class, views); - for (TextView textView : textViewList) { - if (TextUtils.equals(textView.getText(), text)) { - View relativeLayout = (View) textView.getParent(); - if (relativeLayout instanceof RelativeLayout) { - View listMenuItemView = (View)relativeLayout.getParent(); - return listMenuItemView; - } - } - } - return null; - } - }, MAX_WAITTIME_FOR_MENU_UPDATE_IN_MS); - } - - /** - * Helper function to let Robotium locate and click menu item from legacy Android menu (devices with Android 2.x). - * - * Robotium will also try to open the menu if there are no open dialog. - * - * @param menuItemTitle, The title of menu item to open. - */ - private void pressLegacyMenuItem(final String menuItemTitle) { - mSolo.clickOnMenuItem(menuItemTitle, true); - } - - private void pressMenuItem(final String menuItemTitle) { - // Wait for the menu item view to be enabled. This improves reliability on Android 2.3. - WaitHelper.waitFor(String.format("menu item %s to be enabled", menuItemTitle), new Condition() { - @Override - public boolean isSatisfied() { - View v = findAppMenuItemView(menuItemTitle); - return (v != null) && v.isEnabled(); - } - }); - - final View menuItemView = findAppMenuItemView(menuItemTitle); - fAssertTrue("Menu is open", isMenuOpen(menuItemView)); - - fAssertTrue(String.format("The menu item %s is enabled", menuItemTitle), menuItemView.isEnabled()); - fAssertEquals(String.format("The menu item %s is visible", menuItemTitle), View.VISIBLE, - menuItemView.getVisibility()); - - mSolo.clickOnView(menuItemView); - } - - private void pressSubMenuItem(final String parentMenuItemTitle, final String childMenuItemTitle) { - openAppMenu(); - - pressMenuItem(parentMenuItemTitle); - - // Child menu item is not pressed yet, Click on it. - pressMenuItem(childMenuItemTitle); - } - - public void pressMenuItem(MenuItem menuItem) { - openAppMenu(); - pressMenuItem(menuItem.getString(mSolo)); - } - - public void pressMenuItem(final PageMenuItem pageMenuItem) { - pressSubMenuItem(PageMenuItem.PARENT_MENU.getString(mSolo), pageMenuItem.getString(mSolo)); - } - - private void openAppMenu() { - assertMenuIsNotOpen(); - - // This is a hack needed for tablets where the OverflowMenuButton is always in the GONE state, - // so we press the menu key instead. - if (DeviceHelper.isTablet()) { - mSolo.sendKey(Solo.MENU); - } else { - pressOverflowMenuButton(); - } - - waitForMenuOpen(); - } - - private void pressOverflowMenuButton() { - final View overflowMenuButton = getOverflowMenuButtonView(); - - fAssertTrue("The overflow menu button is enabled", overflowMenuButton.isEnabled()); - fAssertEquals("The overflow menu button is visible", View.VISIBLE, overflowMenuButton.getVisibility()); - - mSolo.clickOnView(overflowMenuButton, true); - } - - /** - * Determines whether the app menu is open by searching for items in the menu. - * - * @return true if app menu is open. - */ - private boolean isMenuOpen() { - // We choose these options because New Tab is near the top of the menu and Page is near the middle/bottom. - // Intermittently, the menu doesn't scroll to top so we can't just use the first item in the list. - return isMenuOpen(MenuItem.NEW_TAB.getString(mSolo)) || isMenuOpen(MenuItem.PAGE.getString(mSolo)); - } - - /** - * Determines whether the app menu is open by searching for the text in menuItemTitle. - * - * @param menuItemTitle, The contentDescription of menu item to search. - * - * @return true if app menu is open. - */ - private boolean isMenuOpen(String menuItemTitle) { - final View menuItemView = findAppMenuItemView(menuItemTitle); - return isMenuOpen(menuItemView) ? true : RobotiumHelper.searchExactText(menuItemTitle, true); - } - - /** - * If a ListMenuItemView with menuItemTitle is visible then the app menu is open . - * - * @param menuItemView, must be a ListMenuItemView with menuItemTitle. - * You must use findAppMenuItemView(menuItemTitle) to obtain it. - * - * @return true if app menu is open. - */ - private boolean isMenuOpen(View menuItemView) { - return (menuItemView != null) && (menuItemView.getVisibility() == View.VISIBLE); - } - - public void waitForMenuOpen() { - WaitHelper.waitFor("menu to open", new Condition() { - @Override - public boolean isSatisfied() { - return isMenuOpen(); - } - }); - } - - public void waitForMenuClose() { - WaitHelper.waitFor("menu to close", new Condition() { - @Override - public boolean isSatisfied() { - return !isMenuOpen(); - } - }); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/BaseComponent.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/BaseComponent.java deleted file mode 100644 index eadaaa173..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/BaseComponent.java +++ /dev/null @@ -1,36 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.components; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.tests.StringHelper; -import org.mozilla.gecko.tests.UITestContext; - -import android.app.Activity; - -import com.robotium.solo.Solo; - -/** - * A base class for constructing components - an abstraction over small bits of Firefox - * functionality. For example, the Toolbar or the about:home screen could be considered a - * component. Components should not need to know about each others existences and should be - * combined via helpers. Helpers can also handle a series of actions taken on one component - * (e.g. clicking the toolbar, entering a url, and waiting for page load). - */ -public abstract class BaseComponent { - protected final UITestContext mTestContext; - protected final Activity mActivity; - protected final Solo mSolo; - protected final Actions mActions; - protected final StringHelper mStringHelper; - - public BaseComponent(final UITestContext testContext) { - mTestContext = testContext; - mActivity = mTestContext.getActivity(); - mSolo = mTestContext.getSolo(); - mActions = mTestContext.getActions(); - mStringHelper = mTestContext.getStringHelper(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/GeckoViewComponent.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/GeckoViewComponent.java deleted file mode 100644 index 3beab3169..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/GeckoViewComponent.java +++ /dev/null @@ -1,343 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.components; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertEquals; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotNull; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotSame; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertSame; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -import org.mozilla.gecko.GeckoThread; -import org.mozilla.gecko.R; -import org.mozilla.gecko.tests.UITestContext; -import org.mozilla.gecko.tests.helpers.FrameworkHelper; -import org.mozilla.gecko.tests.helpers.WaitHelper; - -import android.content.Context; -import android.content.ContextWrapper; -import android.os.Handler; -import android.os.Looper; -import android.os.Message; -import android.os.MessageQueue; -import android.view.View; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.ExtractedText; -import android.view.inputmethod.ExtractedTextRequest; -import android.view.inputmethod.InputConnection; -import android.view.inputmethod.InputMethodManager; - -import com.robotium.solo.Condition; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -/** - * A class representing any interactions that take place on GeckoView. - */ -public class GeckoViewComponent extends BaseComponent { - - public final TextInput mTextInput; - - public GeckoViewComponent(final UITestContext testContext) { - super(testContext); - mTextInput = new TextInput(); - } - - /** - * Returns the GeckoView. - */ - private View getView() { - // Solo.getView asserts returning a valid View - return mSolo.getView(R.id.layer_view); - } - - private void setContext(final Context newContext) { - final View geckoView = getView(); - // Switch to a no-InputMethodManager context to avoid interference - mTestContext.getInstrumentation().runOnMainSync(new Runnable() { - @Override - public void run() { - FrameworkHelper.setViewContext(geckoView, newContext); - } - }); - } - - public static abstract class InputConnectionTest { - protected Handler inputConnectionHandler; - - /** - * Processes pending events on the input connection thread before returning. - * Must be called on the input connection thread during a test. - */ - protected void processInputConnectionEvents() { - fAssertSame("Should be called on input connection thread", - Looper.myLooper(), inputConnectionHandler.getLooper()); - - // Adapted from GeckoThread.pumpMessageLoop. - MessageQueue queue = Looper.myQueue(); - queue.addIdleHandler(new MessageQueue.IdleHandler() { - @Override - public boolean queueIdle() { - final Message msg = Message.obtain(inputConnectionHandler); - msg.obj = inputConnectionHandler; - inputConnectionHandler.sendMessageAtFrontOfQueue(msg); - return false; // Remove this idle handler. - } - }); - - final Method getNextMessage; - try { - getNextMessage = queue.getClass().getDeclaredMethod("next"); - } catch (final NoSuchMethodException e) { - throw new UnsupportedOperationException(e); - } - getNextMessage.setAccessible(true); - - while (true) { - final Message msg; - try { - msg = (Message) getNextMessage.invoke(queue); - } catch (final IllegalAccessException | InvocationTargetException e) { - throw new UnsupportedOperationException(e); - } - if (msg.obj == inputConnectionHandler && - msg.getTarget() == inputConnectionHandler) { - // Our idle signal - break; - } else if (msg.getTarget() == null) { - Looper.myLooper().quit(); - break; - } - msg.getTarget().dispatchMessage(msg); - } - } - - /** - * Processes pending events on the Gecko thread before returning. - * Must be called on the input connection thread during a test. - */ - protected void processGeckoEvents() { - fAssertSame("Should be called on input connection thread", - Looper.myLooper(), inputConnectionHandler.getLooper()); - - GeckoThread.waitOnGecko(); - } - - private static ExtractedText getExtractedText(final InputConnection ic) { - final ExtractedTextRequest req = new ExtractedTextRequest(); - return ic.getExtractedText(req, 0); - } - - protected String getText(final InputConnection ic) { - return getExtractedText(ic).text.toString(); - } - - private static void assertText(final String message, - final String expected, - final String actual) { - // In an HTML editor, Gecko may insert an additional element that show up as a - // return character at the end. Deal with that here. - int end = actual.length(); - if (end > 0 && actual.charAt(end - 1) == '\n') { - end--; - } - fAssertEquals(message, expected, actual.substring(0, end)); - } - - protected void assertText(final String message, - final InputConnection ic, - final String text) { - processGeckoEvents(); - processInputConnectionEvents(); - - assertText(message, text, getText(ic)); - } - - protected void assertSelection(final String message, - final InputConnection ic, - final int start, - final int end) { - processGeckoEvents(); - processInputConnectionEvents(); - - final ExtractedText extract = getExtractedText(ic); - fAssertEquals(message, start, extract.selectionStart); - fAssertEquals(message, end, extract.selectionEnd); - } - - protected void assertSelectionAt(final String message, - final InputConnection ic, - final int value) { - assertSelection(message, ic, value, value); - } - - protected void assertTextAndSelection(final String message, - final InputConnection ic, - final String text, - final int start, - final int end) { - processGeckoEvents(); - processInputConnectionEvents(); - - final ExtractedText extract = getExtractedText(ic); - assertText(message, text, extract.text.toString()); - fAssertEquals(message, start, extract.selectionStart); - fAssertEquals(message, end, extract.selectionEnd); - } - - protected void assertTextAndSelectionAt(final String message, - final InputConnection ic, - final String text, - final int selection) { - assertTextAndSelection(message, ic, text, selection, selection); - } - - public abstract void test(InputConnection ic, EditorInfo info); - } - - public class TextInput { - private TextInput() { - } - - private InputMethodManager getInputMethodManager() { - final InputMethodManager imm = (InputMethodManager) - mActivity.getSystemService(Context.INPUT_METHOD_SERVICE); - fAssertNotNull("Must have an InputMethodManager", imm); - return imm; - } - - /** - * Returns whether text input is being directed to the GeckoView. - */ - private boolean isActive() { - return getInputMethodManager().isActive(getView()); - } - - public TextInput assertActive() { - fAssertTrue("Current view should be the active input view", isActive()); - return this; - } - - public TextInput waitForActive() { - WaitHelper.waitFor("current view to become the active input view", new Condition() { - @Override - public boolean isSatisfied() { - return isActive(); - } - }); - return this; - } - - /** - * Returns whether an InputConnection is available. - * An InputConnection is available when text input is being directed to the - * GeckoView, and a text field (input, textarea, contentEditable, etc.) is - * currently focused inside the GeckoView. - */ - private boolean hasInputConnection() { - final InputMethodManager imm = getInputMethodManager(); - return imm.isActive(getView()) && imm.isAcceptingText(); - } - - public TextInput assertInputConnection() { - fAssertTrue("Current view should have an active InputConnection", hasInputConnection()); - return this; - } - - public TextInput waitForInputConnection() { - WaitHelper.waitFor("current view to have an active InputConnection", new Condition() { - @Override - public boolean isSatisfied() { - return hasInputConnection(); - } - }); - return this; - } - - /** - * Starts an InputConnectionTest. An InputConnectionTest must run on the - * InputConnection thread which may or may not be the main UI thread. Also, - * during an InputConnectionTest, the system InputMethodManager service must - * be temporarily disabled to prevent the system IME from interfering with our - * tests. We disable the service by override the GeckoView's context with one - * that returns a null InputMethodManager service. - * - * @param test Test to run - */ - public TextInput testInputConnection(final InputConnectionTest test) { - - fAssertNotNull("Test must not be null", test); - assertInputConnection(); - - // GeckoInputConnection can run on another thread than the main thread, - // so we need to be testing it on that same thread it's running on - final View geckoView = getView(); - final Handler inputConnectionHandler = geckoView.getHandler(); - final Context oldGeckoViewContext = FrameworkHelper.getViewContext(geckoView); - - setContext(new ContextWrapper(oldGeckoViewContext) { - @Override - public Object getSystemService(String name) { - if (Context.INPUT_METHOD_SERVICE.equals(name)) { - return null; - } - return super.getSystemService(name); - } - }); - - (new InputConnectionTestRunner(test, inputConnectionHandler)).launch(); - - setContext(oldGeckoViewContext); - return this; - } - - private class InputConnectionTestRunner implements Runnable { - private final InputConnectionTest mTest; - private boolean mDone; - - public InputConnectionTestRunner(final InputConnectionTest test, - final Handler handler) { - test.inputConnectionHandler = handler; - mTest = test; - } - - public synchronized void launch() { - // Below, we are blocking the instrumentation thread to wait on the - // InputConnection thread. Therefore, the InputConnection thread must not be - // the same as the instrumentation thread to avoid a deadlock. This should - // always be the case and we perform a sanity check to make sure. - fAssertNotSame("InputConnection should not be running on instrumentation thread", - Looper.myLooper(), mTest.inputConnectionHandler.getLooper()); - - mDone = false; - mTest.inputConnectionHandler.post(this); - do { - try { - wait(); - } catch (InterruptedException e) { - // Ignore interrupts - } - } while (!mDone); - } - - @Override - public void run() { - final EditorInfo info = new EditorInfo(); - final InputConnection ic = getView().onCreateInputConnection(info); - fAssertNotNull("Must have an InputConnection", ic); - // Restore the IC to a clean state - ic.clearMetaKeyStates(-1); - ic.finishComposingText(); - mTest.test(ic, info); - synchronized (this) { - // Test finished; return from launch(). - mDone = true; - notify(); - } - } - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/TabStripComponent.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/TabStripComponent.java deleted file mode 100644 index e8a90b351..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/TabStripComponent.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.mozilla.gecko.tests.components; - -import android.view.View; - -import com.robotium.solo.Condition; - -import org.mozilla.gecko.tests.UITestContext; -import org.mozilla.gecko.tests.helpers.DeviceHelper; -import org.mozilla.gecko.tests.helpers.WaitHelper; -import org.mozilla.gecko.widget.TwoWayView; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.*; - -/** - * A class representing any interactions that take place on the tablet tab strip. - */ -public class TabStripComponent extends BaseComponent { - // Using a text id because the layout and therefore the id might be stripped from the (non-tablet) build - private static final String TAB_STRIP_ID = "tab_strip"; - - public TabStripComponent(final UITestContext testContext) { - super(testContext); - } - - public void switchToTab(int index) { - // The tab strip is only available on tablets - DeviceHelper.assertIsTablet(); - - View tabView = waitForTabView(index); - fAssertNotNull(String.format("Tab at index %d is not null", index), tabView); - - mSolo.clickOnView(tabView); - } - - private View waitForTabView(final int index) { - final TwoWayView tabStrip = getTabStripView(); - final View[] tabView = new View[1]; - - WaitHelper.waitFor(String.format("Tab at index %d to be visible", index), new Condition() { - @Override - public boolean isSatisfied() { - return (tabView[0] = tabStrip.getChildAt(index)) != null; - } - }); - - return tabView[0]; - } - - private TwoWayView getTabStripView() { - TwoWayView tabStrip = (TwoWayView) mSolo.getView("tab_strip"); - - fAssertNotNull("Tab strip is not null", tabStrip); - - return tabStrip; - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/ToolbarComponent.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/ToolbarComponent.java deleted file mode 100644 index 25101a395..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/components/ToolbarComponent.java +++ /dev/null @@ -1,326 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.components; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertEquals; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertFalse; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotNull; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -import org.mozilla.gecko.R; -import org.mozilla.gecko.tests.UITestContext; -import org.mozilla.gecko.tests.helpers.DeviceHelper; -import org.mozilla.gecko.tests.helpers.NavigationHelper; -import org.mozilla.gecko.tests.helpers.WaitHelper; -import org.mozilla.gecko.toolbar.PageActionLayout; - -import android.view.View; -import android.widget.EditText; -import android.widget.ImageButton; -import android.widget.TextView; - -import com.robotium.solo.Condition; -import com.robotium.solo.Solo; - -/** - * A class representing any interactions that take place on the Toolbar. - */ -public class ToolbarComponent extends BaseComponent { - - private static final String URL_HTTP_PREFIX = "http://"; - - // We are waiting up to 30 seconds instead of the default waiting time because reader mode - // parsing can take quite some time on slower devices (Bug 1142699) - private static final int READER_MODE_WAIT_MS = 30000; - - public ToolbarComponent(final UITestContext testContext) { - super(testContext); - } - - public ToolbarComponent assertIsEditing() { - fAssertTrue("The toolbar is in the editing state", isEditing()); - return this; - } - - public ToolbarComponent assertIsNotEditing() { - fAssertFalse("The toolbar is not in the editing state", isEditing()); - return this; - } - - public ToolbarComponent assertTitle(final String url) { - fAssertNotNull("The url argument is not null", url); - - final String expected; - final String absoluteURL = NavigationHelper.adjustUrl(url); - - if (mStringHelper.ABOUT_HOME_URL.equals(absoluteURL)) { - expected = mStringHelper.ABOUT_HOME_TITLE; - } else if (absoluteURL.startsWith(URL_HTTP_PREFIX)) { - expected = absoluteURL.substring(URL_HTTP_PREFIX.length()); - } else { - expected = absoluteURL; - } - - // Since we only display a shortened "base domain" (See bug 1236431) we use the content - // description to obtain the full URL. - fAssertEquals("The Toolbar title is " + expected, expected, getUrlFromContentDescription()); - return this; - } - - public ToolbarComponent assertUrl(final String expected) { - assertIsEditing(); - fAssertEquals("The Toolbar url is " + expected, expected, getUrlEditText().getText()); - return this; - } - - public ToolbarComponent assertIsUrlEditTextSelected() { - fAssertTrue("The edit text is selected", isUrlEditTextSelected()); - return this; - } - - public ToolbarComponent assertIsUrlEditTextNotSelected() { - fAssertFalse("The edit text is not selected", isUrlEditTextSelected()); - return this; - } - - public ToolbarComponent assertBackButtonIsNotEnabled() { - fAssertFalse("The back button is not enabled", isBackButtonEnabled()); - return this; - } - - /** - * Returns the root View for the browser toolbar. - */ - private View getToolbarView() { - mSolo.waitForView(R.id.browser_toolbar); - return mSolo.getView(R.id.browser_toolbar); - } - - private EditText getUrlEditText() { - return (EditText) getToolbarView().findViewById(R.id.url_edit_text); - } - - private View getUrlDisplayLayout() { - return getToolbarView().findViewById(R.id.display_layout); - } - - private TextView getUrlTitleText() { - return (TextView) getToolbarView().findViewById(R.id.url_bar_title); - } - - private ImageButton getBackButton() { - DeviceHelper.assertIsTablet(); - return (ImageButton) getToolbarView().findViewById(R.id.back); - } - - private ImageButton getForwardButton() { - DeviceHelper.assertIsTablet(); - return (ImageButton) getToolbarView().findViewById(R.id.forward); - } - - private ImageButton getReloadButton() { - DeviceHelper.assertIsTablet(); - return (ImageButton) getToolbarView().findViewById(R.id.reload); - } - - private PageActionLayout getPageActionLayout() { - return (PageActionLayout) getToolbarView().findViewById(R.id.page_action_layout); - } - - private ImageButton getReaderModeButton() { - final PageActionLayout pageActionLayout = getPageActionLayout(); - final int count = pageActionLayout.getChildCount(); - - for (int i = 0; i < count; i++) { - final View view = pageActionLayout.getChildAt(i); - if (mStringHelper.CONTENT_DESCRIPTION_READER_MODE_BUTTON.equals(view.getContentDescription())) { - return (ImageButton) view; - } - } - - return null; - } - - /** - * Returns the View for the edit cancel button in the browser toolbar. - */ - private View getEditCancelButton() { - return getToolbarView().findViewById(R.id.edit_cancel); - } - - private String getUrlFromContentDescription() { - assertIsNotEditing(); - - final CharSequence contentDescription = getUrlDisplayLayout().getContentDescription(); - if (contentDescription == null) { - return ""; - } else { - return contentDescription.toString(); - } - } - - /** - * Returns the title of the page. Note that this makes no assertions to Toolbar state and - * may return a value that may never be visible to the user. Callers likely want to use - * {@link assertTitle} instead. - */ - public String getPotentiallyInconsistentTitle() { - return getTitleHelper(false); - } - - private String getTitleHelper(final boolean shouldAssertNotEditing) { - if (shouldAssertNotEditing) { - assertIsNotEditing(); - } - - return getUrlTitleText().getText().toString(); - } - - private boolean isEditing() { - return getUrlDisplayLayout().getVisibility() != View.VISIBLE && - getUrlEditText().getVisibility() == View.VISIBLE; - } - - public ToolbarComponent enterEditingMode() { - assertIsNotEditing(); - - mSolo.clickOnView(getUrlTitleText(), true); - - waitForEditing(); - WaitHelper.waitFor("UrlEditText to be input method target", new Condition() { - @Override - public boolean isSatisfied() { - return getUrlEditText().isInputMethodTarget(); - } - }); - - return this; - } - - public ToolbarComponent commitEditingMode() { - assertIsEditing(); - - WaitHelper.waitForPageLoad(new Runnable() { - @Override - public void run() { - mSolo.sendKey(Solo.ENTER); - } - }); - waitForNotEditing(); - - return this; - } - - public ToolbarComponent dismissEditingMode() { - assertIsEditing(); - - if (DeviceHelper.isTablet()) { - final EditText urlEditText = getUrlEditText(); - if (urlEditText.isFocused()) { - mSolo.goBack(); - } - mSolo.goBack(); - } else { - mSolo.clickOnView(getEditCancelButton()); - } - - waitForNotEditing(); - - return this; - } - - public ToolbarComponent enterUrl(final String url) { - fAssertNotNull("url is not null", url); - - assertIsEditing(); - - final EditText urlEditText = getUrlEditText(); - fAssertTrue("The UrlEditText is the input method target", - urlEditText.isInputMethodTarget()); - - mSolo.clearEditText(urlEditText); - mSolo.typeText(urlEditText, url); - - return this; - } - - public ToolbarComponent pressBackButton() { - final ImageButton backButton = getBackButton(); - return pressButton(backButton, "back"); - } - - public ToolbarComponent pressForwardButton() { - final ImageButton forwardButton = getForwardButton(); - return pressButton(forwardButton, "forward"); - } - - public ToolbarComponent pressReloadButton() { - final ImageButton reloadButton = getReloadButton(); - return pressButton(reloadButton, "reload"); - } - - public ToolbarComponent pressReaderModeButton() { - final ImageButton readerModeButton = waitForReaderModeButton(); - pressButton(readerModeButton, "reader mode"); - - return this; - } - - private ToolbarComponent pressButton(final View view, final String buttonName) { - fAssertNotNull("The " + buttonName + " button View is not null", view); - fAssertTrue("The " + buttonName + " button is enabled", view.isEnabled()); - fAssertEquals("The " + buttonName + " button is visible", - View.VISIBLE, view.getVisibility()); - assertIsNotEditing(); - - WaitHelper.waitForPageLoad(new Runnable() { - @Override - public void run() { - mSolo.clickOnView(view); - } - }); - - return this; - } - - private void waitForEditing() { - WaitHelper.waitFor("Toolbar to enter editing mode", new Condition() { - @Override - public boolean isSatisfied() { - return isEditing(); - } - }); - } - - private void waitForNotEditing() { - WaitHelper.waitFor("Toolbar to exit editing mode", new Condition() { - @Override - public boolean isSatisfied() { - return !isEditing(); - } - }); - } - - private ImageButton waitForReaderModeButton() { - final ImageButton[] readerModeButton = new ImageButton[1]; - - WaitHelper.waitFor("the Reader mode button to be visible", new Condition() { - @Override - public boolean isSatisfied() { - return (readerModeButton[0] = getReaderModeButton()) != null; - } - }, READER_MODE_WAIT_MS); - - return readerModeButton[0]; - } - - private boolean isUrlEditTextSelected() { - return getUrlEditText().isSelected(); - } - - private boolean isBackButtonEnabled() { - return getBackButton().isEnabled(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/AssertionHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/AssertionHelper.java deleted file mode 100644 index 894d134d1..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/AssertionHelper.java +++ /dev/null @@ -1,112 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import java.util.Arrays; - -import org.mozilla.gecko.Assert; -import org.mozilla.gecko.tests.UITestContext; - -/** - * Provides assertions in a JUnit-like API that wraps the robocop Assert interface. - */ -public final class AssertionHelper { - // Assert.ok has a "diag" ("diagnostic") parameter that has no useful purpose. - private static final String DIAG_STRING = ""; - - private static Assert sAsserter; - - private AssertionHelper() { /* To disallow instantiation. */ } - - protected static void init(final UITestContext context) { - sAsserter = context.getAsserter(); - } - - public static void fAssertArrayEquals(final String message, final byte[] expecteds, final byte[] actuals) { - sAsserter.ok(Arrays.equals(expecteds, actuals), message, DIAG_STRING); - } - - public static void fAssertArrayEquals(final String message, final char[] expecteds, final char[] actuals) { - sAsserter.ok(Arrays.equals(expecteds, actuals), message, DIAG_STRING); - } - - public static void fAssertArrayEquals(final String message, final short[] expecteds, final short[] actuals) { - sAsserter.ok(Arrays.equals(expecteds, actuals), message, DIAG_STRING); - } - - public static void fAssertArrayEquals(final String message, final int[] expecteds, final int[] actuals) { - sAsserter.ok(Arrays.equals(expecteds, actuals), message, DIAG_STRING); - } - - public static void fAssertArrayEquals(final String message, final long[] expecteds, final long[] actuals) { - sAsserter.ok(Arrays.equals(expecteds, actuals), message, DIAG_STRING); - } - - public static void fAssertArrayEquals(final String message, final Object[] expecteds, final Object[] actuals) { - sAsserter.ok(Arrays.equals(expecteds, actuals), message, DIAG_STRING); - } - - public static void fAssertEquals(final String message, final double expected, final double actual, final double delta) { - if (Double.compare(expected, actual) != 0) { - sAsserter.ok(Math.abs(expected - actual) <= delta, message, DIAG_STRING); - } - } - - public static void fAssertEquals(final String message, final long expected, final long actual) { - sAsserter.is(actual, expected, message); - } - - public static void fAssertEquals(final String message, final Object expected, final Object actual) { - sAsserter.is(actual, expected, message); - } - - public static void fAssertNotEquals(final String message, final double unexpected, final double actual, final double delta) { - sAsserter.ok(Math.abs(unexpected - actual) > delta, message, DIAG_STRING); - } - - public static void fAssertNotEquals(final String message, final long unexpected, final long actual) { - sAsserter.isnot(actual, unexpected, message); - } - - public static void fAssertNotEquals(final String message, final Object unexpected, final Object actual) { - sAsserter.isnot(actual, unexpected, message); - } - - public static void fAssertFalse(final String message, final boolean actual) { - sAsserter.ok(!actual, message, DIAG_STRING); - } - - public static void fAssertNotNull(final String message, final Object actual) { - sAsserter.isnot(actual, null, message); - } - - public static void fAssertNotSame(final String message, final Object unexpected, final Object actual) { - sAsserter.ok(unexpected != actual, message, DIAG_STRING); - } - - public static void fAssertNull(final String message, final Object actual) { - sAsserter.is(actual, null, message); - } - - public static void fAssertSame(final String message, final Object expected, final Object actual) { - sAsserter.ok(expected == actual, message, DIAG_STRING); - } - - public static void fAssertTrue(final String message, final boolean actual) { - sAsserter.ok(actual, message, DIAG_STRING); - } - - public static void fAssertIsPixel(final String message, final int actual, final int r, final int g, final int b) { - sAsserter.ispixel(actual, r, g, b, message); - } - - public static void fAssertIsNotPixel(final String message, final int actual, final int r, final int g, final int b) { - sAsserter.isnotpixel(actual, r, g, b, message); - } - - public static void fFail(final String message) { - sAsserter.ok(false, message, DIAG_STRING); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/DeviceHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/DeviceHelper.java deleted file mode 100644 index 476bd34dd..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/DeviceHelper.java +++ /dev/null @@ -1,108 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -import org.mozilla.gecko.GeckoAppShell; -import org.mozilla.gecko.tests.UITestContext; - -import android.app.Activity; -import android.os.Build; -import android.util.DisplayMetrics; - -import com.robotium.solo.Solo; - -/** - * Provides general hardware (ex: configuration) and software (ex: version) information - * about the current test device and allows changing its configuration. - */ -public final class DeviceHelper { - public enum Type { - PHONE, - TABLET - } - - public enum AndroidVersion { - v2x, - v3x, - v4x - } - - private static Activity sActivity; - private static Solo sSolo; - - private static Type sDeviceType; - private static AndroidVersion sAndroidVersion; - - private static int sScreenHeight; - private static int sScreenWidth; - - private DeviceHelper() { /* To disallow instantiation. */ } - - public static void assertIsTablet() { - fAssertTrue("The device is a tablet", isTablet()); - } - - protected static void init(final UITestContext context) { - sActivity = context.getActivity(); - sSolo = context.getSolo(); - - setAndroidVersion(); - setScreenDimensions(); - setDeviceType(); - } - - private static void setAndroidVersion() { - int sdk = Build.VERSION.SDK_INT; - if (sdk < Build.VERSION_CODES.HONEYCOMB) { - sAndroidVersion = AndroidVersion.v2x; - } else if (sdk > Build.VERSION_CODES.HONEYCOMB_MR2) { - sAndroidVersion = AndroidVersion.v4x; - } else { - sAndroidVersion = AndroidVersion.v3x; - } - } - - private static void setScreenDimensions() { - final DisplayMetrics dm = new DisplayMetrics(); - sActivity.getWindowManager().getDefaultDisplay().getMetrics(dm); - - sScreenHeight = dm.heightPixels; - sScreenWidth = dm.widthPixels; - } - - private static void setDeviceType() { - sDeviceType = (GeckoAppShell.isTablet() ? Type.TABLET : Type.PHONE); - } - - public static int getScreenHeight() { - return sScreenHeight; - } - - public static int getScreenWidth() { - return sScreenWidth; - } - - public static AndroidVersion getAndroidVersion() { - return sAndroidVersion; - } - - public static boolean isPhone() { - return (sDeviceType == Type.PHONE); - } - - public static boolean isTablet() { - return (sDeviceType == Type.TABLET); - } - - public static void setLandscapeRotation() { - sSolo.setActivityOrientation(Solo.LANDSCAPE); - } - - public static void setPortraitOrientation() { - sSolo.setActivityOrientation(Solo.LANDSCAPE); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/FrameworkHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/FrameworkHelper.java deleted file mode 100644 index d3c4d6390..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/FrameworkHelper.java +++ /dev/null @@ -1,94 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fFail; - -import java.lang.reflect.Field; - -import android.content.Context; -import android.view.View; - -/** - * Provides helper functions for accessing Android framework features - * - * This class uses reflection to access framework functionalities that are - * unavailable through the regular Android API. Using reflection in this - * case is okay because it does not touch Gecko classes that go through - * ProGuard. - */ -public final class FrameworkHelper { - - private FrameworkHelper() { /* To disallow instantiation. */ } - - private static Field getClassField(final Class clazz, final String fieldName) - throws NoSuchFieldException { - Class cls = clazz; - do { - try { - return cls.getDeclaredField(fieldName); - } catch (final Exception e) { - // NoSuchFieldException is a documented exception of getDeclaredField - // and is frequently observed here. No other exceptions are documented - // for getDeclaredField. However, on Android 2.3, NoSuchMethodException - // is also observed, when called on some classes. This appears to be - // an Android bug reportedly fixed in Honeycomb. Since NoSuchMethodException - // is not declared, it cannot be caught, so we catch all Exceptions. - cls = cls.getSuperclass(); - } - } while (cls != null); - // We tried getDeclaredField before; now try getField instead. - // getField behaves differently in that getField traverses the inheritance - // list, but it only works on public fields. While getField won't get us - // anything new, it makes code cleaner by throwing an exception for us. - return clazz.getField(fieldName); - } - - private static Object getField(final Object obj, final String fieldName) { - try { - final Field field = getClassField(obj.getClass(), fieldName); - final boolean accessible = field.isAccessible(); - field.setAccessible(true); - final Object ret = field.get(obj); - field.setAccessible(accessible); - return ret; - } catch (final NoSuchFieldException e) { - // We expect a valid field name; if it's not valid, - // the caller is doing something wrong and should be fixed. - fFail("Argument field should be a valid field name: " + e.toString()); - } catch (final IllegalAccessException e) { - // This should not happen. If it does, setAccessible above is not working. - fFail("Field should be accessible: " + e.toString()); - } - throw new IllegalStateException("Should not continue from previous failures"); - } - - private static void setField(final Object obj, final String fieldName, final Object value) { - try { - final Field field = getClassField(obj.getClass(), fieldName); - final boolean accessible = field.isAccessible(); - field.setAccessible(true); - field.set(obj, value); - field.setAccessible(accessible); - return; - } catch (final NoSuchFieldException e) { - // We expect a valid field name; if it's not valid, - // the caller is doing something wrong and should be fixed. - fFail("Argument field should be a valid field name: " + e.toString()); - } catch (final IllegalAccessException e) { - // This should not happen. If it does, setAccessible above is not working. - fFail("Field should be accessible: " + e.toString()); - } - throw new IllegalStateException("Cannot continue from previous failures"); - } - - public static Context getViewContext(final View v) { - return (Context) getField(v, "mContext"); - } - - public static void setViewContext(final View v, final Context c) { - setField(v, "mContext", c); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/GeckoClickHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/GeckoClickHelper.java deleted file mode 100644 index b8d1ef0ce..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/GeckoClickHelper.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.mozilla.gecko.tests.helpers; - -import android.app.Activity; -import android.util.DisplayMetrics; - -import com.robotium.solo.Solo; - -import org.mozilla.gecko.Driver; -import org.mozilla.gecko.tests.StringHelper; -import org.mozilla.gecko.tests.UITestContext; - -/** - * Provides helper functions for clicking elements rendered by the Gecko engine. - */ -public class GeckoClickHelper { - private static Solo sSolo; - private static Activity sActivity; - private static Driver sDriver; - - protected static void init(final UITestContext context) { - sSolo = context.getSolo(); - sActivity = context.getActivity(); - sDriver = context.getDriver(); - } - - private GeckoClickHelper() { /* To disallow instantiation. */ } - - /** - * Long press the link and select "Open Link in New Tab" from the context menu. - * - * The link should be positioned at the top of the page, at least 60px high and - * aligned to the middle. - */ - public static void openCentralizedLinkInNewTab() { - openLinkContextMenu(); - - // Click on "Open Link in New Tab" - sSolo.clickOnText(StringHelper.get().CONTEXT_MENU_ITEMS_IN_NORMAL_TAB[0]); - } - - private static void openLinkContextMenu() { - DisplayMetrics dm = new DisplayMetrics(); - sActivity.getWindowManager().getDefaultDisplay().getMetrics(dm); - - sSolo.clickLongOnScreen( - sDriver.getGeckoLeft() + sDriver.getGeckoWidth() / 2, - sDriver.getGeckoTop() + 30 * dm.density - ); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/GeckoHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/GeckoHelper.java deleted file mode 100644 index cd75b7255..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/GeckoHelper.java +++ /dev/null @@ -1,49 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Actions.EventExpecter; -import org.mozilla.gecko.GeckoThread; -import org.mozilla.gecko.tests.UITestContext; - -import android.app.Activity; - -/** - * Provides helper functions for accessing the underlying Gecko engine. - */ -public final class GeckoHelper { - private static Activity sActivity; - private static Actions sActions; - - private GeckoHelper() { /* To disallow instantiation. */ } - - protected static void init(final UITestContext context) { - sActivity = context.getActivity(); - sActions = context.getActions(); - } - - public static void blockForReady() { - blockForEvent("Gecko:Ready"); - } - - /** - * Blocks for the "Gecko:DelayedStartup" event, which occurs after "Gecko:Ready" and the - * first page load. - */ - public static void blockForDelayedStartup() { - blockForEvent("Gecko:DelayedStartup"); - } - - private static void blockForEvent(final String eventName) { - final EventExpecter eventExpecter = sActions.expectGeckoEvent(eventName); - - if (!GeckoThread.isRunning()) { - eventExpecter.blockForEvent(); - } - - eventExpecter.unregisterListener(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/HelperInitializer.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/HelperInitializer.java deleted file mode 100644 index 229dc1062..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/HelperInitializer.java +++ /dev/null @@ -1,30 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import org.mozilla.gecko.tests.UITestContext; - -/** - * AssertionHelper is statically imported in many places. Thus we want to hide - * its init method outside of this package. We initialize the remaining helper - * classes from here so that all the init methods are package protected. - */ -public final class HelperInitializer { - - private HelperInitializer() { /* To disallow instantiation. */ } - - public static void init(final UITestContext context) { - // Other helpers make assertions so init AssertionHelper first. - AssertionHelper.init(context); - - DeviceHelper.init(context); - GeckoClickHelper.init(context); - GeckoHelper.init(context); - JavascriptBridge.init(context); - NavigationHelper.init(context); - RobotiumHelper.init(context); - WaitHelper.init(context); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/JavascriptBridge.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/JavascriptBridge.java deleted file mode 100644 index 1b0ece1cd..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/JavascriptBridge.java +++ /dev/null @@ -1,394 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; - -import junit.framework.AssertionFailedError; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Actions.EventExpecter; -import org.mozilla.gecko.Assert; -import org.mozilla.gecko.tests.UITestContext; - -/** - * Javascript bridge allows calls to and from JavaScript. - * - * To establish communication, create an instance of JavascriptBridge in Java and pass in - * an object that will receive calls from JavaScript. For example: - * - * {@code final JavascriptBridge js = new JavascriptBridge(javaObj);} - * - * Next, create an instance of JavaBridge in JavaScript and pass in another object - * that will receive calls from Java. For example: - * - * {@code let java = new JavaBridge(jsObj);} - * - * Once a link is established, calls can be made using the methods syncCall and asyncCall. - * syncCall waits for the call to finish before returning. For example: - * - * {@code js.syncCall("abc", 1, 2, 3);} will synchronously call the JavaScript method - * jsObj.abc and pass in arguments 1, 2, and 3. - * - * {@code java.asyncCall("def", 4, 5, 6);} will asynchronously call the Java method - * javaObj.def and pass in arguments 4, 5, and 6. - * - * Supported argument types include int, double, boolean, String, and JSONObject. Note - * that only implicit conversion is done, meaning if a floating point argument is passed - * from JavaScript to Java, the call will fail if the Java method has an int argument. - * - * Because JavascriptBridge and JavaBridge use one underlying communication channel, - * creating multiple instances of them will not create independent links. - * - * Note also that because Robocop tests finish as soon as the Java test method returns, - * the last call to JavaScript from Java must be a synchronous call. Otherwise, the test - * will finish before the JavaScript method is run. Calls to Java from JavaScript do not - * have this requirement. Because of these considerations, calls from Java to JavaScript - * are usually synchronous and calls from JavaScript to Java are usually asynchronous. - * See testJavascriptBridge.java for examples. - */ -public final class JavascriptBridge { - - private static enum MessageStatus { - QUEUE_EMPTY, // Did not process a message; queue was empty. - PROCESSED, // A message other than sync was processed. - REPLIED, // A sync message was processed. - SAVED, // An async message was saved; see processMessage(). - }; - - @SuppressWarnings("serial") - public static class CallException extends RuntimeException { - public CallException() { - super(); - } - - public CallException(final String msg) { - super(msg); - } - - public CallException(final String msg, final Throwable e) { - super(msg, e); - } - - public CallException(final Throwable e) { - super(e); - } - } - - public static final String EVENT_TYPE = "Robocop:JS"; - - private static Actions sActions; - private static Assert sAsserter; - - // Target of JS-to-Java calls - private final Object mTarget; - // List of public methods in subclass - private final Method[] mMethods; - // Parser for handling xpcshell assertions - private final JavascriptMessageParser mLogParser; - // Expecter of our internal Robocop event - private final EventExpecter mExpecter; - // Saved async message; see processMessage() for its purpose. - private JSONObject mSavedAsyncMessage; - // Number of levels in the synchronous call stack - private int mCallStackDepth; - // If JavaBridge has been loaded - private boolean mJavaBridgeLoaded; - - /* package */ static void init(final UITestContext context) { - sActions = context.getActions(); - sAsserter = context.getAsserter(); - } - - public JavascriptBridge(final Object target) { - mTarget = target; - mMethods = target.getClass().getMethods(); - mExpecter = sActions.expectGeckoEvent(EVENT_TYPE); - // The JS here is unrelated to a test harness, so we - // have our message parser end on assertion failure. - mLogParser = new JavascriptMessageParser(sAsserter, true); - } - - /** - * Synchronously calls a method in Javascript. - * - * @param method Name of the method to call - * @param args Arguments to pass to the Javascript method; must be a list of - * values allowed by JSONObject. - */ - public void syncCall(final String method, final Object... args) { - mCallStackDepth++; - - sendMessage("sync-call", method, args); - try { - while (processPendingMessage() != MessageStatus.REPLIED) { - } - } catch (final AssertionFailedError e) { - // Most likely an event expecter time out - throw new CallException("Cannot call " + method, e); - } - - // If syncCall was called reentrantly from processPendingMessage(), mCallStackDepth - // will be greater than 1 here. In that case we don't have to wait for pending calls - // because the outermost syncCall will do it for us. - if (mCallStackDepth == 1) { - // We want to wait for all asynchronous calls to finish, - // because the test may end immediately after this method returns. - finishPendingCalls(); - } - mCallStackDepth--; - } - - /** - * Asynchronously calls a method in Javascript. - * - * @param method Name of the method to call - * @param args Arguments to pass to the Javascript method; must be a list of - * values allowed by JSONObject. - */ - public void asyncCall(final String method, final Object... args) { - sendMessage("async-call", method, args); - } - - /** - * Disconnect the bridge. - */ - public void disconnect() { - mExpecter.unregisterListener(); - } - - /** - * Process a new message; wait for new message if necessary. - * - * @return MessageStatus value to indicate result of processing the message - */ - private MessageStatus processPendingMessage() { - // We're on the test thread. - // We clear mSavedAsyncMessage in maybeProcessPendingMessage() but not here, - // because we always have a new message for processing here, so we never - // get a chance to clear mSavedAsyncMessage. - try { - final String message = mExpecter.blockForEventData(); - return processMessage(new JSONObject(message)); - } catch (final JSONException e) { - throw new IllegalStateException("Invalid message", e); - } - } - - /** - * Process a message if a new or saved message is available. - * - * @return MessageStatus value to indicate result of processing the message - */ - private MessageStatus maybeProcessPendingMessage() { - // We're on the test thread. - final String message = mExpecter.blockForEventDataWithTimeout(0); - if (message != null) { - try { - return processMessage(new JSONObject(message)); - } catch (final JSONException e) { - throw new IllegalStateException("Invalid message", e); - } - } - if (mSavedAsyncMessage != null) { - // processMessage clears mSavedAsyncMessage. - return processMessage(mSavedAsyncMessage); - } - return MessageStatus.QUEUE_EMPTY; - } - - /** - * Wait for all asynchronous messages from Javascript to be processed. - */ - private void finishPendingCalls() { - MessageStatus result; - do { - result = maybeProcessPendingMessage(); - if (result == MessageStatus.REPLIED) { - throw new IllegalStateException("Sync reply was unexpected"); - } - } while (result != MessageStatus.QUEUE_EMPTY); - } - - private void ensureJavaBridgeLoaded() { - while (!mJavaBridgeLoaded) { - processPendingMessage(); - } - } - - private void sendMessage(final String innerType, final String method, final Object[] args) { - ensureJavaBridgeLoaded(); - - // Call from Java to Javascript - final JSONObject message = new JSONObject(); - final JSONArray jsonArgs = new JSONArray(); - try { - if (args != null) { - for (final Object arg : args) { - jsonArgs.put(convertToJSONValue(arg)); - } - } - message.put("type", EVENT_TYPE) - .put("innerType", innerType) - .put("method", method) - .put("args", jsonArgs); - } catch (final JSONException e) { - throw new IllegalStateException("Unable to create JSON message", e); - } - sActions.sendGeckoEvent(EVENT_TYPE, message.toString()); - } - - private MessageStatus processMessage(JSONObject message) { - final String type; - final String methodName; - final JSONArray argsArray; - final Object[] args; - try { - if (!EVENT_TYPE.equals(message.getString("type"))) { - throw new IllegalStateException("Message type is not " + EVENT_TYPE); - } - type = message.getString("innerType"); - - switch (type) { - case "progress": - // Javascript harness message - mLogParser.logMessage(message.getString("message")); - return MessageStatus.PROCESSED; - - case "notify-loaded": - mJavaBridgeLoaded = true; - return MessageStatus.PROCESSED; - - case "sync-reply": - // Reply to Java-to-Javascript sync call - return MessageStatus.REPLIED; - - case "sync-call": - case "async-call": - - if ("async-call".equals(type)) { - // Save this async message until another async message arrives, then we - // process the saved message and save the new one. This is done as a - // form of tail call optimization, by making sync-replies come before - // async-calls. On the other hand, if (message == mSavedAsyncMessage), - // it means we're currently processing the saved message and should clear - // mSavedAsyncMessage. - final JSONObject newSavedMessage = - (message != mSavedAsyncMessage ? message : null); - message = mSavedAsyncMessage; - mSavedAsyncMessage = newSavedMessage; - if (message == null) { - // Saved current message and there wasn't an already saved one. - return MessageStatus.SAVED; - } - } - - methodName = message.getString("method"); - argsArray = message.getJSONArray("args"); - args = new Object[argsArray.length()]; - for (int i = 0; i < args.length; i++) { - args[i] = convertFromJSONValue(argsArray.get(i)); - } - invokeMethod(methodName, args); - - if ("sync-call".equals(type)) { - // Reply for sync messages - sendMessage("sync-reply", methodName, null); - } - return MessageStatus.PROCESSED; - } - - throw new IllegalStateException("Message type is unexpected"); - - } catch (final JSONException e) { - throw new IllegalStateException("Unable to retrieve JSON message", e); - } - } - - /** - * Given a method name and a list of arguments, - * call the most suitable method in the subclass. - */ - private Object invokeMethod(final String methodName, final Object[] args) { - final Class[] argTypes = new Class[args.length]; - for (int i = 0; i < argTypes.length; i++) { - if (args[i] == null) { - argTypes[i] = Object.class; - } else { - argTypes[i] = args[i].getClass(); - } - } - - // Try using argument types directly without casting. - try { - return invokeMethod(mTarget.getClass().getMethod(methodName, argTypes), args); - } catch (final NoSuchMethodException e) { - // getMethod() failed; try fallback below. - } - - // One scenario for getMethod() to fail above is that we don't have the exact - // argument types in argTypes (e.g. JS gave us an int but we're using a double, - // or JS gave us a null and we don't know its intended type), or the number of - // arguments is incorrect. Now we find all the methods with the given name and - // try calling them one-by-one. If one call fails, we move to the next call. - // Java will try to convert our arguments to the right types. - Throwable lastException = null; - for (final Method method : mMethods) { - if (!method.getName().equals(methodName)) { - continue; - } - try { - return invokeMethod(method, args); - } catch (final IllegalArgumentException e) { - lastException = e; - // Try the next method - } catch (final UnsupportedOperationException e) { - // "Cannot access method" exception below, see if there are other public methods - lastException = e; - // Try the next method - } - } - // Now we're out of options - throw new UnsupportedOperationException( - "Cannot call method " + methodName + " (not public? wrong argument types?)", - lastException); - } - - private Object invokeMethod(final Method method, final Object[] args) { - try { - return method.invoke(mTarget, args); - } catch (final IllegalAccessException e) { - throw new UnsupportedOperationException( - "Cannot access method " + method.getName(), e); - } catch (final InvocationTargetException e) { - final Throwable cause = e.getCause(); - if (cause instanceof CallException) { - // Don't wrap CallExceptions; this can happen if a call is nested on top - // of existing sync calls, and the nested call throws a CallException - throw (CallException) cause; - } - throw new CallException("Failed to invoke " + method.getName(), cause); - } - } - - private Object convertFromJSONValue(final Object value) { - if (value == JSONObject.NULL) { - return null; - } - return value; - } - - private Object convertToJSONValue(final Object value) { - if (value == null) { - return JSONObject.NULL; - } - return value; - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/JavascriptMessageParser.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/JavascriptMessageParser.java deleted file mode 100644 index 6237f1adc..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/JavascriptMessageParser.java +++ /dev/null @@ -1,100 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import org.mozilla.gecko.Assert; - -import junit.framework.AssertionFailedError; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Route messages from Javascript's head.js test framework into Java's - * Mochitest framework. - */ -public final class JavascriptMessageParser { - - /** - * The Javascript test harness sends test events to Java. - * Each such test event is wrapped in a Robocop:JS event. - */ - public static final String EVENT_TYPE = "Robocop:JS"; - - // Messages matching this pattern are handled specially. Messages not - // matching this pattern are still printed. This pattern should be able - // to handle having multiple lines in a message. - private static final Pattern testMessagePattern = - Pattern.compile("TEST-([A-Z\\-]+) \\| (.*?) \\| (.*)", Pattern.DOTALL); - - private final Assert asserter; - // Used to help print stack traces neatly. - private String lastTestName = ""; - // Have we seen a message saying the test is finished? - private boolean testFinishedMessageSeen = false; - private final boolean endOnAssertionFailure; - - /** - * Constructs a message parser for test result messages sent from JavaScript. When seeing an - * assertion failure, the message parser can use the given {@link org.mozilla.gecko.Assert} - * instance to immediately end the test (typically if the underlying JS framework is not able - * to end the test itself) or to swallow the Errors - this functionality is determined by the - * endOnAssertionFailure parameter. - * - * @param asserter The Assert instance to which test results should be passed. - * @param endOnAssertionFailure - * true if the test should end if we see a JS assertion failure, false otherwise. - */ - public JavascriptMessageParser(final Assert asserter, final boolean endOnAssertionFailure) { - this.asserter = asserter; - this.endOnAssertionFailure = endOnAssertionFailure; - } - - public boolean isTestFinished() { - return testFinishedMessageSeen; - } - - public void logMessage(final String str) { - final Matcher m = testMessagePattern.matcher(str.trim()); - - if (m.matches()) { - final String type = m.group(1); - final String name = m.group(2); - final String message = m.group(3); - - if ("INFO".equals(type)) { - asserter.info(name, message); - testFinishedMessageSeen = testFinishedMessageSeen || - "exiting test".equals(message); - } else if ("PASS".equals(type)) { - asserter.ok(true, name, message); - } else if ("UNEXPECTED-FAIL".equals(type)) { - try { - asserter.ok(false, name, message); - } catch (AssertionFailedError e) { - // Above, we call the assert, allowing it to log. - // Now we can end the test, if applicable. - if (this.endOnAssertionFailure) { - throw e; - } - // Otherwise, swallow the Error. The JS framework we're - // logging messages from is likely capable of ending tests - // when it needs to, and we want to see all of its failures, - // not just the first one! - } - } else if ("KNOWN-FAIL".equals(type)) { - asserter.todo(false, name, message); - } else if ("UNEXPECTED-PASS".equals(type)) { - asserter.todo(true, name, message); - } - - lastTestName = name; - } else { - // Generally, these extra lines are stack traces from failures, - // so we print them with the name of the last test seen. - asserter.info(lastTestName, str.trim()); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/NavigationHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/NavigationHelper.java deleted file mode 100644 index e3ccc8236..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/NavigationHelper.java +++ /dev/null @@ -1,104 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotNull; - -import org.mozilla.gecko.tests.UITestContext; -import org.mozilla.gecko.tests.UITestContext.ComponentType; -import org.mozilla.gecko.tests.components.AppMenuComponent; -import org.mozilla.gecko.tests.components.ToolbarComponent; - -import com.robotium.solo.Solo; - -/** - * Provides helper functionality for navigating around the Firefox UI. These functions will often - * combine actions taken on multiple components to perform larger interactions. - */ -final public class NavigationHelper { - private static UITestContext sContext; - private static Solo sSolo; - - private static AppMenuComponent sAppMenu; - private static ToolbarComponent sToolbar; - - protected static void init(final UITestContext context) { - sContext = context; - sSolo = context.getSolo(); - - sAppMenu = (AppMenuComponent) context.getComponent(ComponentType.APPMENU); - sToolbar = (ToolbarComponent) context.getComponent(ComponentType.TOOLBAR); - } - - public static void enterAndLoadUrl(String url) { - fAssertNotNull("url is not null", url); - - url = adjustUrl(url); - sToolbar.enterEditingMode() - .enterUrl(url) - .commitEditingMode(); - } - - /** - * Returns a new URL with the docshell HTTP server host prefix. - */ - public static String adjustUrl(final String url) { - fAssertNotNull("url is not null", url); - - if (url.startsWith("about:") || url.startsWith("chrome:")) { - return url; - } - - return sContext.getAbsoluteHostnameUrl(url); - } - - public static void goBack() { - if (DeviceHelper.isTablet()) { - sToolbar.pressBackButton(); // Waits for page load & asserts isNotEditing. - return; - } - - sToolbar.assertIsNotEditing(); - WaitHelper.waitForPageLoad(new Runnable() { - @Override - public void run() { - // TODO: Lower soft keyboard first if applicable. Note that - // Solo.hideSoftKeyboard() does not clear focus (which might be fine since - // Gecko would be the element focused). - sSolo.goBack(); - } - }); - } - - public static void goForward() { - if (DeviceHelper.isTablet()) { - sToolbar.pressForwardButton(); // Waits for page load & asserts isNotEditing. - return; - } - - sToolbar.assertIsNotEditing(); - WaitHelper.waitForPageLoad(new Runnable() { - @Override - public void run() { - sAppMenu.pressMenuItem(AppMenuComponent.MenuItem.FORWARD); - } - }); - } - - public static void reload() { - if (DeviceHelper.isTablet()) { - sToolbar.pressReloadButton(); // Waits for page load & asserts isNotEditing. - return; - } - - sToolbar.assertIsNotEditing(); - WaitHelper.waitForPageLoad(new Runnable() { - @Override - public void run() { - sAppMenu.pressMenuItem(AppMenuComponent.MenuItem.RELOAD); - } - }); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/RobotiumHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/RobotiumHelper.java deleted file mode 100644 index 2536eb9db..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/RobotiumHelper.java +++ /dev/null @@ -1,43 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import com.robotium.solo.Solo; - -import org.mozilla.gecko.tests.UITestContext; - -import java.util.regex.Pattern; - -/** - * Provides helper functions for using Robotium. - */ -public final class RobotiumHelper { - private static Solo sSolo; - - private RobotiumHelper() { /* To disallow instantiation. */ } - - protected static void init(final UITestContext context) { - sSolo = context.getSolo(); - } - - /** - * Same as Solo.waitForText(), but matching against full text, without regular expressions. - */ - public static boolean waitForExactText(final String text, - final int minimumNumberOfMatches, - final long timeout) { - String matchText = "^" + Pattern.quote(text) + "$"; - return sSolo.waitForText(matchText, minimumNumberOfMatches, timeout); - } - - /** - * Same as Solo.searchText(), but matching against full text, without regular expressions. - */ - public static boolean searchExactText(final String text, - final boolean onlyVisible) { - String matchText = "^" + Pattern.quote(text) + "$"; - return sSolo.searchText(matchText, onlyVisible); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/WaitHelper.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/WaitHelper.java deleted file mode 100644 index f6e616652..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/helpers/WaitHelper.java +++ /dev/null @@ -1,215 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests.helpers; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotNull; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -import android.os.SystemClock; - -import java.util.concurrent.Callable; -import java.util.regex.Pattern; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Actions.EventExpecter; -import org.mozilla.gecko.tests.UITestContext; -import org.mozilla.gecko.tests.UITestContext.ComponentType; -import org.mozilla.gecko.tests.components.ToolbarComponent; - -import com.robotium.solo.Condition; -import com.robotium.solo.Solo; - -/** - * Provides functionality related to waiting on certain events to happen. - */ -public final class WaitHelper { - // TODO: Make public for when Solo.waitForCondition is used directly (i.e. do not want - // assertion from waitFor)? - // DEFAULT_MAX_WAIT_MS of 5000 was intermittently insufficient during - // initialization on Android 2.3 emulator -- bug 1114655 - private static final int DEFAULT_MAX_WAIT_MS = 15000; - private static final int PAGE_LOAD_WAIT_MS = 10000; - private static final int CHANGE_WAIT_MS = 15000; - - // TODO: via lucasr - Add ThrobberVisibilityChangeVerifier? - private static final ChangeVerifier[] PAGE_LOAD_VERIFIERS = new ChangeVerifier[] { - new ToolbarTitleTextChangeVerifier() - }; - - private static UITestContext sContext; - private static Solo sSolo; - private static Actions sActions; - - private static ToolbarComponent sToolbar; - - private WaitHelper() { /* To disallow instantiation. */ } - - protected static void init(final UITestContext context) { - sContext = context; - sSolo = context.getSolo(); - sActions = context.getActions(); - - sToolbar = (ToolbarComponent) context.getComponent(ComponentType.TOOLBAR); - } - - /** - * Waits for the given {@link solo.Condition} using the default wait duration; will throw an - * AssertionError if the duration is elapsed and the condition is not satisfied. - */ - public static void waitFor(String message, final Condition condition) { - message = "Waiting for " + message + "."; - fAssertTrue(message, sSolo.waitForCondition(condition, DEFAULT_MAX_WAIT_MS)); - } - - /** - * Waits for the given {@link solo.Condition} using the given wait duration; will throw an - * AssertionError if the duration is elapsed and the condition is not satisfied. - */ - public static void waitFor(String message, final Condition condition, final int waitMillis) { - message = "Waiting for " + message + " with timeout " + waitMillis + "."; - fAssertTrue(message, sSolo.waitForCondition(condition, waitMillis)); - } - - /** - * Waits for the given Callable to return something that is not null, using the given wait - * duration; will throw an AssertionError if the duration is elapsed and the callable has not - * returned a non-null object. - * - * @return the value returned by the Callable. Or null if the duration has elapsed. - */ - public static V waitFor(String message, final Callable callable, int waitMillis) { - sContext.dumpLog("WaitHelper", "Waiting for " + message + " with timeout " + waitMillis + "."); - - final Object[] value = new Object[1]; - - Condition condition = new Condition() { - @Override - public boolean isSatisfied() { - try { - V result = callable.call(); - value[0] = result; - return result != null; - } catch (Exception e) { - return false; - } - } - }; - - sSolo.waitForCondition(condition, waitMillis); - - return (V) value[0]; - } - - /** - * Waits for the Gecko event declaring the page has loaded. Takes in and runs a Runnable - * that will perform the action that will cause the page to load. - */ - public static void waitForPageLoad(final Runnable initiatingAction) { - fAssertNotNull("initiatingAction is not null", initiatingAction); - - // Some changes to the UI occur in response to the same event we listen to for when - // the page has finished loading (e.g. a page title update). As such, we ensure this - // UI state has changed before returning from this method; here we store the initial - // state. - final ChangeVerifier[] pageLoadVerifiers = PAGE_LOAD_VERIFIERS; - for (final ChangeVerifier verifier : pageLoadVerifiers) { - verifier.storeState(); - } - - // Wait for the page load and title changed event. - final EventExpecter[] eventExpecters = new EventExpecter[] { - sActions.expectGeckoEvent("DOMContentLoaded"), - sActions.expectGeckoEvent("DOMTitleChanged") - }; - - initiatingAction.run(); - - // PAGE_LOAD_WAIT_MS is the total time we wait for all events to finish. - final long expecterStartMillis = SystemClock.uptimeMillis(); - for (final EventExpecter expecter : eventExpecters) { - final int eventWaitTimeMillis = PAGE_LOAD_WAIT_MS - (int)(SystemClock.uptimeMillis() - expecterStartMillis); - expecter.blockForEventDataWithTimeout(eventWaitTimeMillis); - expecter.unregisterListener(); - } - - // The timeout wait time should be the aggregate time for all ChangeVerifiers. - final long verifierStartMillis = SystemClock.uptimeMillis(); - - // Verify remaining state has changed. - for (final ChangeVerifier verifier : pageLoadVerifiers) { - // If we timeout, either the state is set to the same value (which is fine), or - // the state has not yet changed. Since we can't be sure it will ever change, move - // on and let the assertions fail if applicable. - final int verifierWaitMillis = CHANGE_WAIT_MS - (int)(SystemClock.uptimeMillis() - verifierStartMillis); - final boolean hasTimedOut = !sSolo.waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return verifier.hasStateChanged(); - } - }, verifierWaitMillis); - - sContext.dumpLog(verifier.getLogTag(), - (hasTimedOut ? "timed out." : "was satisfied.")); - } - } - - /** - * Implementations of this interface verify that the state of the test has changed from - * the invocation of storeState to the invocation of hasStateChanged. A boolean will be - * returned from hasStateChanged, indicating this change of status. - */ - private interface ChangeVerifier { - String getLogTag(); - - /** - * Stores the initial state of the system. This system state is used to diff against - * the end state to determine if the system has changed. Since this is just a diff - * (with a timeout), this method could potentially store state inconsistent with - * what is visible to the user. - */ - void storeState(); - boolean hasStateChanged(); - } - - private static class ToolbarTitleTextChangeVerifier implements ChangeVerifier { - private static final String LOGTAG = ToolbarTitleTextChangeVerifier.class.getSimpleName(); - - // A regex that matches the page title that shows up while the page is loading. - private static final Pattern LOADING_PREFIX = Pattern.compile("[A-Za-z]{3,9}://"); - - private CharSequence mOldTitleText; - - @Override - public String getLogTag() { - return LOGTAG; - } - - @Override - public void storeState() { - mOldTitleText = sToolbar.getPotentiallyInconsistentTitle(); - sContext.dumpLog(LOGTAG, "stored title, \"" + mOldTitleText + "\"."); - } - - @Override - public boolean hasStateChanged() { - // TODO: Additionally, consider Solo.waitForText. - // TODO: Robocop sleeps .5 sec between calls. Cache title view? - final CharSequence title = sToolbar.getPotentiallyInconsistentTitle(); - - // TODO: Handle the case where the URL is shown instead of page title by preference. - // HACK: We want to wait until the title changes to the state a tester may assert - // (e.g. the page title). However, the title is set to the URL before the title is - // loaded from the server and set as the final page title; we ignore the - // intermediate URL loading state here. - final boolean isLoading = LOADING_PREFIX.matcher(title).lookingAt(); - final boolean hasStateChanged = !isLoading && !mOldTitleText.equals(title); - - if (hasStateChanged) { - sContext.dumpLog(LOGTAG, "state changed to title, \"" + title + "\"."); - } - return hasStateChanged; - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testANRReporter.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testANRReporter.java deleted file mode 100644 index e3afeb8d9..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testANRReporter.java +++ /dev/null @@ -1,240 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.AppConstants; - -import android.content.Context; -import android.content.Intent; - -import com.robotium.solo.Condition; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; - -import org.json.JSONObject; - -/** - * Tests the proper operation of the ANR reporter. - */ -public class testANRReporter extends BaseTest { - - private static final String ANR_ACTION = "android.intent.action.ANR"; - private static final String PING_DIR = "saved-telemetry-pings"; - private static final int WAIT_FOR_PING_TIMEOUT = 60000; - private static final String ANR_PATH = "/data/anr/traces.txt"; - private static final String SAMPLE_ANR - = "----- pid 1 at 2014-01-15 18:55:51 -----\n" - + "Cmd line: " + AppConstants.ANDROID_PACKAGE_NAME + "\n" - + "\n" - + "JNI: CheckJNI is off; workarounds are off; pins=0; globals=397\n" - + "\n" - + "DALVIK THREADS:\n" - + "(mutexes: tll=0 tsl=0 tscl=0 ghl=0)\n" - + "\n" - + "\"main\" prio=5 tid=1 WAIT\n" - + " | group=\"main\" sCount=1 dsCount=0 obj=0x41d6bc90 self=0x41d5a3c8\n" - + " | sysTid=3485 nice=0 sched=0/0 cgrp=apps handle=1074852180\n" - + " | state=S schedstat=( 0 0 0 ) utm=1065 stm=152 core=0\n" - + " at java.lang.Object.wait(Native Method)\n" - + " - waiting on <0x427ab340> (a org.mozilla.gecko.GeckoEditable$5)\n" - + " at java.lang.Object.wait(Object.java:364)\n" - + " at org.mozilla.gecko.GeckoEditable$5.run(GeckoEditable.java:746)\n" - + " at android.os.Handler.handleCallback(Handler.java:733)\n" - + " at android.os.Handler.dispatchMessage(Handler.java:95)\n" - + " at android.os.Looper.loop(Looper.java:137)\n" - + " at android.app.ActivityThread.main(ActivityThread.java:4998)\n" - + " at java.lang.reflect.Method.invokeNative(Native Method)\n" - + " at java.lang.reflect.Method.invoke(Method.java:515)\n" - + " at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)\n" - + " at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)\n" - + " at dalvik.system.NativeStart.main(Native Method)\n" - + "\n" - + "\"Gecko\" prio=5 tid=16 SUSPENDED\n" - + " | group=\"main\" sCount=1 dsCount=0 obj=0x426e2b28 self=0x76ae92e8\n" - + " | sysTid=3541 nice=0 sched=0/0 cgrp=apps handle=1991153472\n" - + " | state=S schedstat=( 0 0 0 ) utm=1118 stm=145 core=0\n" - + " #00 pc 00000904 /system/lib/libc.so (__futex_syscall3+4294832136)\n" - + " #01 pc 0000eec4 /system/lib/libc.so (__pthread_cond_timedwait_relative+48)\n" - + " #02 pc 0000ef24 /system/lib/libc.so (__pthread_cond_timedwait+64)\n" - + " #03 pc 000536b7 /system/lib/libdvm.so\n" - + " #04 pc 00053c79 /system/lib/libdvm.so (dvmChangeStatus(Thread*, ThreadStatus)+34)\n" - + " #05 pc 00049507 /system/lib/libdvm.so\n" - + " #06 pc 0004d84b /system/lib/libdvm.so\n" - + " #07 pc 0003f1df /dev/ashmem/libxul.so (deleted)\n" - + " at org.mozilla.gecko.mozglue.GeckoLoader.nativeRun(Native Method)\n" - + " at org.mozilla.gecko.GeckoAppShell.runGecko(GeckoAppShell.java:384)\n" - + " at org.mozilla.gecko.GeckoThread.run(GeckoThread.java:177)\n" - + "\n" - + "----- end 1 -----\n" - + "\n" - + "\n" - + "----- pid 2 at 2013-01-25 13:27:01 -----\n" - + "Cmd line: system_server\n" - + "\n" - + "----- end 2 -----\n"; - - private boolean mDone; - - private JSONObject readPingFile(final File pingFile) throws Exception { - final long fileSize = pingFile.length(); - if (fileSize == 0 || fileSize > Integer.MAX_VALUE) { - throw new Exception("Invalid ping file size"); - } - final char[] buffer = new char[(int) fileSize]; - final FileReader reader = new FileReader(pingFile); - try { - final int readSize = reader.read(buffer); - if (readSize == 0 || readSize > buffer.length) { - throw new Exception("Invalid number of bytes read"); - } - } finally { - reader.close(); - } - return new JSONObject(new String(buffer)); - } - - public void testANRReporter() throws Exception { - blockForGeckoReady(); - - // Cannot test ANR reporter if it's disabled. - if (!AppConstants.MOZ_ANDROID_ANR_REPORTER) { - mAsserter.ok(true, "ANR reporter is disabled", null); - return; - } - - // For the ANR reporter to work, we need to provide sample ANR traces to it. - // Therefore, we need the ANR file to exist and writable. If not, we don't - // have the right permissions to create the file, so we just bail. - final File anrFile = new File(ANR_PATH); - if (!anrFile.exists()) { - mAsserter.ok(true, "ANR file does not exist", null); - return; - } - if (!anrFile.canWrite()) { - mAsserter.ok(true, "ANR file is not writable", null); - return; - } - - final FileWriter anrWriter = new FileWriter(anrFile); - try { - anrWriter.write(SAMPLE_ANR); - } finally { - anrWriter.close(); - } - - // Block the UI thread to simulate an ANR - final Runnable uiBlocker = new Runnable() { - @Override - public synchronized void run() { - while (!mDone) { - try { - wait(); - } catch (final InterruptedException e) { - } - } - } - }; - getActivity().runOnUiThread(uiBlocker); - - // Make sure our initial ping directory is empty. - final File pingDir = new File(mProfile, PING_DIR); - final String[] initialFiles = pingDir.list(); - mAsserter.ok(initialFiles == null || initialFiles.length == 0, - "Ping directory is empty", null); - - final Intent anrIntent = new Intent(ANR_ACTION); - anrIntent.setPackage(AppConstants.ANDROID_PACKAGE_NAME); - mAsserter.is(anrIntent.getPackage(), AppConstants.ANDROID_PACKAGE_NAME, - "Successfully set package name"); - - final Context testContext = getInstrumentation().getContext(); - mAsserter.isnot(testContext, null, "testContext should not be null"); - - // Trigger the ANR. - mAsserter.info("Triggering ANR", null); - testContext.sendBroadcast(anrIntent); - - // ANR reporter is supposed to ignore duplicate ANRs. - // This will be checked later when we look for ping files. - mAsserter.info("Triggering second ANR", null); - testContext.sendBroadcast(new Intent(anrIntent)); - - waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - mAsserter.info("Waiting for ping", null); - - try { - // Sleep to allow the ANR reporter thread time to process the ANR. - Thread.sleep(1000); - } catch (final InterruptedException e) { - } - - final File[] newFiles = pingDir.listFiles(); - if (newFiles == null || newFiles.length == 0) { - // Keep waiting. - return false; - } - // Make sure we have a complete file. We skip assertions and catch all - // exceptions here because the condition may not be satisfied now but may - // be satisfied later. After the wait is over, we will repeat the same - // steps with assertions and exceptions. - try { - return readPingFile(newFiles[0]).has("slug"); - } catch (final Exception e) { - return false; - } - } - }, WAIT_FOR_PING_TIMEOUT); - - mAsserter.ok(pingDir.exists(), "Ping directory exists", null); - mAsserter.ok(pingDir.isDirectory(), "Ping directory is a directory", null); - - final File[] newFiles = pingDir.listFiles(); - mAsserter.isnot(newFiles, null, "Ping directory is not empty"); - mAsserter.is(newFiles.length, 1, "ANR reporter wrote one ping"); - mAsserter.ok(newFiles[0].exists(), "Ping exists", null); - mAsserter.ok(newFiles[0].isFile(), "Ping is a file", null); - mAsserter.ok(newFiles[0].canRead(), "Ping is readable", null); - mAsserter.info("Found ping file", newFiles[0].getPath()); - - // Check standard properties required by Telemetry server. - final JSONObject pingObject = readPingFile(newFiles[0]); - mAsserter.ok(pingObject.has("slug"), "Ping has slug property", null); - mAsserter.ok(pingObject.has("reason"), "Ping has reason property", null); - mAsserter.ok(pingObject.has("payload"), "Ping has payload property", null); - - final JSONObject pingPayload = pingObject.getJSONObject("payload"); - mAsserter.ok(pingPayload.has("ver"), "Payload has ver property", null); - mAsserter.ok(pingPayload.has("info"), "Payload has info property", null); - mAsserter.ok(pingPayload.has("androidANR"), "Payload has androidANR property", null); - - final JSONObject pingInfo = pingPayload.getJSONObject("info"); - mAsserter.ok(pingInfo.has("reason"), "Info has reason property", null); - mAsserter.ok(pingInfo.has("appName"), "Info has appName property", null); - mAsserter.ok(pingInfo.has("appUpdateChannel"), "Info has appUpdateChannel property", null); - mAsserter.ok(pingInfo.has("appVersion"), "Info has appVersion property", null); - mAsserter.ok(pingInfo.has("appBuildID"), "Info has appBuildID property", null); - - // Do some profile clean up. This is not absolutely necessary because the profile - // is blown away after test runs anyways, so we don't check return values here. - for (final File ping : newFiles) { - ping.delete(); - } - pingDir.delete(); - - // Unblock UI thread - synchronized (uiBlocker) { - mDone = true; - uiBlocker.notify(); - } - - // Clear the sample ANR - final FileWriter anrClearer = new FileWriter(anrFile); - anrClearer.close(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomePageNavigation.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomePageNavigation.java deleted file mode 100644 index 68f3a38db..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomePageNavigation.java +++ /dev/null @@ -1,107 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.home.HomeConfig.PanelType; -import org.mozilla.gecko.tests.helpers.DeviceHelper; -import org.mozilla.gecko.tests.helpers.GeckoHelper; - -/** - * Tests functionality related to navigating between the various about:home panels. - */ -public class testAboutHomePageNavigation extends UITest { - // TODO: Define this test dynamically by creating dynamic representations of the Page - // enum for both phone and tablet, then swiping through the panels. This will also - // benefit having a HomePager with custom panels. - public void testAboutHomePageNavigation() { - GeckoHelper.blockForDelayedStartup(); - - mAboutHome.assertVisible() - .assertCurrentPanel(PanelType.TOP_SITES); - - mAboutHome.swipeToPanelOnRight(); - mAboutHome.assertCurrentPanel(PanelType.BOOKMARKS); - - // Ideally these helpers would just be their own tests. However, by keeping this within - // one method, we're saving test setUp and tearDown resources. - if (DeviceHelper.isTablet()) { - helperTestTablet(); - } else { - helperTestPhone(); - } - } - - private void helperTestTablet() { - mAboutHome.swipeToPanelOnRight(); - mAboutHome.assertCurrentPanel(PanelType.COMBINED_HISTORY); - - // Edge case. - mAboutHome.swipeToPanelOnRight(); - mAboutHome.assertCurrentPanel(PanelType.COMBINED_HISTORY); - - mAboutHome.swipeToPanelOnLeft(); - mAboutHome.assertCurrentPanel(PanelType.BOOKMARKS); - - mAboutHome.swipeToPanelOnLeft(); - mAboutHome.assertCurrentPanel(PanelType.TOP_SITES); - - // Edge case. - mAboutHome.swipeToPanelOnLeft(); - mAboutHome.assertCurrentPanel(PanelType.TOP_SITES); - } - - private void helperTestPhone() { - // Edge case. - mAboutHome.swipeToPanelOnLeft(); - mAboutHome.assertCurrentPanel(PanelType.BOOKMARKS); - - mAboutHome.swipeToPanelOnLeft(); - mAboutHome.assertCurrentPanel(PanelType.TOP_SITES); - - mAboutHome.swipeToPanelOnLeft(); - mAboutHome.assertCurrentPanel(PanelType.COMBINED_HISTORY); - - // Edge case. - mAboutHome.swipeToPanelOnLeft(); - mAboutHome.assertCurrentPanel(PanelType.COMBINED_HISTORY); - - mAboutHome.swipeToPanelOnRight(); - mAboutHome.assertCurrentPanel(PanelType.TOP_SITES); - } - - // TODO: bug 943706 - reimplement this old test code. - /* - // Removed by Bug 896576 - [fig] Remove [getAllPagesList] from BaseTest - // ListView list = getAllPagesList("about:firefox"); - - // Test normal sliding of the list left and right - ViewPager pager = (ViewPager)mSolo.getView(ViewPager.class, 0); - mAsserter.is(pager.getCurrentItem(), 0, "All pages is selected"); - - int width = mDriver.getGeckoWidth() / 2; - int y = mDriver.getGeckoHeight() / 2; - mActions.drag(width, 0, y, y); - mAsserter.is(pager.getCurrentItem(), 1, "Bookmarks page is selected"); - - mActions.drag(0, width, y, y); - mAsserter.is(pager.getCurrentItem(), 0, "All pages is selected"); - - // Test tapping on the tab strip changes tabs - TabWidget tabwidget = (TabWidget)mSolo.getView(TabWidget.class, 0); - mSolo.clickOnView(tabwidget.getChildAt(1)); - mAsserter.is(pager.getCurrentItem(), 1, "Clicking on tab selected bookmarks page"); - - // Test typing in the awesomebar changes tabs and prevents panning - mSolo.typeText(0, "woot"); - mAsserter.is(pager.getCurrentItem(), 0, "Searching switched to all pages tab"); - mSolo.scrollToSide(Solo.LEFT); - mAsserter.is(pager.getCurrentItem(), 0, "Dragging left is not allowed when searching"); - - mSolo.scrollToSide(Solo.RIGHT); - mAsserter.is(pager.getCurrentItem(), 0, "Dragging right is not allowed when searching"); - - mSolo.goBack(); - */ -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomeVisibility.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomeVisibility.java deleted file mode 100644 index 3be6ed53f..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutHomeVisibility.java +++ /dev/null @@ -1,57 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.home.HomeConfig; -import org.mozilla.gecko.home.HomeConfig.PanelType; -import org.mozilla.gecko.tests.helpers.GeckoHelper; -import org.mozilla.gecko.tests.helpers.NavigationHelper; - -/** - * Tests the visibility of about:home after various interactions with the browser. - */ -public class testAboutHomeVisibility extends UITest { - public void testAboutHomeVisibility() { - GeckoHelper.blockForReady(); - - // Check initial state on about:home. - mToolbar.assertTitle(mStringHelper.ABOUT_HOME_URL); - mAboutHome.assertVisible() - .assertCurrentPanel(PanelType.TOP_SITES); - - // Go to blank 01. - NavigationHelper.enterAndLoadUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - mToolbar.assertTitle(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - mAboutHome.assertNotVisible(); - - // Go to blank 02. - NavigationHelper.enterAndLoadUrl(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - mToolbar.assertTitle(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - mAboutHome.assertNotVisible(); - - // Enter editing mode, where the about:home UI should be visible. - mToolbar.enterEditingMode(); - mAboutHome.assertVisible() - .assertCurrentPanel(PanelType.TOP_SITES); - - // Dismiss editing mode, where the about:home UI should be gone. - mToolbar.dismissEditingMode(); - mAboutHome.assertNotVisible(); - - // Loading about:home should show about:home again. - NavigationHelper.enterAndLoadUrl(mStringHelper.ABOUT_HOME_URL); - mToolbar.assertTitle(mStringHelper.ABOUT_HOME_URL); - mAboutHome.assertVisible() - .assertCurrentPanel(PanelType.TOP_SITES); - - // We can navigate to about:home panels by panel UUID. - mAboutHome.navigateToBuiltinPanelType(PanelType.BOOKMARKS) - .assertVisible() - .assertCurrentPanel(PanelType.BOOKMARKS); - mAboutHome.navigateToBuiltinPanelType(PanelType.COMBINED_HISTORY) - .assertVisible() - .assertCurrentPanel(PanelType.COMBINED_HISTORY); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutPage.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutPage.java deleted file mode 100644 index 6a00acd96..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAboutPage.java +++ /dev/null @@ -1,47 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; - -/* Tests related to the about: page: - * - check that about: loads from the URL bar - * - check that about: loads from Settings/About... - */ -public class testAboutPage extends PixelTest { - - public void testAboutPage() { - blockForGeckoReady(); - - // Load the about: page and verify its title. - String url = mStringHelper.ABOUT_SCHEME; - loadAndPaint(url); - - verifyUrlInContentDescription(url); - - // Open a new page to remove the about: page from the current tab. - url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - loadUrlAndWait(url); - - // At this point the page title should have been set. - verifyUrlInContentDescription(url); - - // Set up listeners to catch the page load we're about to do. - Actions.EventExpecter tabEventExpecter = mActions.expectGeckoEvent("Tab:Added"); - Actions.EventExpecter contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded"); - - selectSettingsItem(mStringHelper.MOZILLA_SECTION_LABEL, mStringHelper.ABOUT_LABEL); - - // Wait for the new tab and page to load - tabEventExpecter.blockForEvent(); - contentEventExpecter.blockForEvent(); - - tabEventExpecter.unregisterListener(); - contentEventExpecter.unregisterListener(); - - // Make sure the about: page was loaded. - verifyUrlInContentDescription(mStringHelper.ABOUT_SCHEME); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAccessibleCarets.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAccessibleCarets.java deleted file mode 100644 index d064eb1dd..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAccessibleCarets.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - */ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.AppConstants; -import org.mozilla.gecko.Tab; -import org.mozilla.gecko.Tabs; - -import android.util.Log; - -import org.json.JSONException; -import org.json.JSONObject; - - -public class testAccessibleCarets extends JavascriptTest { - private static final String LOGTAG = "testAccessibleCarets"; - private static final String TAB_CHANGE_EVENT = "testAccessibleCarets:TabChange"; - - private final TabsListener tabsListener; - - - public testAccessibleCarets() { - super("testAccessibleCarets.js"); - - tabsListener = new TabsListener(); - } - - @Override - public void setUp() throws Exception { - super.setUp(); - - Tabs.registerOnTabsChangedListener(tabsListener); - } - - @Override - public void tearDown() throws Exception { - Tabs.unregisterOnTabsChangedListener(tabsListener); - - super.tearDown(); - } - - @Override - public void testJavascript() throws Exception { - // This feature is currently only available in Nightly. - if (!AppConstants.NIGHTLY_BUILD) { - mAsserter.dumpLog(LOGTAG + " is disabled on non-Nightly builds: returning"); - return; - } - super.testJavascript(); - } - - /** - * Observes tab change events to broadcast to the test script. - */ - private class TabsListener implements Tabs.OnTabsChangedListener { - @Override - public void onTabChanged(Tab tab, Tabs.TabEvents msg, String data) { - switch (msg) { - case STOP: - final JSONObject args = new JSONObject(); - try { - args.put("tabId", tab.getId()); - args.put("event", msg.toString()); - } catch (JSONException e) { - Log.e(LOGTAG, "Error building JSON arguments for " + TAB_CHANGE_EVENT, e); - return; - } - mActions.sendGeckoEvent(TAB_CHANGE_EVENT, args.toString()); - break; - } - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testActivityStreamContextMenu.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testActivityStreamContextMenu.java deleted file mode 100644 index b4b06a236..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testActivityStreamContextMenu.java +++ /dev/null @@ -1,94 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.support.design.widget.NavigationView; -import android.support.v4.app.Fragment; -import android.view.KeyEvent; -import android.view.MenuItem; -import android.view.View; - -import com.robotium.solo.Condition; - -import org.mozilla.gecko.R; -import org.mozilla.gecko.db.BrowserDB; -import org.mozilla.gecko.home.activitystream.ActivityStream; -import org.mozilla.gecko.home.activitystream.menu.ActivityStreamContextMenu; - -/** - * This test is unfortunately closely coupled to the current implementation, however it is still - * useful in that it tests the bookmark/history state specific menu items for correctness. - */ -public class testActivityStreamContextMenu extends BaseTest { - public void testActivityStreamContextMenu() { - blockForGeckoReady(); - - final String testURL = "http://mozilla.org"; - - BrowserDB db = BrowserDB.from(getActivity()); - db.removeHistoryEntry(getActivity().getContentResolver(), testURL); - db.removeBookmarksWithURL(getActivity().getContentResolver(), testURL); - - testMenuForUrl(testURL, false, false); - - db.addBookmark(getActivity().getContentResolver(), "foobar", testURL); - testMenuForUrl(testURL, true, false); - - db.updateVisitedHistory(getActivity().getContentResolver(), testURL); - testMenuForUrl(testURL, true, true); - - db.removeBookmarksWithURL(getActivity().getContentResolver(), testURL); - testMenuForUrl(testURL, false, true); - } - - /** - * Test that the menu shows the expected menu items for a given URL, and that these items have - * the correct state. - */ - private void testMenuForUrl(final String url, final boolean isBookmarked, final boolean isVisited) { - final View anchor = new View(getActivity()); - - final ActivityStreamContextMenu menu = ActivityStreamContextMenu.show(getActivity(), anchor, ActivityStreamContextMenu.MenuMode.HIGHLIGHT, "foobar", url, null, null, 100, 100); - - final int expectedBookmarkString; - if (isBookmarked) { - expectedBookmarkString = R.string.bookmark_remove; - } else { - expectedBookmarkString = R.string.bookmark; - } - - final MenuItem bookmarkItem = menu.getItemByID(R.id.bookmark); - assertMenuItemHasString(bookmarkItem, expectedBookmarkString); - - final MenuItem deleteItem = menu.getItemByID(R.id.delete); - assertMenuItemIsVisible(deleteItem, isVisited); - - menu.dismiss(); - } - - private void assertMenuItemIsVisible(final MenuItem item, final boolean shouldBeVisible) { - waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return (item.isVisible() == shouldBeVisible); - } - }, 5000); - - mAsserter.is(item.isVisible(), shouldBeVisible, "menu item \"" + item.getTitle() + "\" should be visible"); - } - - private void assertMenuItemHasString(final MenuItem item, final int stringID) { - waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return item.isEnabled(); - } - }, 5000); - - final String expectedTitle = getActivity().getResources().getString(stringID); - mAsserter.is(item.getTitle(), expectedTitle, "Title does not match expected title"); - } -} - diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAddSearchEngine.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAddSearchEngine.java deleted file mode 100644 index 44bd1f903..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAddSearchEngine.java +++ /dev/null @@ -1,172 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.File; -import java.util.ArrayList; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.GeckoProfile; -import org.mozilla.gecko.home.HomePager; -import org.mozilla.gecko.home.SearchEngineBar; -import org.mozilla.gecko.R; - -import android.widget.ImageView; -import android.widget.ListView; - -import com.robotium.solo.Condition; - -/** - * Test adding a search engine from an input field context menu. - * 1. Get the number of existing search engines from the SearchEngine:Data event and as displayed in about:home. - * 2. Load a page with a text field, open the context menu and add a search engine from the page. - * 3. Get the number of search engines after adding the new one and verify it has increased by 1. - */ -public class testAddSearchEngine extends AboutHomeTest { - private final int MAX_WAIT_TEST_MS = 5000; - private final String SEARCH_TEXT = "Firefox for Android"; - private final String ADD_SEARCHENGINE_OPTION_TEXT = "Add as Search Engine"; - - public void testAddSearchEngine() { - String blankPageURL = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - String searchEngineURL = getAbsoluteUrl(mStringHelper.ROBOCOP_SEARCH_URL); - - blockForGeckoReady(); - int height = mDriver.getGeckoTop() + 150; - int width = mDriver.getGeckoLeft() + 150; - - inputAndLoadUrl(blankPageURL); - waitForText(mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); - - // Get the searchengine data by clicking the awesomebar - this causes Gecko to send Java the list - // of search engines. - Actions.EventExpecter searchEngineDataEventExpector = mActions.expectGeckoEvent("SearchEngines:Data"); - focusUrlBar(); - mActions.sendKeys(SEARCH_TEXT); - String eventData = searchEngineDataEventExpector.blockForEventData(); - searchEngineDataEventExpector.unregisterListener(); - - ArrayList searchEngines; - try { - // Parse the data to get the number of searchengines. - searchEngines = getSearchEnginesNames(eventData); - } catch (JSONException e) { - mAsserter.ok(false, "Fatal exception in testAddSearchEngine while decoding JSON search engine string from Gecko prior to addition of new engine.", e.toString()); - return; - } - final int initialNumSearchEngines = searchEngines.size(); - mAsserter.dumpLog("Search Engines list = " + searchEngines.toString()); - - // Verify that the number of displayed search engines is the same as the one received through the SearchEngines:Data event. - verifyDisplayedSearchEnginesCount(initialNumSearchEngines); - - // Load the page for the search engine to add. - inputAndLoadUrl(searchEngineURL); - verifyUrlBarTitle(searchEngineURL); - - // Used to long-tap on the search input box for the search engine to add. - getInstrumentation().waitForIdleSync(); - mAsserter.dumpLog("Long Clicking at width = " + String.valueOf(width) + " and height = " + String.valueOf(height)); - mSolo.clickLongOnScreen(width,height); - - ImageView view = waitForViewWithDescription(ImageView.class, ADD_SEARCHENGINE_OPTION_TEXT); - mAsserter.isnot(view, null, "The action mode was opened"); - - // Add the search engine - mSolo.clickOnView(view); - waitForText("Cancel"); - clickOnButton("OK"); - mAsserter.ok(!mSolo.searchText(ADD_SEARCHENGINE_OPTION_TEXT), "Adding the Search Engine", "The add Search Engine pop-up has been closed"); - waitForText(mStringHelper.ROBOCOP_SEARCH_TITLE); // Make sure the pop-up is closed and we are back at the searchengine page - - // Load Robocop Blank 1 again to give the time for the searchengine to be added - // TODO: This is a potential source of intermittent oranges - it's a race condition! - loadUrl(blankPageURL); - waitForText(mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); - - // Load search engines again and check that the quantity of engines has increased by 1. - searchEngineDataEventExpector = mActions.expectGeckoEvent("SearchEngines:Data"); - focusUrlBar(); - mActions.sendKeys(SEARCH_TEXT); - eventData = searchEngineDataEventExpector.blockForEventData(); - - try { - // Parse the data to get the number of searchengines - searchEngines = getSearchEnginesNames(eventData); - } catch (JSONException e) { - mAsserter.ok(false, "Fatal exception in testAddSearchEngine while decoding JSON search engine string from Gecko after adding of new engine.", e.toString()); - return; - } - - mAsserter.dumpLog("Search Engines list = " + searchEngines.toString()); - mAsserter.is(searchEngines.size(), initialNumSearchEngines + 1, "Checking the number of Search Engines has increased"); - - // Verify that the number of displayed searchengines is the same as the one received through the SearchEngines:Data event. - verifyDisplayedSearchEnginesCount(initialNumSearchEngines + 1); - searchEngineDataEventExpector.unregisterListener(); - - // Verify that the search plugin XML file for the new engine ended up where we expected it to. - // This file name is created in nsSearchService.js based on the name of the new engine. - final File f = GeckoProfile.get(getActivity()).getFile("searchplugins/robocop-search-engine.xml"); - mAsserter.ok(f.exists(), "Checking that new search plugin file exists", ""); - } - - /** - * Helper method to decode a list of search engine names from the provided search engine information - * JSON string sent from Gecko. - * @param searchEngineData The JSON string representing the search engine array to process - * @return An ArrayList containing the names of all the search engines represented in - * the provided JSON message. - * @throws JSONException In the event that the JSON provided cannot be decoded. - */ - public ArrayList getSearchEnginesNames(String searchEngineData) throws JSONException { - JSONObject data = new JSONObject(searchEngineData); - JSONArray engines = data.getJSONArray("searchEngines"); - - ArrayList searchEngineNames = new ArrayList(); - for (int i = 0; i < engines.length(); i++) { - JSONObject engineJSON = engines.getJSONObject(i); - searchEngineNames.add(engineJSON.getString("name")); - } - return searchEngineNames; - } - - /** - * Method to verify that the displayed number of search engines matches the expected number. - * @param expectedCount The expected number of search engines. - */ - public void verifyDisplayedSearchEnginesCount(final int expectedCount) { - mSolo.clearEditText(0); - mActions.sendKeys(SEARCH_TEXT); - boolean correctNumSearchEnginesDisplayed = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - ListView searchResultList = findListViewWithTag(HomePager.LIST_TAG_BROWSER_SEARCH); - if (searchResultList == null || searchResultList.getAdapter() == null) { - return false; - } - - SearchEngineBar searchEngineBar = (SearchEngineBar) mSolo.getView(R.id.search_engine_bar); - if (searchEngineBar == null || searchEngineBar.getAdapter() == null) { - return false; - } - - final int actualCount = searchResultList.getAdapter().getCount() - + searchEngineBar.getAdapter().getItemCount() - - 1; // Subtract one for the search engine bar label (Bug 1172071) - - return (actualCount == expectedCount); - } - }, MAX_WAIT_TEST_MS); - - // Exit about:home - mSolo.goBack(); - waitForText(mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); - mAsserter.ok(correctNumSearchEnginesDisplayed, expectedCount + " Search Engines should be displayed" , "The correct number of Search Engines has been displayed"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAddonManager.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAddonManager.java deleted file mode 100644 index 4256d93c4..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAddonManager.java +++ /dev/null @@ -1,79 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.json.JSONObject; -import org.mozilla.gecko.Actions; - -import android.util.DisplayMetrics; - -/** - * This test performs the following steps to check the behavior of the Add-on Manager: - * - * 1) Open the Add-on Manager from the Add-ons menu item, and then close it. - * 2) Open the Add-on Manager by visiting about:addons in the URL bar. - * 3) Open a new tab, select the Add-ons menu item, then verify that the existing - * Add-on Manager tab was selected, instead of opening a new tab. - */ -public class testAddonManager extends PixelTest { - public void testAddonManager() { - Actions.EventExpecter tabEventExpecter; - Actions.EventExpecter contentEventExpecter; - final String aboutAddonsURL = mStringHelper.ABOUT_ADDONS_URL; - - blockForGeckoReady(); - - // Use the menu to open the Addon Manger - selectMenuItem(mStringHelper.ADDONS_LABEL); - - // Set up listeners to catch the page load we're about to do - tabEventExpecter = mActions.expectGeckoEvent("Tab:Added"); - contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded"); - - // Wait for the new tab and page to load - tabEventExpecter.blockForEvent(); - contentEventExpecter.blockForEvent(); - - tabEventExpecter.unregisterListener(); - contentEventExpecter.unregisterListener(); - - // Verify the url - verifyUrlBarTitle(aboutAddonsURL); - - // Close the Add-on Manager - mSolo.goBack(); - - // Load the about:addons page and verify it was loaded - loadAndPaint(aboutAddonsURL); - verifyUrlBarTitle(aboutAddonsURL); - - // Setup wait for tab to spawn and load - tabEventExpecter = mActions.expectGeckoEvent("Tab:Added"); - contentEventExpecter = mActions.expectGeckoEvent("DOMContentLoaded"); - - // Open a new tab - final String blankURL = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - addTab(blankURL); - - // Wait for the new tab and page to load - tabEventExpecter.blockForEvent(); - contentEventExpecter.blockForEvent(); - - tabEventExpecter.unregisterListener(); - contentEventExpecter.unregisterListener(); - - // Verify tab count has increased - verifyTabCount(2); - - // Verify the page was opened - verifyUrlBarTitle(blankURL); - - // Addons Manager is not opened 2 separate times when opened from the menu - selectMenuItem(mStringHelper.ADDONS_LABEL); - - // Verify tab count not increased - verifyTabCount(2); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAdobeFlash.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAdobeFlash.java deleted file mode 100644 index 13f7f817a..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAdobeFlash.java +++ /dev/null @@ -1,39 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.json.JSONObject; -import org.mozilla.gecko.PaintedSurface; - -import android.os.Build; - -/** - * Tests that Flash is working - * - loads a page containing a Flash plugin - * - verifies it rendered properly - */ -public class testAdobeFlash extends PixelTest { - public void testLoad() { - // This test only works on ICS and higher - if (Build.VERSION.SDK_INT < 15) { - blockForGeckoReady(); - return; - } - - // Enable plugins - setPreferenceAndWaitForChange("plugin.enable", "1"); - - blockForGeckoReady(); - - String url = getAbsoluteUrl(mStringHelper.ROBOCOP_ADOBE_FLASH_URL); - PaintedSurface painted = loadAndGetPainted(url); - - mAsserter.ispixel(painted.getPixelAt(0, 0), 0, 0xff, 0, "Pixel at 0, 0"); - mAsserter.ispixel(painted.getPixelAt(50, 50), 0, 0xff, 0, "Pixel at 50, 50"); - mAsserter.ispixel(painted.getPixelAt(101, 0), 0xff, 0xff, 0xff, "Pixel at 101, 0"); - mAsserter.ispixel(painted.getPixelAt(0, 101), 0xff, 0xff, 0xff, "Pixel at 0, 101"); - - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAppMenuPathways.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAppMenuPathways.java deleted file mode 100644 index 69efb4dec..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAppMenuPathways.java +++ /dev/null @@ -1,77 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.json.JSONObject; -import org.mozilla.gecko.Tabs; -import org.mozilla.gecko.tests.components.AppMenuComponent; -import org.mozilla.gecko.tests.helpers.GeckoHelper; -import org.mozilla.gecko.tests.helpers.NavigationHelper; - -import com.robotium.solo.Solo; - -/** - * Set of tests to test UI App menu and submenus the user interact with. - */ -public class testAppMenuPathways extends UITest { - - /** - * Robocop supports only a single test function per test class. Therefore, we - * have a single top-level test function that dispatches to sub-tests. - */ - public void testAppMenuPathways() { - GeckoHelper.blockForReady(); - - _testHardwareMenuKeyOpenClose(); - _testSaveAsPDFPathway(); - } - - public void _testHardwareMenuKeyOpenClose() { - mAppMenu.assertMenuIsNotOpen(); - - mSolo.sendKey(Solo.MENU); - mAppMenu.waitForMenuOpen(); - mAppMenu.assertMenuIsOpen(); - - mSolo.sendKey(Solo.MENU); - mAppMenu.waitForMenuClose(); - mAppMenu.assertMenuIsNotOpen(); - } - - public void _testSaveAsPDFPathway() { - // Page menu should be disabled in about:home. - mAppMenu.assertMenuItemIsDisabledAndVisible(AppMenuComponent.PageMenuItem.SAVE_AS_PDF); - - // Generate a mock Content:LocationChange message with video mime-type for the current tab (tabId = 0). - final JSONObject message = new JSONObject(); - try { - message.put("contentType", "video/webm"); - message.put("baseDomain", "webmfiles.org"); - message.put("type", "Content:LocationChange"); - message.put("sameDocument", false); - message.put("userRequested", ""); - message.put("uri", getAbsoluteIpUrl("/big-buck-bunny_trailer.webm")); - message.put("tabID", 0); - } catch (Exception ex) { - mAsserter.ok(false, "exception in testSaveAsPDFPathway", ex.toString()); - } - - // Mock video playback with the generated message and Content:LocationChange event. - Tabs.getInstance().handleMessage("Content:LocationChange", message); - - // Save as pdf menu is disabled while playing video. - mAppMenu.assertMenuItemIsDisabledAndVisible(AppMenuComponent.PageMenuItem.SAVE_AS_PDF); - - // The above mock video playback test changes Java state, but not the associated JS state. - // Navigate to a new page so that the Java state is cleared. - NavigationHelper.enterAndLoadUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - mToolbar.assertTitle(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - - // Test save as pdf functionality. - // The following call doesn't wait for the resulting pdf but checks that no exception are thrown. - // NOTE: save as pdf functionality must be done at the end as it is slow and cause other test operations to fail. - mAppMenu.pressMenuItem(AppMenuComponent.PageMenuItem.SAVE_AS_PDF); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAxisLocking.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAxisLocking.java deleted file mode 100644 index 72bf62e04..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testAxisLocking.java +++ /dev/null @@ -1,58 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.PaintedSurface; - -/** - * Basic test for axis locking behaviour. - * - Load page and verify it draws - * - Drag page upwards 100 pixels at a 5-degree angle off the vertical axis - * - Verify that the 5-degree angle was thrown out and it dragged vertically - * - Drag page upwards at a 45-degree angle - * - Verify that the 45-degree angle was not thrown out and it dragged diagonally - */ -public class testAxisLocking extends PixelTest { - public void testAxisLocking() { - String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL); - - MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop()); - - blockForGeckoReady(); - - // load page and check we're at 0,0 - loadAndVerifyBoxes(url); - - // drag page upwards by 100 pixels with a slight angle. verify that - // axis locking prevents any horizontal scrolling - Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint(); - meh.dragSync(20, 150, 10, 50); - PaintedSurface painted = waitForPaint(paintExpecter); - paintExpecter.unregisterListener(); - try { - checkScrollWithBoxes(painted, 0, 100); - // since checkScrollWithBoxes only checks 4 points, it may not pick up a - // sub-100 pixel horizontal shift. so we check another point manually to make sure. - int[] color = getBoxColorAt(0, 100); - mAsserter.ispixel(painted.getPixelAt(99, 0), color[0], color[1], color[2], "Pixel at 99, 0 indicates no horizontal scroll"); - - // now drag at a 45-degree angle to ensure we break the axis lock, and - // verify that we have both horizontal and vertical scrolling - paintExpecter = mActions.expectPaint(); - meh.dragSync(150, 150, 50, 50); - } finally { - painted.close(); - } - - painted = waitForPaint(paintExpecter); - paintExpecter.unregisterListener(); - try { - checkScrollWithBoxes(painted, 100, 200); - } finally { - painted.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBackButtonInEditMode.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBackButtonInEditMode.java deleted file mode 100644 index b391f7920..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBackButtonInEditMode.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.tests.helpers.GeckoHelper; - -import android.view.View; - -/** - * Tests that verify the behavior of back button in edit mode. - */ -public class testBackButtonInEditMode extends UITest { - public void testBackButtonInEditMode() { - GeckoHelper.blockForReady(); - - // Verify back button behavior for edit mode. - mToolbar.enterEditingMode() - .assertIsUrlEditTextSelected(); - checkBackPressInEditMode(); - checkExitUsingBackButton(); - - // Verify back button behavior in edit mode after input. - mToolbar.enterEditingMode() - .enterUrl("dummy") - .assertIsUrlEditTextSelected(); - checkBackPressInEditMode(); - checkExitUsingBackButton(); - - // Verify the swipe behavior in edit mode. - mToolbar.enterEditingMode() - .assertIsUrlEditTextSelected(); - mAboutHome.swipeToPanelOnLeft(); - mToolbar.assertIsUrlEditTextNotSelected() - .assertIsEditing(); - checkExitUsingBackButton(); - } - - private void checkBackPressInEditMode() { - // Press back button and verify URLEditText is not selected. - getSolo().goBack(); - mToolbar.assertIsUrlEditTextNotSelected() - .assertIsEditing(); - } - - private void checkExitUsingBackButton() { - getSolo().goBack(); - mToolbar.assertIsNotEditing(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmark.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmark.java deleted file mode 100644 index 041b76e2f..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmark.java +++ /dev/null @@ -1,72 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import com.robotium.solo.Condition; - -public class testBookmark extends AboutHomeTest { - private static String BOOKMARK_URL; - private static final int WAIT_FOR_BOOKMARKED_TIMEOUT = 10000; - - public void testBookmark() { - BOOKMARK_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - runAboutHomeTest(); - runMenuTest(); - } - - public void runMenuTest() { - mAsserter.is(mDatabaseHelper.isBookmark(BOOKMARK_URL), false, "Page is not bookmarked initially"); - setUpBookmark(); // loads the page, taps the star button, and waits for the "Bookmark Added" message - waitForBookmarked(true); - - cleanUpBookmark(); // loads the page, taps the star button, and waits for the "Bookmark Removed" message - waitForBookmarked(false); - } - - public void runAboutHomeTest() { - blockForGeckoReady(); - for (String url : mStringHelper.DEFAULT_BOOKMARKS_URLS) { - mAsserter.ok(mDatabaseHelper.isBookmark(url), "Checking that " + url + " is bookmarked by default", url + " is bookmarked"); - } - - mDatabaseHelper.addMobileBookmark(mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, BOOKMARK_URL); - waitForBookmarked(true); - - isBookmarkDisplayed(BOOKMARK_URL); - loadBookmark(BOOKMARK_URL); - verifyUrlBarTitle(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - - mDatabaseHelper.deleteBookmark(BOOKMARK_URL); - waitForBookmarked(false); - } - - private void waitForBookmarked(final boolean isBookmarked) { - boolean bookmarked = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return (isBookmarked) ? - mDatabaseHelper.isBookmark(BOOKMARK_URL) : - !mDatabaseHelper.isBookmark(BOOKMARK_URL); - } - }, WAIT_FOR_BOOKMARKED_TIMEOUT); - mAsserter.is(bookmarked, true, BOOKMARK_URL + " was " + (isBookmarked ? "added as a bookmark" : "removed from bookmarks")); - } - - private void setUpBookmark() { - // Bookmark a page for the test - loadUrl(BOOKMARK_URL); - waitForText(mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); - toggleBookmark(); - mAsserter.is(waitForText(mStringHelper.BOOKMARK_ADDED_LABEL), true, "bookmark added successfully"); - } - - private void cleanUpBookmark() { - // Go back to the page we bookmarked - loadUrl(BOOKMARK_URL); - waitForText(mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE); - toggleBookmark(); - mAsserter.is(waitForText(mStringHelper.BOOKMARK_REMOVED_LABEL), true, "bookmark removed successfully"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarkFolders.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarkFolders.java deleted file mode 100644 index 6205337ea..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarkFolders.java +++ /dev/null @@ -1,169 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.home.HomePager; -import org.mozilla.gecko.sync.Utils; - -import android.content.ContentResolver; -import android.content.ContentValues; -import android.net.Uri; -import android.view.View; -import android.widget.ListAdapter; -import android.widget.ListView; -import android.widget.TextView; - -import com.robotium.solo.Condition; - -public class testBookmarkFolders extends AboutHomeTest { - private static String DESKTOP_BOOKMARK_URL; - - public void testBookmarkFolders() { - DESKTOP_BOOKMARK_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - - setUpDesktopBookmarks(); - checkBookmarkList(); - } - - private void checkBookmarkList() { - openAboutHomeTab(AboutHomeTabs.BOOKMARKS); - waitForText(mStringHelper.DESKTOP_FOLDER_LABEL); - clickOnBookmarkFolder(mStringHelper.DESKTOP_FOLDER_LABEL); - waitForText(mStringHelper.TOOLBAR_FOLDER_LABEL); - - // Verify the number of folders displayed in the Desktop Bookmarks folder is correct - ListView desktopFolderContent = findListViewWithTag(HomePager.LIST_TAG_BOOKMARKS); - ListAdapter adapter = desktopFolderContent.getAdapter(); - - // Three folders and "Up to Bookmarks". - mAsserter.is(adapter.getCount(), 4, "Checking that the correct number of folders is displayed in the Desktop Bookmarks folder"); - - clickOnBookmarkFolder(mStringHelper.TOOLBAR_FOLDER_LABEL); - - // Go up in the bookmark folder hierarchy - clickOnBookmarkFolder(String.format(mStringHelper.BOOKMARKS_UP_TO, mStringHelper.DESKTOP_FOLDER_LABEL)); - mAsserter.ok(waitForText(mStringHelper.BOOKMARKS_MENU_FOLDER_LABEL), "Going up in the folder hierarchy", "We are back in the Desktop Bookmarks folder"); - - clickOnBookmarkFolder(String.format(mStringHelper.BOOKMARKS_UP_TO, mStringHelper.BOOKMARKS_ROOT_LABEL)); - mAsserter.ok(waitForText(mStringHelper.DESKTOP_FOLDER_LABEL), "Going up in the folder hierarchy", "We are back in the main Bookmarks List View"); - - clickOnBookmarkFolder(mStringHelper.DESKTOP_FOLDER_LABEL); - clickOnBookmarkFolder(mStringHelper.TOOLBAR_FOLDER_LABEL); - isBookmarkDisplayed(DESKTOP_BOOKMARK_URL); - - // Open the bookmark from a bookmark folder hierarchy - loadBookmark(DESKTOP_BOOKMARK_URL); - verifyUrlBarTitle(DESKTOP_BOOKMARK_URL); - openAboutHomeTab(AboutHomeTabs.BOOKMARKS); - - // Check that folders don't have a context menu - boolean success = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - View desktopFolder = getBookmarkFolderView(mStringHelper.DESKTOP_FOLDER_LABEL); - if (desktopFolder == null) { - return false; - } - mSolo.clickLongOnView(desktopFolder); - return true; } - }, MAX_WAIT_MS); - - mAsserter.ok(success, "Trying to long click on the Desktop Bookmarks","Desktop Bookmarks folder could not be long clicked"); - - final String contextMenuString = mStringHelper.BOOKMARK_CONTEXT_MENU_ITEMS[0]; - mAsserter.ok(!waitForText(contextMenuString), "Folders do not have context menus", "The context menu was not opened"); - - // Even if no context menu is opened long clicking a folder still opens it. We need to close it. - clickOnBookmarkFolder(String.format(mStringHelper.BOOKMARKS_UP_TO, mStringHelper.BOOKMARKS_ROOT_LABEL)); - } - - private void clickOnBookmarkFolder(final String folderName) { - boolean success = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - View bookmarksFolder = getBookmarkFolderView(folderName); - if (bookmarksFolder == null) { - return false; - } - mSolo.waitForView(bookmarksFolder); - mSolo.clickOnView(bookmarksFolder); - return true; - } - }, MAX_WAIT_MS); - mAsserter.ok(success, "Trying to click on the " + folderName + " folder","The " + folderName + " folder was clicked"); - } - - private View getBookmarkFolderView(String folderName) { - openAboutHomeTab(AboutHomeTabs.BOOKMARKS); - mSolo.hideSoftKeyboard(); - getInstrumentation().waitForIdleSync(); - - ListView bookmarksTabList = findListViewWithTag(HomePager.LIST_TAG_BOOKMARKS); - if (!waitForNonEmptyListToLoad(bookmarksTabList)) { - return null; - } - - ListAdapter adapter = bookmarksTabList.getAdapter(); - if (adapter == null) { - return null; - } - - for (int i = 0; i < adapter.getCount(); i++ ) { - View bookmarkView = bookmarksTabList.getChildAt(i); - if (bookmarkView instanceof TextView) { - TextView folderTextView = (TextView) bookmarkView; - if (folderTextView.getText().equals(folderName)) { - return bookmarkView; - } - } - } - - return null; - } - - // Add a bookmark in the Desktop folder so we can check the folder navigation in the bookmarks page - private void setUpDesktopBookmarks() { - blockForGeckoReady(); - - // Get the folder id of the mStringHelper.DESKTOP_FOLDER_LABEL folder - Long desktopFolderId = mDatabaseHelper.getFolderIdFromGuid("toolbar"); - - // Generate a Guid for the bookmark - final String generatedGuid = Utils.generateGuid(); - mAsserter.ok((generatedGuid != null), "Generating a random Guid for the bookmark", "We could not generate a Guid for the bookmark"); - - // Insert the bookmark - ContentResolver resolver = getActivity().getContentResolver(); - Uri bookmarksUri = mDatabaseHelper.buildUri(DatabaseHelper.BrowserDataType.BOOKMARKS); - - long now = System.currentTimeMillis(); - ContentValues values = new ContentValues(); - values.put("title", mStringHelper.ROBOCOP_BLANK_PAGE_02_TITLE); - values.put("url", DESKTOP_BOOKMARK_URL); - values.put("parent", desktopFolderId); - values.put("modified", now); - values.put("type", 1); - values.put("guid", generatedGuid); - values.put("position", 10); - values.put("created", now); - - int updated = resolver.update(bookmarksUri, - values, - "url = ?", - new String[] { DESKTOP_BOOKMARK_URL }); - if (updated == 0) { - Uri uri = resolver.insert(bookmarksUri, values); - mAsserter.ok(true, "Inserted at: ", uri.toString()); - } else { - mAsserter.ok(false, "Failed to insert the Desktop bookmark", "Something went wrong"); - } - } - - @Override - public void tearDown() throws Exception { - mDatabaseHelper.deleteBookmark(DESKTOP_BOOKMARK_URL); - super.tearDown(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarkKeyword.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarkKeyword.java deleted file mode 100644 index 363954bfa..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarkKeyword.java +++ /dev/null @@ -1,28 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - - -public class testBookmarkKeyword extends AboutHomeTest { - public void testBookmarkKeyword() { - blockForGeckoReady(); - - final String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - final String keyword = "testkeyword"; - - // Add a bookmark, and update it to have a keyword. - mDatabaseHelper.addMobileBookmark(mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, url); - mDatabaseHelper.updateBookmark(url, mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, keyword); - - // Enter the keyword in the urlbar. - inputAndLoadUrl(keyword); - - // Make sure the title of the page appeared. - verifyUrlBarTitle(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - - // Delete the bookmark to clean up. - mDatabaseHelper.deleteBookmark(url); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarklets.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarklets.java deleted file mode 100644 index 4ae57104c..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarklets.java +++ /dev/null @@ -1,46 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; - -import com.robotium.solo.Condition; - - -public class testBookmarklets extends BaseTest { - public void testBookmarklets() { - final String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - final String title = "alertBookmarklet"; - final String js = "javascript:alert(12 + 10)"; - final String expected = "22"; - boolean alerted; - - blockForGeckoReady(); - - // Load a standard page so bookmarklets work - loadUrlAndWait(url); - - // Verify that user-entered bookmarklets do *not* work - enterUrl(js); - mActions.sendSpecialKey(Actions.SpecialKey.ENTER); - alerted = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return mSolo.searchButton("OK", true) || mSolo.searchText(expected, true); - } - }, 3000); - mAsserter.is(alerted, false, "Alert was not shown for user-entered bookmarklet"); - - // Verify that non-user-entered bookmarklets do work - loadUrl(js); - alerted = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return mSolo.searchButton("OK", true) && mSolo.searchText(expected, true); - } - }, 10000); - mAsserter.is(alerted, true, "Alert was shown for bookmarklet"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarksPanel.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarksPanel.java deleted file mode 100644 index a7e9505da..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBookmarksPanel.java +++ /dev/null @@ -1,174 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.json.JSONException; -import org.json.JSONObject; -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Element; -import org.mozilla.gecko.R; -import org.mozilla.gecko.util.StringUtils; - -public class testBookmarksPanel extends AboutHomeTest { - public void testBookmarksPanel() { - final String BOOKMARK_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - JSONObject data = null; - - // Make sure our default bookmarks are loaded. - // Technically this will race with the check below. - initializeProfile(); - - // Add a mobile bookmark. - mDatabaseHelper.addMobileBookmark(mStringHelper.ROBOCOP_BLANK_PAGE_01_TITLE, BOOKMARK_URL); - - openAboutHomeTab(AboutHomeTabs.BOOKMARKS); - - // Check that the default bookmarks are displayed. - // We need to wait for the distribution to have been processed - // before this will succeed. - for (String url : mStringHelper.DEFAULT_BOOKMARKS_URLS) { - isBookmarkDisplayed(url); - } - - assertAllContextMenuOptionsArePresent(mStringHelper.DEFAULT_BOOKMARKS_URLS[1], - mStringHelper.DEFAULT_BOOKMARKS_URLS[0]); - - openBookmarkContextMenu(mStringHelper.DEFAULT_BOOKMARKS_URLS[0]); - - // Test that "Open in New Tab" works - final Element tabCount = mDriver.findElement(getActivity(), R.id.tabs_counter); - final int tabCountInt = Integer.parseInt(tabCount.getText()); - Actions.EventExpecter tabEventExpecter = mActions.expectGeckoEvent("Tab:Added"); - mSolo.clickOnText(mStringHelper.BOOKMARK_CONTEXT_MENU_ITEMS[0]); - try { - data = new JSONObject(tabEventExpecter.blockForEventData()); - } catch (JSONException e) { - mAsserter.ok(false, "exception getting event data", e.toString()); - } - tabEventExpecter.unregisterListener(); - mAsserter.ok(mSolo.searchText(mStringHelper.TITLE_PLACE_HOLDER), "Checking that the tab is not changed", "The tab was not changed"); - // extra check here on the Tab:Added message to be sure the right tab opened - int tabID = 0; - try { - mAsserter.is(mStringHelper.ABOUT_FIREFOX_URL, data.getString("uri"), "Checking tab uri"); - tabID = data.getInt("tabID"); - } catch (JSONException e) { - mAsserter.ok(false, "exception accessing event data", e.toString()); - } - // close tab so about:firefox can be selected again - closeTab(tabID); - - // Test that "Open in Private Tab" works - openBookmarkContextMenu(mStringHelper.DEFAULT_BOOKMARKS_URLS[0]); - tabEventExpecter = mActions.expectGeckoEvent("Tab:Added"); - mSolo.clickOnText(mStringHelper.BOOKMARK_CONTEXT_MENU_ITEMS[1]); - try { - data = new JSONObject(tabEventExpecter.blockForEventData()); - } catch (JSONException e) { - mAsserter.ok(false, "exception getting event data", e.toString()); - } - tabEventExpecter.unregisterListener(); - mAsserter.ok(mSolo.searchText(mStringHelper.TITLE_PLACE_HOLDER), "Checking that the tab is not changed", "The tab was not changed"); - // extra check here on the Tab:Added message to be sure the right tab opened, again - try { - mAsserter.is(mStringHelper.ABOUT_FIREFOX_URL, data.getString("uri"), "Checking tab uri"); - } catch (JSONException e) { - mAsserter.ok(false, "exception accessing event data", e.toString()); - } - - // Test that "Edit" works - String[] editedBookmarkValues = new String[] { "New bookmark title", "www.NewBookmark.url", "newBookmarkKeyword" }; - editBookmark(BOOKMARK_URL, editedBookmarkValues); - checkBookmarkEdit(editedBookmarkValues[1], editedBookmarkValues); - - // Test that "Remove" works - openBookmarkContextMenu(editedBookmarkValues[1]); - mSolo.clickOnText(mStringHelper.BOOKMARK_CONTEXT_MENU_ITEMS[5]); - waitForText(mStringHelper.BOOKMARK_REMOVED_LABEL); - mAsserter.ok(!mDatabaseHelper.isBookmark(editedBookmarkValues[1]), "Checking that the bookmark was removed", "The bookmark was removed"); - } - - /** - * Asserts that all context menu items are present on the given links. For one link, - * the context menu is expected to not have the "Share" context menu item. - * - * @param shareableURL A URL that is expected to have the "Share" context menu item - * @param nonShareableURL A URL that is expected not to have the "Share" context menu item. - */ - private void assertAllContextMenuOptionsArePresent(final String shareableURL, - final String nonShareableURL) { - mAsserter.ok(StringUtils.isShareableUrl(shareableURL), "Ensuring url is shareable", ""); - mAsserter.ok(!StringUtils.isShareableUrl(nonShareableURL), "Ensuring url is not shareable", ""); - - openBookmarkContextMenu(shareableURL); - for (String contextMenuOption : mStringHelper.BOOKMARK_CONTEXT_MENU_ITEMS) { - mAsserter.ok(mSolo.searchText(contextMenuOption), - "Checking that the context menu option is present", - contextMenuOption + " is present"); - } - - // Close the menu. - mSolo.goBack(); - - openBookmarkContextMenu(nonShareableURL); - for (String contextMenuOption : mStringHelper.BOOKMARK_CONTEXT_MENU_ITEMS) { - // This link is not shareable: skip the "Share" option. - if ("Share".equals(contextMenuOption)) { - continue; - } - - mAsserter.ok(mSolo.searchText(contextMenuOption), - "Checking that the context menu option is present", - contextMenuOption + " is present"); - } - - // The use of Solo.searchText is potentially fragile as It will only - // scroll the most recently drawn view. Works fine for now though. - mAsserter.ok(!mSolo.searchText("Share"), - "Checking that the Share option is not present", - "Share option is not present"); - - // Close the menu. - mSolo.goBack(); - } - - /** - * @param bookmarkUrl URL of the bookmark to edit - * @param values String array with the new values for all fields - */ - private void editBookmark(String bookmarkUrl, String[] values) { - openBookmarkContextMenu(bookmarkUrl); - mSolo.clickOnText(mStringHelper.CONTEXT_MENU_EDIT); - waitForText(mStringHelper.EDIT_BOOKMARK); - - // Update the fields with the new values - for (int i = 0; i < values.length; i++) { - mSolo.clearEditText(i); - mSolo.clickOnEditText(i); - mActions.sendKeys(values[i]); - } - - mSolo.clickOnButton(mStringHelper.OK); - waitForText(mStringHelper.BOOKMARK_UPDATED_LABEL); - } - - /** - * @param bookmarkUrl String with the original url - * @param values String array with the new values for all fields - */ - private void checkBookmarkEdit(String bookmarkUrl, String[] values) { - openBookmarkContextMenu(bookmarkUrl); - mSolo.clickOnText(mStringHelper.CONTEXT_MENU_EDIT); - waitForText(mStringHelper.EDIT_BOOKMARK); - - // Check the values of the fields - for (String value : values) { - mAsserter.ok(mSolo.searchText(value), "Checking that the value is correct", "The value = " + value + " is correct"); - } - - mSolo.clickOnButton("Cancel"); - waitForText(mStringHelper.BOOKMARKS_LABEL); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDatabaseHelperUpgrades.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDatabaseHelperUpgrades.java deleted file mode 100644 index eec5c4b33..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDatabaseHelperUpgrades.java +++ /dev/null @@ -1,150 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.*; - -import android.database.sqlite.SQLiteDatabase; -import android.util.Log; - -import org.mozilla.gecko.db.BrowserDatabaseHelper; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.ArrayList; - -// TODO: Move to junit 3 tests, once those run in automation. There is no ui testing to do so it's a better fit. -/** - * This test runs upgrades for the databases in (robocop-assets)/browser_db_upgrade. Currently, - * (robocop-assets)=mobile/android/tests/browser/robocop/assets/. - * - * It copies the old database from the robocop assets directory into a temporary file and opens a SQLiteHelper - * on the database to verify it gets upgraded to the correct version. If there is an issue with the upgrade, - * generally a SQLiteException will be thrown and the test will fail. For example: - * android.database.sqlite.SQLiteException: duplicate column name: calculated_pages_times_rating (code 1): , while compiling: ALTER TABLE book_information ADD COLUMN calculated_pages_times_rating INTEGER; - * - * Alternative upgrade tests: - * * Robolectric 2.3+ uses a real SQLite database implementation so we could run our upgrades there. However, the - * SQLite implementation may not be the same as we run on Android. Benefits: speed & we don't need the application to - * run (and thus a valid DB of the latest version) to run these tests. - * * We could copy the current database creation code into a new test, create the database, and then try to upgrade - * it. However, the tables are empty and thus not a realistic migration plan (e.g. foreign key constraints). - * - * TO EDIT THIS TEST: - * * Copy the current version of the database into (robocop-assets)/browser_db_upgrade/v##.db database. You can do - * this via Margaret's copy profile addon - take browser.db from the profile directory. This db copy should contain a - * used profile - e.g. history items, bookmarks. A good way to get a used profile is to sign into sync. - * * MAKE SURE YOU COPY YOUR DB FIRST. Then make your changes to the DB schema code. - * * Test! - * * Note: when the application starts for testing, it may need to upgrade the database from your existing version. If - * this fails, the application will crash and the test may fail to start. - * - * IMPORTANT: - * Test DBs must be created on the oldest version of Android that is currently supported. SQLite - * is not forwards compatible. E.g. uploading a DB created on a 6.0 device will cause failures - * when robocop tests running on 4.3 are unable to load it. - * - * Implementation inspired by: - * http://riggaroo.co.za/automated-testing-sqlite-database-upgrades-android/ - */ -public class testBrowserDatabaseHelperUpgrades extends UITest { - private static final int TEST_FROM_VERSION = 27; // We only started testing on this version. - - private ArrayList temporaryDbFiles; - - @Override - public void setUp() throws Exception { - super.setUp(); - // TODO: We already install & remove the profile directory each run so it'd be safer for clean-up to store - // this there. That being said, temporary files are still stored in the application directory so these temporary - // files will get cleaned up when the application is uninstalled or when data is cleared. - temporaryDbFiles = new ArrayList<>(); - } - - @Override - public void tearDown() throws Exception { - super.tearDown(); - for (final File dbFile : temporaryDbFiles) { - dbFile.delete(); - } - } - - /** - * @throws IOException if the database cannot be copied. - */ - public void test() throws IOException { - for (int i = TEST_FROM_VERSION; i < BrowserDatabaseHelper.DATABASE_VERSION; ++i) { - Log.d(LOGTAG, "Testing upgrade from version: " + i); - final String tempDbPath = copyDatabase(i); - - final SQLiteDatabase db = SQLiteDatabase.openDatabase(tempDbPath, null, 0); - try { - fAssertEquals("Input DB isn't the expected version", - i, db.getVersion()); - } finally { - db.close(); - } - - final BrowserDatabaseHelper dbHelperToUpgrade = new BrowserDatabaseHelper(getActivity(), tempDbPath); - // Ideally, we'd test upgrading version i to version i + 1 but this method does not permit that. Alas! - final SQLiteDatabase upgradedDb = dbHelperToUpgrade.getWritableDatabase(); - try { - fAssertEquals("DB helper should upgrade to latest version", - BrowserDatabaseHelper.DATABASE_VERSION, upgradedDb.getVersion()); - } finally { - upgradedDb.close(); - } - } - } - - /** - * Copies the database from the assets directory to a temporary test file. - * - * @param version version of the database to copy. - * @return the String path to the new copy of the database - * @throws IOException if reading the existing database or writing the temporary database fails - */ - private String copyDatabase(final int version) throws IOException { - final InputStream inputStream = openDbFromAssets(version); - try { - final File dbDestination = File.createTempFile("temporaryDB-v" + version + "_", "db"); - temporaryDbFiles.add(dbDestination); - Log.d(LOGTAG, "Moving DB from assets to " + dbDestination.getPath()); - - final OutputStream outputStream = new BufferedOutputStream(new FileOutputStream(dbDestination)); - try { - final byte[] buffer = new byte[1024]; - int len; - while ((len = inputStream.read(buffer)) > 0) { - outputStream.write(buffer, 0, len); - } - outputStream.flush(); - } finally { - outputStream.close(); - } - - return dbDestination.getPath(); - } finally { - inputStream.close(); - } - } - - private InputStream openDbFromAssets(final int version) throws IOException { - final String dbAssetPath = String.format("browser_db_upgrade" + File.separator + String.format("v%d.db", version)); - Log.d(LOGTAG, "Opening DB from assets: " + dbAssetPath); - try { - return new BufferedInputStream(getInstrumentation().getContext().getAssets().open(dbAssetPath)); - } catch (final FileNotFoundException e) { - throw new IllegalStateException("If you're upgrading the browser.db version, " + - "you need to provide an old version of the database for this test! See the javadoc.", e); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDiscovery.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDiscovery.java deleted file mode 100644 index 2dab2996c..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDiscovery.java +++ /dev/null @@ -1,13 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - - - -public class testBrowserDiscovery extends JavascriptTest { - public testBrowserDiscovery() { - super("testBrowserDiscovery.js"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserProvider.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserProvider.java deleted file mode 100644 index e0ebb5c8e..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserProvider.java +++ /dev/null @@ -1,1921 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import org.mozilla.gecko.db.BrowserContract; -import org.mozilla.gecko.db.BrowserContract.UrlAnnotations.SyncStatus; -import org.mozilla.gecko.db.BrowserDB; -import org.mozilla.gecko.db.URLMetadata; -import org.mozilla.gecko.db.URLMetadataTable; - -import android.content.ContentProviderOperation; -import android.content.ContentProviderResult; -import android.content.ContentUris; -import android.content.ContentValues; -import android.content.OperationApplicationException; -import android.database.Cursor; -import android.net.Uri; -import android.os.Build; -import android.util.Log; - -/* - * This test is meant to exercise all operations exposed by Fennec's - * history and bookmarks content provider. It does so in an isolated - * environment (see ContentProviderTest) without affecting any UI-related - * code. - */ -public class testBrowserProvider extends ContentProviderTest { - private long mMobileFolderId; - - private void loadMobileFolderId() throws Exception { - Cursor c = null; - try { - c = getBookmarkByGuid(BrowserContract.Bookmarks.MOBILE_FOLDER_GUID); - mAsserter.is(c.moveToFirst(), true, "Mobile bookmarks folder is present"); - - mMobileFolderId = c.getLong(c.getColumnIndex(BrowserContract.Bookmarks._ID)); - } finally { - if (c != null) { - c.close(); - } - } - } - - private void ensureEmptyDatabase() throws Exception { - Cursor c; - - String guid = BrowserContract.Bookmarks.GUID; - - mProvider.delete(appendUriParam(BrowserContract.Bookmarks.CONTENT_URI, BrowserContract.PARAM_IS_SYNC, "1"), - guid + " != ? AND " + - guid + " != ? AND " + - guid + " != ? AND " + - guid + " != ? AND " + - guid + " != ? AND " + - guid + " != ?", - new String[] { BrowserContract.Bookmarks.PLACES_FOLDER_GUID, - BrowserContract.Bookmarks.MOBILE_FOLDER_GUID, - BrowserContract.Bookmarks.MENU_FOLDER_GUID, - BrowserContract.Bookmarks.TAGS_FOLDER_GUID, - BrowserContract.Bookmarks.TOOLBAR_FOLDER_GUID, - BrowserContract.Bookmarks.UNFILED_FOLDER_GUID }); - - c = mProvider.query(appendUriParam(BrowserContract.Bookmarks.CONTENT_URI, BrowserContract.PARAM_SHOW_DELETED, "1"), null, null, null, null); - assertCountIsAndClose(c, 6, "All non-special bookmarks and folders were deleted"); - - mProvider.delete(appendUriParam(BrowserContract.History.CONTENT_URI, BrowserContract.PARAM_IS_SYNC, "1"), null, null); - c = mProvider.query(appendUriParam(BrowserContract.History.CONTENT_URI, BrowserContract.PARAM_SHOW_DELETED, "1"), null, null, null, null); - assertCountIsAndClose(c, 0, "All history entries were deleted"); - - /** - * There's no reason why the following two parts should fail. - * But sometimes they do, and I'm not going to spend the time - * to figure out why in an unrelated bug. - */ - - mProvider.delete(appendUriParam(BrowserContract.Favicons.CONTENT_URI, BrowserContract.PARAM_IS_SYNC, "1"), null, null); - c = mProvider.query(appendUriParam(BrowserContract.Favicons.CONTENT_URI, - BrowserContract.PARAM_SHOW_DELETED, "1"), - null, null, null, null); - - if (c.getCount() > 0) { - mAsserter.dumpLog("Unexpected favicons in ensureEmptyDatabase."); - } - c.close(); - - mAsserter.dumpLog("ensureEmptyDatabase: Favicon deletion completed."); // Bug 968951 debug. - // assertCountIsAndClose(c, 0, "All favicons were deleted"); - - mProvider.delete(appendUriParam(BrowserContract.Thumbnails.CONTENT_URI, BrowserContract.PARAM_IS_SYNC, "1"), null, null); - c = mProvider.query(appendUriParam(BrowserContract.Thumbnails.CONTENT_URI, - BrowserContract.PARAM_SHOW_DELETED, "1"), - null, null, null, null); - - if (c.getCount() > 0) { - mAsserter.dumpLog("Unexpected thumbnails in ensureEmptyDatabase."); - } - c.close(); - - mAsserter.dumpLog("ensureEmptyDatabase: Thumbnail deletion completed."); // Bug 968951 debug. - // assertCountIsAndClose(c, 0, "All thumbnails were deleted"); - } - - private ContentValues createBookmark(String title, String url, long parentId, - int type, int position, String tags, String description, String keyword) throws Exception { - ContentValues bookmark = new ContentValues(); - - bookmark.put(BrowserContract.Bookmarks.TITLE, title); - bookmark.put(BrowserContract.Bookmarks.URL, url); - bookmark.put(BrowserContract.Bookmarks.PARENT, parentId); - bookmark.put(BrowserContract.Bookmarks.TYPE, type); - bookmark.put(BrowserContract.Bookmarks.POSITION, position); - bookmark.put(BrowserContract.Bookmarks.TAGS, tags); - bookmark.put(BrowserContract.Bookmarks.DESCRIPTION, description); - bookmark.put(BrowserContract.Bookmarks.KEYWORD, keyword); - - return bookmark; - } - - private ContentValues createOneBookmark() throws Exception { - return createBookmark("Example", "http://example.com", mMobileFolderId, - BrowserContract.Bookmarks.TYPE_BOOKMARK, 0, "tags", "description", "keyword"); - } - - private Cursor getBookmarksByParent(long parent) throws Exception { - // Order by position. - return mProvider.query(BrowserContract.Bookmarks.CONTENT_URI, null, - BrowserContract.Bookmarks.PARENT + " = ?", - new String[] { String.valueOf(parent) }, - BrowserContract.Bookmarks.POSITION); - } - - private Cursor getBookmarkByGuid(String guid) throws Exception { - return mProvider.query(BrowserContract.Bookmarks.CONTENT_URI, null, - BrowserContract.Bookmarks.GUID + " = ?", - new String[] { guid }, - null); - } - - private Cursor getBookmarkById(long id) throws Exception { - return getBookmarkById(BrowserContract.Bookmarks.CONTENT_URI, id, null); - } - - private Cursor getBookmarkById(long id, String[] projection) throws Exception { - return getBookmarkById(BrowserContract.Bookmarks.CONTENT_URI, id, projection); - } - - private Cursor getBookmarkById(Uri bookmarksUri, long id) throws Exception { - return getBookmarkById(bookmarksUri, id, null); - } - - private Cursor getBookmarkById(Uri bookmarksUri, long id, String[] projection) throws Exception { - return mProvider.query(bookmarksUri, projection, - BrowserContract.Bookmarks._ID + " = ?", - new String[] { String.valueOf(id) }, - null); - } - - private ContentValues createHistoryEntry(String title, String url, int visits, long lastVisited) throws Exception { - ContentValues historyEntry = new ContentValues(); - - historyEntry.put(BrowserContract.History.TITLE, title); - historyEntry.put(BrowserContract.History.URL, url); - historyEntry.put(BrowserContract.History.VISITS, visits); - historyEntry.put(BrowserContract.History.DATE_LAST_VISITED, lastVisited); - - return historyEntry; - } - - private ContentValues createFaviconEntry(String pageUrl, String data) throws Exception { - ContentValues faviconEntry = new ContentValues(); - - faviconEntry.put(BrowserContract.Favicons.PAGE_URL, pageUrl); - faviconEntry.put(BrowserContract.Favicons.URL, pageUrl + "/favicon.ico"); - faviconEntry.put(BrowserContract.Favicons.DATA, data.getBytes("UTF8")); - - return faviconEntry; - } - - private ContentValues createThumbnailEntry(String pageUrl, String data) throws Exception { - ContentValues thumbnailEntry = new ContentValues(); - - thumbnailEntry.put(BrowserContract.Thumbnails.URL, pageUrl); - thumbnailEntry.put(BrowserContract.Thumbnails.DATA, data.getBytes("UTF8")); - - return thumbnailEntry; - } - - private ContentValues createUrlMetadataEntry(final String url, final String tileImage, final String tileColor, - final String touchIcon) { - final ContentValues values = new ContentValues(); - values.put(URLMetadataTable.URL_COLUMN, url); - values.put(URLMetadataTable.TILE_IMAGE_URL_COLUMN, tileImage); - values.put(URLMetadataTable.TILE_COLOR_COLUMN, tileColor); - values.put(URLMetadataTable.TOUCH_ICON_COLUMN, touchIcon); - return values; - } - - private ContentValues createUrlAnnotationEntry(final String url, final String key, final String value, - final long dateCreated) { - final ContentValues values = new ContentValues(); - values.put(BrowserContract.UrlAnnotations.URL, url); - values.put(BrowserContract.UrlAnnotations.KEY, key); - values.put(BrowserContract.UrlAnnotations.VALUE, value); - values.put(BrowserContract.UrlAnnotations.DATE_CREATED, dateCreated); - values.put(BrowserContract.UrlAnnotations.DATE_MODIFIED, dateCreated); - return values; - } - - private ContentValues createOneHistoryEntry() throws Exception { - return createHistoryEntry("Example", "http://example.com", 10, System.currentTimeMillis()); - } - - private Cursor getHistoryEntryById(long id) throws Exception { - return getHistoryEntryById(BrowserContract.History.CONTENT_URI, id, null); - } - - private Cursor getHistoryEntryById(long id, String[] projection) throws Exception { - return getHistoryEntryById(BrowserContract.History.CONTENT_URI, id, projection); - } - - private Cursor getHistoryEntryById(Uri historyUri, long id) throws Exception { - return getHistoryEntryById(historyUri, id, null); - } - - private Cursor getHistoryEntryById(Uri historyUri, long id, String[] projection) throws Exception { - return mProvider.query(historyUri, projection, - BrowserContract.History._ID + " = ?", - new String[] { String.valueOf(id) }, - null); - } - - private Cursor getFaviconsByUrl(String url) throws Exception { - return mProvider.query(BrowserContract.Combined.CONTENT_URI, null, - BrowserContract.Combined.URL + " = ?", - new String[] { url }, - null); - } - - private Cursor getThumbnailByUrl(String url) throws Exception { - return mProvider.query(BrowserContract.Thumbnails.CONTENT_URI, null, - BrowserContract.Thumbnails.URL + " = ?", - new String[] { url }, - null); - } - - private Cursor getUrlAnnotationByUrl(final String url) throws Exception { - return mProvider.query(BrowserContract.UrlAnnotations.CONTENT_URI, null, - BrowserContract.UrlAnnotations.URL + " = ?", - new String[] { url }, - null); - } - - private Cursor getUrlMetadataByUrl(final String url) throws Exception { - return mProvider.query(URLMetadataTable.CONTENT_URI, null, - URLMetadataTable.URL_COLUMN + " = ?", - new String[] { url }, - null); - } - - @Override - public void setUp() throws Exception { - super.setUp(sBrowserProviderCallable, BrowserContract.AUTHORITY, "browser.db"); - - mTests.add(new TestSpecialFolders()); - - mTests.add(new TestInsertBookmarks()); - mTests.add(new TestInsertBookmarksFavicons()); - mTests.add(new TestDeleteBookmarks()); - mTests.add(new TestDeleteBookmarksFavicons()); - mTests.add(new TestUpdateBookmarks()); - mTests.add(new TestUpdateBookmarksFavicons()); - mTests.add(new TestPositionBookmarks()); - - mTests.add(new TestInsertHistory()); - mTests.add(new TestInsertHistoryFavicons()); - mTests.add(new TestDeleteHistory()); - mTests.add(new TestDeleteHistoryFavicons()); - mTests.add(new TestUpdateHistory()); - mTests.add(new TestUpdateHistoryFavicons()); - mTests.add(new TestUpdateOrInsertHistory()); - mTests.add(new TestInsertHistoryThumbnails()); - mTests.add(new TestUpdateHistoryThumbnails()); - mTests.add(new TestDeleteHistoryThumbnails()); - - mTests.add(new TestInsertUrlAnnotations()); - mTests.add(new TestInsertUrlMetadata()); - - mTests.add(new TestBatchOperations()); - - mTests.add(new TestCombinedView()); - mTests.add(new TestCombinedViewDisplay()); - mTests.add(new TestCombinedViewWithDeletedBookmark()); - - mTests.add(new TestBrowserProviderNotifications()); - } - - public void testBrowserProvider() throws Exception { - loadMobileFolderId(); - - for (int i = 0; i < mTests.size(); i++) { - Runnable test = mTests.get(i); - - final String testName = test.getClass().getSimpleName(); - setTestName(testName); - ensureEmptyDatabase(); - mAsserter.dumpLog("testBrowserProvider: Database empty - Starting " + testName + "."); - test.run(); - } - } - - private class TestBatchOperations extends TestCase { - static final int TESTCOUNT = 100; - - public void testApplyBatch() throws Exception { - ArrayList mOperations - = new ArrayList(); - - // Test a bunch of inserts with applyBatch - ContentValues values = new ContentValues(); - ContentProviderOperation.Builder builder = null; - - for (int i = 0; i < TESTCOUNT; i++) { - values.clear(); - values.put(BrowserContract.History.VISITS, i); - values.put(BrowserContract.History.TITLE, "Test" + i); - values.put(BrowserContract.History.URL, "http://www.test.org/" + i); - - // Insert - builder = ContentProviderOperation.newInsert(BrowserContract.History.CONTENT_URI); - builder.withValues(values); - // Queue the operation - mOperations.add(builder.build()); - } - - ContentProviderResult[] applyResult = - mProvider.applyBatch(mOperations); - - boolean allFound = true; - for (int i = 0; i < TESTCOUNT; i++) { - Cursor cursor = mProvider.query(BrowserContract.History.CONTENT_URI, - null, - BrowserContract.History.URL + " = ?", - new String[] { "http://www.test.org/" + i }, - null); - - if (!cursor.moveToFirst()) - allFound = false; - cursor.close(); - } - mAsserter.is(allFound, true, "Found all batchApply entries"); - mOperations.clear(); - - // Update all visits to 1 - values.clear(); - values.put(BrowserContract.History.VISITS, 1); - for (int i = 0; i < TESTCOUNT; i++) { - builder = ContentProviderOperation.newUpdate(BrowserContract.History.CONTENT_URI); - builder.withSelection(BrowserContract.History.URL + " = ?", - new String[] {"http://www.test.org/" + i}); - builder.withValues(values); - builder.withExpectedCount(1); - // Queue the operation - mOperations.add(builder.build()); - } - - boolean seenException = false; - try { - applyResult = mProvider.applyBatch(mOperations); - } catch (OperationApplicationException ex) { - seenException = true; - } - mAsserter.is(seenException, false, "Batch updating succeeded"); - mOperations.clear(); - - // Delete all visits - for (int i = 0; i < TESTCOUNT; i++) { - builder = ContentProviderOperation.newDelete(BrowserContract.History.CONTENT_URI); - builder.withSelection(BrowserContract.History.URL + " = ?", - new String[] {"http://www.test.org/" + i}); - builder.withExpectedCount(1); - // Queue the operation - mOperations.add(builder.build()); - } - try { - applyResult = mProvider.applyBatch(mOperations); - } catch (OperationApplicationException ex) { - seenException = true; - } - mAsserter.is(seenException, false, "Batch deletion succeeded"); - } - - // Force a Constraint error, see if later operations still apply correctly - public void testApplyBatchErrors() throws Exception { - ArrayList mOperations - = new ArrayList(); - - // Test a bunch of inserts with applyBatch - ContentProviderOperation.Builder builder = null; - ContentValues values = createFaviconEntry("http://www.test.org", "FAVICON"); - builder = ContentProviderOperation.newInsert(BrowserContract.Favicons.CONTENT_URI); - builder.withValues(values); - mOperations.add(builder.build()); - - // Make a duplicate, this will fail because of a UNIQUE constraint - builder = ContentProviderOperation.newInsert(BrowserContract.Favicons.CONTENT_URI); - builder.withValues(values); - mOperations.add(builder.build()); - - // This is valid and should be in the table afterwards - values.put(BrowserContract.Favicons.URL, "http://www.test.org/valid.ico"); - builder = ContentProviderOperation.newInsert(BrowserContract.Favicons.CONTENT_URI); - builder.withValues(values); - mOperations.add(builder.build()); - - boolean seenException = false; - - try { - ContentProviderResult[] applyResult = - mProvider.applyBatch(mOperations); - } catch (OperationApplicationException ex) { - seenException = true; - } - - // This test may need to go away if Bug 717428 is fixed. - mAsserter.is(seenException, true, "Expected failure in favicons table"); - - boolean allFound = true; - Cursor cursor = mProvider.query(BrowserContract.Favicons.CONTENT_URI, - null, - BrowserContract.Favicons.URL + " = ?", - new String[] { "http://www.test.org/valid.ico" }, - null); - - if (!cursor.moveToFirst()) - allFound = false; - cursor.close(); - - mAsserter.is(allFound, true, "Found all applyBatch (with error) entries"); - } - - public void testBulkInsert() throws Exception { - // Test a bunch of inserts with bulkInsert - ContentValues allVals[] = new ContentValues[TESTCOUNT]; - for (int i = 0; i < TESTCOUNT; i++) { - allVals[i] = new ContentValues(); - allVals[i].put(BrowserContract.History.URL, i); - allVals[i].put(BrowserContract.History.TITLE, "Test" + i); - allVals[i].put(BrowserContract.History.URL, "http://www.test.org/" + i); - } - - int inserts = mProvider.bulkInsert(BrowserContract.History.CONTENT_URI, allVals); - mAsserter.is(inserts, TESTCOUNT, "Excepted number of inserts matches"); - - boolean allFound = true; - for (int i = 0; i < TESTCOUNT; i++) { - Cursor cursor = mProvider.query(BrowserContract.History.CONTENT_URI, - null, - BrowserContract.History.URL + " = ?", - new String[] { "http://www.test.org/" + i }, - null); - - if (!cursor.moveToFirst()) - allFound = false; - cursor.close(); - } - mAsserter.is(allFound, true, "Found all bulkInsert entries"); - } - - @Override - public void test() throws Exception { - testApplyBatch(); - // Clean up - ensureEmptyDatabase(); - - testBulkInsert(); - ensureEmptyDatabase(); - - testApplyBatchErrors(); - } - } - - private class TestSpecialFolders extends TestCase { - @Override - public void test() throws Exception { - Cursor c = mProvider.query(BrowserContract.Bookmarks.CONTENT_URI, - new String[] { BrowserContract.Bookmarks._ID, - BrowserContract.Bookmarks.GUID, - BrowserContract.Bookmarks.PARENT }, - BrowserContract.Bookmarks.GUID + " = ? OR " + - BrowserContract.Bookmarks.GUID + " = ? OR " + - BrowserContract.Bookmarks.GUID + " = ? OR " + - BrowserContract.Bookmarks.GUID + " = ? OR " + - BrowserContract.Bookmarks.GUID + " = ? OR " + - BrowserContract.Bookmarks.GUID + " = ?", - new String[] { BrowserContract.Bookmarks.PLACES_FOLDER_GUID, - BrowserContract.Bookmarks.MOBILE_FOLDER_GUID, - BrowserContract.Bookmarks.MENU_FOLDER_GUID, - BrowserContract.Bookmarks.TAGS_FOLDER_GUID, - BrowserContract.Bookmarks.TOOLBAR_FOLDER_GUID, - BrowserContract.Bookmarks.UNFILED_FOLDER_GUID}, - null); - - mAsserter.is(c.getCount(), 6, "Right number of special folders"); - - int rootId = BrowserContract.Bookmarks.FIXED_ROOT_ID; - - while (c.moveToNext()) { - int id = c.getInt(c.getColumnIndex(BrowserContract.Bookmarks._ID)); - String guid = c.getString(c.getColumnIndex(BrowserContract.Bookmarks.GUID)); - int parentId = c.getInt(c.getColumnIndex(BrowserContract.Bookmarks.PARENT)); - - if (guid.equals(BrowserContract.Bookmarks.PLACES_FOLDER_GUID)) { - mAsserter.is(id, rootId, "The id of places folder is correct"); - } - - mAsserter.is(parentId, rootId, - "The PARENT of the " + guid + " special folder is correct"); - } - - c.close(); - } - } - - private class TestInsertBookmarks extends TestCase { - private long insertWithNullCol(String colName) throws Exception { - ContentValues b = createOneBookmark(); - b.putNull(colName); - long id = -1; - - try { - id = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - } catch (Exception e) {} - - return id; - } - - @Override - public void test() throws Exception { - ContentValues b = createOneBookmark(); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - - final Cursor c = getBookmarkById(id); - try { - mAsserter.is(c.moveToFirst(), true, "Inserted bookmark found"); - - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.TITLE)), b.getAsString(BrowserContract.Bookmarks.TITLE), - "Inserted bookmark has correct title"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.URL)), b.getAsString(BrowserContract.Bookmarks.URL), - "Inserted bookmark has correct URL"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.TAGS)), b.getAsString(BrowserContract.Bookmarks.TAGS), - "Inserted bookmark has correct tags"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.KEYWORD)), b.getAsString(BrowserContract.Bookmarks.KEYWORD), - "Inserted bookmark has correct keyword"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.DESCRIPTION)), b.getAsString(BrowserContract.Bookmarks.DESCRIPTION), - "Inserted bookmark has correct description"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.POSITION)), b.getAsString(BrowserContract.Bookmarks.POSITION), - "Inserted bookmark has correct position"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.TYPE)), b.getAsString(BrowserContract.Bookmarks.TYPE), - "Inserted bookmark has correct type"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.PARENT)), b.getAsString(BrowserContract.Bookmarks.PARENT), - "Inserted bookmark has correct parent ID"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.IS_DELETED)), String.valueOf(0), - "Inserted bookmark has correct is-deleted state"); - - id = insertWithNullCol(BrowserContract.Bookmarks.POSITION); - mAsserter.is(id, -1L, - "Should not be able to insert bookmark with null position"); - - id = insertWithNullCol(BrowserContract.Bookmarks.TYPE); - mAsserter.is(id, -1L, - "Should not be able to insert bookmark with null type"); - - if (Build.VERSION.SDK_INT >= 8 && - Build.VERSION.SDK_INT < 16) { - b = createOneBookmark(); - b.put(BrowserContract.Bookmarks.PARENT, -1); - id = -1; - - try { - id = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - } catch (Exception e) {} - - mAsserter.is(id, -1L, - "Should not be able to insert bookmark with invalid parent"); - } - - b = createOneBookmark(); - b.remove(BrowserContract.Bookmarks.TYPE); - id = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - final Cursor c2 = getBookmarkById(id); - try { - mAsserter.is(c2.moveToFirst(), true, "Inserted bookmark found"); - mAsserter.is(c2.getString(c2.getColumnIndex(BrowserContract.Bookmarks.TYPE)), String.valueOf(BrowserContract.Bookmarks.TYPE_BOOKMARK), - "Inserted bookmark has correct default type"); - } finally { - c2.close(); - } - } finally { - c.close(); - } - } - } - - private class TestInsertBookmarksFavicons extends TestCase { - @Override - public void test() throws Exception { - ContentValues b = createOneBookmark(); - - final String favicon = "FAVICON"; - final String pageUrl = b.getAsString(BrowserContract.Bookmarks.URL); - - long id = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - - // Insert the favicon into the favicons table - mProvider.insert(BrowserContract.Favicons.CONTENT_URI, createFaviconEntry(pageUrl, favicon)); - - Cursor c = getBookmarkById(id, new String[] { BrowserContract.Bookmarks.FAVICON }); - - mAsserter.is(c.moveToFirst(), true, "Inserted bookmark found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Bookmarks.FAVICON)), "UTF8"), - favicon, "Inserted bookmark has corresponding favicon image"); - c.close(); - - c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Inserted favicon found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Combined.FAVICON)), "UTF8"), - favicon, "Inserted favicon has corresponding favicon image"); - c.close(); - } - } - - private class TestDeleteBookmarks extends TestCase { - private long insertOneBookmark() throws Exception { - ContentValues b = createOneBookmark(); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - - Cursor c = getBookmarkById(id); - mAsserter.is(c.moveToFirst(), true, "Inserted bookmark found"); - c.close(); - - return id; - } - - @Override - public void test() throws Exception { - long id = insertOneBookmark(); - - int deleted = mProvider.delete(BrowserContract.Bookmarks.CONTENT_URI, - BrowserContract.Bookmarks._ID + " = ?", - new String[] { String.valueOf(id) }); - - mAsserter.is((deleted == 1), true, "Inserted bookmark was deleted"); - - Cursor c = getBookmarkById(appendUriParam(BrowserContract.Bookmarks.CONTENT_URI, BrowserContract.PARAM_SHOW_DELETED, "1"), id); - mAsserter.is(c.moveToFirst(), true, "Deleted bookmark was only marked as deleted"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.TITLE)), null, - "Deleted bookmark title is null"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.URL)), null, - "Deleted bookmark URL is null"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.TAGS)), null, - "Deleted bookmark tags is null"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.KEYWORD)), null, - "Deleted bookmark keyword is null"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.DESCRIPTION)), null, - "Deleted bookmark description is null"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.POSITION)), String.valueOf(0), - "Deleted bookmark has correct position"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.PARENT)), null, - "Deleted bookmark parent ID is null"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.IS_DELETED)), String.valueOf(1), - "Deleted bookmark has correct is-deleted state"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.FAVICON_ID)), null, - "Deleted bookmark Favicon ID is null"); - mAsserter.isnot(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.GUID)), null, - "Deleted bookmark GUID is not null"); - c.close(); - - deleted = mProvider.delete(appendUriParam(BrowserContract.Bookmarks.CONTENT_URI, BrowserContract.PARAM_IS_SYNC, "1"), - BrowserContract.Bookmarks._ID + " = ?", - new String[] { String.valueOf(id) }); - - mAsserter.is((deleted == 1), true, "Inserted bookmark was deleted"); - - c = getBookmarkById(appendUriParam(BrowserContract.Bookmarks.CONTENT_URI, BrowserContract.PARAM_SHOW_DELETED, "1"), id); - mAsserter.is(c.moveToFirst(), false, "Inserted bookmark is now actually deleted"); - c.close(); - - id = insertOneBookmark(); - - deleted = mProvider.delete(ContentUris.withAppendedId(BrowserContract.Bookmarks.CONTENT_URI, id), null, null); - mAsserter.is((deleted == 1), true, - "Inserted bookmark was deleted using URI with id"); - - c = getBookmarkById(id); - mAsserter.is(c.moveToFirst(), false, - "Inserted bookmark can't be found after deletion using URI with ID"); - c.close(); - - if (Build.VERSION.SDK_INT >= 8 && - Build.VERSION.SDK_INT < 16) { - ContentValues b = createBookmark("Folder", null, mMobileFolderId, - BrowserContract.Bookmarks.TYPE_FOLDER, 0, "folderTags", "folderDescription", "folderKeyword"); - - long parentId = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - c = getBookmarkById(parentId); - mAsserter.is(c.moveToFirst(), true, "Inserted bookmarks folder found"); - c.close(); - - b = createBookmark("Example", "http://example.com", parentId, - BrowserContract.Bookmarks.TYPE_BOOKMARK, 0, "tags", "description", "keyword"); - - id = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - c = getBookmarkById(id); - mAsserter.is(c.moveToFirst(), true, "Inserted bookmark found"); - c.close(); - - deleted = 0; - try { - Uri uri = ContentUris.withAppendedId(BrowserContract.Bookmarks.CONTENT_URI, parentId); - deleted = mProvider.delete(appendUriParam(uri, BrowserContract.PARAM_IS_SYNC, "1"), null, null); - } catch(Exception e) {} - - mAsserter.is((deleted == 0), true, - "Should not be able to delete folder that causes orphan bookmarks"); - } - } - } - - private class TestDeleteBookmarksFavicons extends TestCase { - @Override - public void test() throws Exception { - ContentValues b = createOneBookmark(); - - final String pageUrl = b.getAsString(BrowserContract.Bookmarks.URL); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - - // Insert the favicon into the favicons table - mProvider.insert(BrowserContract.Favicons.CONTENT_URI, createFaviconEntry(pageUrl, "FAVICON")); - - Cursor c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Inserted favicon found"); - c.close(); - - mProvider.delete(ContentUris.withAppendedId(BrowserContract.Bookmarks.CONTENT_URI, id), null, null); - - c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), false, "Favicon is deleted with last reference to it"); - c.close(); - } - } - - private class TestUpdateBookmarks extends TestCase { - private int updateWithNullCol(long id, String colName) throws Exception { - ContentValues u = new ContentValues(); - u.putNull(colName); - - int updated = 0; - - try { - updated = mProvider.update(BrowserContract.Bookmarks.CONTENT_URI, u, - BrowserContract.Bookmarks._ID + " = ?", - new String[] { String.valueOf(id) }); - } catch (Exception e) {} - - return updated; - } - - @Override - public void test() throws Exception { - ContentValues b = createOneBookmark(); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b)); - - Cursor c = getBookmarkById(id); - mAsserter.is(c.moveToFirst(), true, "Inserted bookmark found"); - - long dateCreated = c.getLong(c.getColumnIndex(BrowserContract.Bookmarks.DATE_CREATED)); - long dateModified = c.getLong(c.getColumnIndex(BrowserContract.Bookmarks.DATE_MODIFIED)); - - ContentValues u = new ContentValues(); - u.put(BrowserContract.Bookmarks.TITLE, b.getAsString(BrowserContract.Bookmarks.TITLE) + "CHANGED"); - u.put(BrowserContract.Bookmarks.URL, b.getAsString(BrowserContract.Bookmarks.URL) + "/more/stuff"); - u.put(BrowserContract.Bookmarks.TAGS, b.getAsString(BrowserContract.Bookmarks.TAGS) + "CHANGED"); - u.put(BrowserContract.Bookmarks.DESCRIPTION, b.getAsString(BrowserContract.Bookmarks.DESCRIPTION) + "CHANGED"); - u.put(BrowserContract.Bookmarks.KEYWORD, b.getAsString(BrowserContract.Bookmarks.KEYWORD) + "CHANGED"); - u.put(BrowserContract.Bookmarks.TYPE, BrowserContract.Bookmarks.TYPE_FOLDER); - u.put(BrowserContract.Bookmarks.POSITION, 10); - - int updated = mProvider.update(BrowserContract.Bookmarks.CONTENT_URI, u, - BrowserContract.Bookmarks._ID + " = ?", - new String[] { String.valueOf(id) }); - - mAsserter.is((updated == 1), true, "Inserted bookmark was updated"); - c.close(); - - c = getBookmarkById(id); - mAsserter.is(c.moveToFirst(), true, "Updated bookmark found"); - - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.TITLE)), u.getAsString(BrowserContract.Bookmarks.TITLE), - "Inserted bookmark has correct title"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.URL)), u.getAsString(BrowserContract.Bookmarks.URL), - "Inserted bookmark has correct URL"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.TAGS)), u.getAsString(BrowserContract.Bookmarks.TAGS), - "Inserted bookmark has correct tags"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.KEYWORD)), u.getAsString(BrowserContract.Bookmarks.KEYWORD), - "Inserted bookmark has correct keyword"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.DESCRIPTION)), u.getAsString(BrowserContract.Bookmarks.DESCRIPTION), - "Inserted bookmark has correct description"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.POSITION)), u.getAsString(BrowserContract.Bookmarks.POSITION), - "Inserted bookmark has correct position"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.TYPE)), u.getAsString(BrowserContract.Bookmarks.TYPE), - "Inserted bookmark has correct type"); - - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Bookmarks.DATE_CREATED)), - dateCreated, - "Updated bookmark has same creation date"); - - mAsserter.isnot(c.getLong(c.getColumnIndex(BrowserContract.Bookmarks.DATE_MODIFIED)), - dateModified, - "Updated bookmark has new modification date"); - - updated = updateWithNullCol(id, BrowserContract.Bookmarks.POSITION); - mAsserter.is((updated > 0), false, - "Should not be able to update bookmark with null position"); - - updated = updateWithNullCol(id, BrowserContract.Bookmarks.TYPE); - mAsserter.is((updated > 0), false, - "Should not be able to update bookmark with null type"); - - u = new ContentValues(); - u.put(BrowserContract.Bookmarks.URL, "http://examples2.com"); - - updated = mProvider.update(ContentUris.withAppendedId(BrowserContract.Bookmarks.CONTENT_URI, id), u, null, null); - c.close(); - - c = getBookmarkById(id); - mAsserter.is(c.moveToFirst(), true, "Updated bookmark found"); - - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Bookmarks.URL)), u.getAsString(BrowserContract.Bookmarks.URL), - "Updated bookmark has correct URL using URI with id"); - c.close(); - } - } - - private class TestUpdateBookmarksFavicons extends TestCase { - @Override - public void test() throws Exception { - ContentValues b = createOneBookmark(); - - final String favicon = "FAVICON"; - final String newFavicon = "NEW_FAVICON"; - final String pageUrl = b.getAsString(BrowserContract.Bookmarks.URL); - - mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, b); - - // Insert the favicon into the favicons table - ContentValues f = createFaviconEntry(pageUrl, favicon); - long faviconId = ContentUris.parseId(mProvider.insert(BrowserContract.Favicons.CONTENT_URI, f)); - - Cursor c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Inserted favicon found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Combined.FAVICON)), "UTF8"), - favicon, "Inserted favicon has corresponding favicon image"); - - ContentValues u = createFaviconEntry(pageUrl, newFavicon); - mProvider.update(BrowserContract.Favicons.CONTENT_URI, u, null, null); - c.close(); - - c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Updated favicon found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Combined.FAVICON)), "UTF8"), - newFavicon, "Updated favicon has corresponding favicon image"); - c.close(); - } - } - - /** - * Create a folder of one thousand and one bookmarks, then impose an order - * on them. - * - * Verify that the reordering worked by querying. - */ - private class TestPositionBookmarks extends TestCase { - - public String makeGUID(final long in) { - String part = String.valueOf(in); - return "aaaaaaaaaaaa".substring(0, (12 - part.length())) + part; - } - - public void compareCursorToItems(final Cursor c, final String[] items, final int count) { - mAsserter.is(c.moveToFirst(), true, "Folder has children."); - - int posColumn = c.getColumnIndex(BrowserContract.Bookmarks.POSITION); - int guidColumn = c.getColumnIndex(BrowserContract.Bookmarks.GUID); - int i = 0; - - while (!c.isAfterLast()) { - String guid = c.getString(guidColumn); - long pos = c.getLong(posColumn); - if ((pos != i) || (guid == null) || (!guid.equals(items[i]))) { - mAsserter.is(pos, (long) i, "Position matches sequence."); - mAsserter.is(guid, items[i], "GUID matches sequence."); - } - ++i; - c.moveToNext(); - } - - mAsserter.is(i, count, "Folder has the right number of children."); - c.close(); - } - - public static final int NUMBER_OF_CHILDREN = 1001; - @Override - public void test() throws Exception { - // Create the containing folder. - ContentValues folder = createBookmark("FolderFolder", "", mMobileFolderId, - BrowserContract.Bookmarks.TYPE_FOLDER, 0, "", - "description", "keyword"); - folder.put(BrowserContract.Bookmarks.GUID, "folderfolder"); - long folderId = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, folder)); - - mAsserter.dumpLog("TestPositionBookmarks: Folder inserted"); // Bug 968951 debug. - - // Create the children. - String[] items = new String[NUMBER_OF_CHILDREN]; - - // Reuse the same ContentValues. - ContentValues item = createBookmark("Test Bookmark", "http://example.com", folderId, - BrowserContract.Bookmarks.TYPE_FOLDER, 0, "", - "description", "keyword"); - - for (int i = 0; i < NUMBER_OF_CHILDREN; ++i) { - String guid = makeGUID(i); - items[i] = guid; - item.put(BrowserContract.Bookmarks.GUID, guid); - item.put(BrowserContract.Bookmarks.POSITION, i); - item.put(BrowserContract.Bookmarks.URL, "http://example.com/" + guid); - item.put(BrowserContract.Bookmarks.TITLE, "Test Bookmark " + guid); - mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, item); - } - - mAsserter.dumpLog("TestPositionBookmarks: Bookmarks inserted"); // Bug 968951 debug. - - Cursor c; - - // Verify insertion. - c = getBookmarksByParent(folderId); - mAsserter.dumpLog("TestPositionBookmarks: Got bookmarks by parent"); // Bug 968951 debug. - compareCursorToItems(c, items, NUMBER_OF_CHILDREN); - c.close(); - - // Now permute the items array. - Random rand = new Random(); - for (int i = 0; i < NUMBER_OF_CHILDREN; ++i) { - final int newPosition = rand.nextInt(NUMBER_OF_CHILDREN); - final String switched = items[newPosition]; - items[newPosition] = items[i]; - items[i] = switched; - } - - // Impose the positions. - long updated = mProvider.update(BrowserContract.Bookmarks.POSITIONS_CONTENT_URI, null, null, items); - mAsserter.is(updated, (long) NUMBER_OF_CHILDREN, "Updated " + NUMBER_OF_CHILDREN + " positions."); - - // Verify that the database was updated. - c = getBookmarksByParent(folderId); - compareCursorToItems(c, items, NUMBER_OF_CHILDREN); - c.close(); - } - } - - private class TestInsertHistory extends TestCase { - private long insertWithNullCol(String colName) throws Exception { - ContentValues h = createOneHistoryEntry(); - h.putNull(colName); - long id = -1; - - try { - id = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, h)); - } catch (Exception e) {} - - return id; - } - - @Override - public void test() throws Exception { - ContentValues h = createOneHistoryEntry(); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, h)); - Cursor c = getHistoryEntryById(id); - - mAsserter.is(c.moveToFirst(), true, "Inserted history entry found"); - - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.TITLE)), h.getAsString(BrowserContract.History.TITLE), - "Inserted history entry has correct title"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.URL)), h.getAsString(BrowserContract.History.URL), - "Inserted history entry has correct URL"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.VISITS)), h.getAsString(BrowserContract.History.VISITS), - "Inserted history entry has correct number of visits"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.DATE_LAST_VISITED)), h.getAsString(BrowserContract.History.DATE_LAST_VISITED), - "Inserted history entry has correct last visited date"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.IS_DELETED)), String.valueOf(0), - "Inserted history entry has correct is-deleted state"); - - id = insertWithNullCol(BrowserContract.History.URL); - mAsserter.is(id, -1L, - "Should not be able to insert history with null URL"); - - id = insertWithNullCol(BrowserContract.History.VISITS); - mAsserter.is(id, -1L, - "Should not be able to insert history with null number of visits"); - c.close(); - } - } - - private class TestInsertHistoryFavicons extends TestCase { - @Override - public void test() throws Exception { - ContentValues h = createOneHistoryEntry(); - - final String favicon = "FAVICON"; - final String pageUrl = h.getAsString(BrowserContract.History.URL); - - long id = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, h)); - - // Insert the favicon into the favicons table - mProvider.insert(BrowserContract.Favicons.CONTENT_URI, createFaviconEntry(pageUrl, favicon)); - - Cursor c = getHistoryEntryById(id, new String[] { BrowserContract.History.FAVICON }); - - mAsserter.is(c.moveToFirst(), true, "Inserted history entry found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.History.FAVICON)), "UTF8"), - favicon, "Inserted history entry has corresponding favicon image"); - c.close(); - - c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Inserted favicon found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Combined.FAVICON)), "UTF8"), - favicon, "Inserted favicon has corresponding favicon image"); - c.close(); - } - } - - private class TestDeleteHistory extends TestCase { - private long insertOneHistoryEntry() throws Exception { - ContentValues h = createOneHistoryEntry(); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, h)); - - Cursor c = getHistoryEntryById(id); - mAsserter.is(c.moveToFirst(), true, "Inserted history entry found"); - c.close(); - - return id; - } - - @Override - public void test() throws Exception { - long id = insertOneHistoryEntry(); - - int deleted = mProvider.delete(BrowserContract.History.CONTENT_URI, - BrowserContract.History._ID + " = ?", - new String[] { String.valueOf(id) }); - - mAsserter.is((deleted == 1), true, "Inserted history entry was deleted"); - - Cursor c = getHistoryEntryById(appendUriParam(BrowserContract.History.CONTENT_URI, BrowserContract.PARAM_SHOW_DELETED, "1"), id); - mAsserter.is(c.moveToFirst(), true, "Deleted history entry was only marked as deleted"); - - deleted = mProvider.delete(appendUriParam(BrowserContract.History.CONTENT_URI, BrowserContract.PARAM_IS_SYNC, "1"), - BrowserContract.History._ID + " = ?", - new String[] { String.valueOf(id) }); - - mAsserter.is((deleted == 1), true, "Inserted history entry was deleted"); - c.close(); - - c = getHistoryEntryById(appendUriParam(BrowserContract.History.CONTENT_URI, BrowserContract.PARAM_SHOW_DELETED, "1"), id); - mAsserter.is(c.moveToFirst(), false, "Inserted history is now actually deleted"); - - id = insertOneHistoryEntry(); - - deleted = mProvider.delete(ContentUris.withAppendedId(BrowserContract.History.CONTENT_URI, id), null, null); - mAsserter.is((deleted == 1), true, - "Inserted history entry was deleted using URI with id"); - c.close(); - - c = getHistoryEntryById(id); - mAsserter.is(c.moveToFirst(), false, - "Inserted history entry can't be found after deletion using URI with ID"); - c.close(); - } - } - - private class TestDeleteHistoryFavicons extends TestCase { - @Override - public void test() throws Exception { - ContentValues h = createOneHistoryEntry(); - - long id = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, h)); - final String pageUrl = h.getAsString(BrowserContract.History.URL); - - // Insert the favicon into the favicons table - mProvider.insert(BrowserContract.Favicons.CONTENT_URI, createFaviconEntry(pageUrl, "FAVICON")); - - Cursor c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Inserted favicon found"); - - mProvider.delete(ContentUris.withAppendedId(BrowserContract.History.CONTENT_URI, id), null, null); - c.close(); - - c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), false, "Favicon is deleted with last reference to it"); - c.close(); - } - } - - private class TestUpdateHistory extends TestCase { - private int updateWithNullCol(long id, String colName) throws Exception { - ContentValues u = new ContentValues(); - u.putNull(colName); - - int updated = 0; - - try { - updated = mProvider.update(BrowserContract.History.CONTENT_URI, u, - BrowserContract.History._ID + " = ?", - new String[] { String.valueOf(id) }); - } catch (Exception e) {} - - return updated; - } - - @Override - public void test() throws Exception { - ContentValues h = createOneHistoryEntry(); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, h)); - - Cursor c = getHistoryEntryById(id); - mAsserter.is(c.moveToFirst(), true, "Inserted history entry found"); - - long dateCreated = c.getLong(c.getColumnIndex(BrowserContract.History.DATE_CREATED)); - long dateModified = c.getLong(c.getColumnIndex(BrowserContract.History.DATE_MODIFIED)); - - ContentValues u = new ContentValues(); - u.put(BrowserContract.History.VISITS, h.getAsInteger(BrowserContract.History.VISITS) + 1); - u.put(BrowserContract.History.DATE_LAST_VISITED, System.currentTimeMillis()); - u.put(BrowserContract.History.TITLE, h.getAsString(BrowserContract.History.TITLE) + "CHANGED"); - u.put(BrowserContract.History.URL, h.getAsString(BrowserContract.History.URL) + "/more/stuff"); - - int updated = mProvider.update(BrowserContract.History.CONTENT_URI, u, - BrowserContract.History._ID + " = ?", - new String[] { String.valueOf(id) }); - - mAsserter.is((updated == 1), true, "Inserted history entry was updated"); - c.close(); - - c = getHistoryEntryById(id); - mAsserter.is(c.moveToFirst(), true, "Updated history entry found"); - - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.TITLE)), u.getAsString(BrowserContract.History.TITLE), - "Updated history entry has correct title"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.URL)), u.getAsString(BrowserContract.History.URL), - "Updated history entry has correct URL"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.VISITS)), u.getAsString(BrowserContract.History.VISITS), - "Updated history entry has correct number of visits"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.DATE_LAST_VISITED)), u.getAsString(BrowserContract.History.DATE_LAST_VISITED), - "Updated history entry has correct last visited date"); - - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.History.DATE_CREATED)), - dateCreated, - "Updated history entry has same creation date"); - - mAsserter.isnot(c.getLong(c.getColumnIndex(BrowserContract.History.DATE_MODIFIED)), - dateModified, - "Updated history entry has new modification date"); - - updated = updateWithNullCol(id, BrowserContract.History.URL); - mAsserter.is((updated > 0), false, - "Should not be able to update history with null URL"); - - updated = updateWithNullCol(id, BrowserContract.History.VISITS); - mAsserter.is((updated > 0), false, - "Should not be able to update history with null number of visits"); - - u = new ContentValues(); - u.put(BrowserContract.History.URL, "http://examples2.com"); - - updated = mProvider.update(ContentUris.withAppendedId(BrowserContract.History.CONTENT_URI, id), u, null, null); - c.close(); - - c = getHistoryEntryById(id); - mAsserter.is(c.moveToFirst(), true, "Updated history entry found"); - - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.URL)), u.getAsString(BrowserContract.History.URL), - "Updated history entry has correct URL using URI with id"); - c.close(); - } - } - - private class TestUpdateHistoryFavicons extends TestCase { - @Override - public void test() throws Exception { - ContentValues h = createOneHistoryEntry(); - - final String favicon = "FAVICON"; - final String newFavicon = "NEW_FAVICON"; - final String pageUrl = h.getAsString(BrowserContract.History.URL); - - mProvider.insert(BrowserContract.History.CONTENT_URI, h); - - // Insert the favicon into the favicons table - mProvider.insert(BrowserContract.Favicons.CONTENT_URI, createFaviconEntry(pageUrl, favicon)); - - Cursor c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Inserted favicon found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Combined.FAVICON)), "UTF8"), - favicon, "Inserted favicon has corresponding favicon image"); - - ContentValues u = createFaviconEntry(pageUrl, newFavicon); - - mProvider.update(BrowserContract.Favicons.CONTENT_URI, u, null, null); - c.close(); - - c = getFaviconsByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Updated favicon found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Combined.FAVICON)), "UTF8"), - newFavicon, "Updated favicon has corresponding favicon image"); - c.close(); - } - } - - private class TestUpdateOrInsertHistory extends TestCase { - private final String TEST_URL_1 = "http://example.com"; - private final String TEST_URL_2 = "http://example.org"; - private final String TEST_TITLE = "Example"; - - private long getHistoryEntryIdByUrl(String url) { - Cursor c = mProvider.query(BrowserContract.History.CONTENT_URI, - new String[] { BrowserContract.History._ID }, - BrowserContract.History.URL + " = ?", - new String[] { url }, - null); - c.moveToFirst(); - long id = c.getLong(0); - c.close(); - - return id; - } - - @Override - public void test() throws Exception { - Uri updateHistoryUri = BrowserContract.History.CONTENT_URI.buildUpon(). - appendQueryParameter("increment_visits", "true").build(); - Uri updateOrInsertHistoryUri = BrowserContract.History.CONTENT_URI.buildUpon(). - appendQueryParameter("insert_if_needed", "true"). - appendQueryParameter("increment_visits", "true").build(); - - // Update a non-existent history entry, without specifying visits or title - ContentValues values = new ContentValues(); - values.put(BrowserContract.History.URL, TEST_URL_1); - - int updated = mProvider.update(updateHistoryUri, values, - BrowserContract.History.URL + " = ?", - new String[] { TEST_URL_1 }); - mAsserter.is((updated == 0), true, "History entry was not updated"); - Cursor c = mProvider.query(BrowserContract.History.CONTENT_URI, null, null, null, null); - mAsserter.is(c.moveToFirst(), false, "History entry was not inserted"); - c.close(); - - // Now let's try with update-or-insert. - updated = mProvider.update(updateOrInsertHistoryUri, values, - BrowserContract.History.URL + " = ?", - new String[] { TEST_URL_1 }); - mAsserter.is((updated == 1), true, "History entry was inserted"); - - long id = getHistoryEntryIdByUrl(TEST_URL_1); - c = getHistoryEntryById(id); - mAsserter.is(c.moveToFirst(), true, "History entry was inserted"); - - long dateCreated = c.getLong(c.getColumnIndex(BrowserContract.History.DATE_CREATED)); - long dateModified = c.getLong(c.getColumnIndex(BrowserContract.History.DATE_MODIFIED)); - - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.History.VISITS)), 1L, - "Inserted history entry has correct default number of visits"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.TITLE)), TEST_URL_1, - "Inserted history entry has correct default title"); - - // Update the history entry, without specifying an additional visit count - values = new ContentValues(); - values.put(BrowserContract.History.DATE_LAST_VISITED, System.currentTimeMillis()); - values.put(BrowserContract.History.TITLE, TEST_TITLE); - - updated = mProvider.update(updateOrInsertHistoryUri, values, - BrowserContract.History._ID + " = ?", - new String[] { String.valueOf(id) }); - mAsserter.is((updated == 1), true, "Inserted history entry was updated"); - c.close(); - - c = getHistoryEntryById(id); - mAsserter.is(c.moveToFirst(), true, "Updated history entry found"); - - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.TITLE)), TEST_TITLE, - "Updated history entry has correct title"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.History.VISITS)), 2L, - "Updated history entry has correct number of visits"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.History.DATE_CREATED)), dateCreated, - "Updated history entry has same creation date"); - mAsserter.isnot(c.getLong(c.getColumnIndex(BrowserContract.History.DATE_MODIFIED)), dateModified, - "Updated history entry has new modification date"); - - // Create a new history entry, specifying visits and history - values = new ContentValues(); - values.put(BrowserContract.History.URL, TEST_URL_2); - values.put(BrowserContract.History.TITLE, TEST_TITLE); - values.put(BrowserContract.History.VISITS, 10); - - updated = mProvider.update(updateOrInsertHistoryUri, values, - BrowserContract.History.URL + " = ?", - new String[] { values.getAsString(BrowserContract.History.URL) }); - mAsserter.is((updated == 1), true, "History entry was inserted"); - - id = getHistoryEntryIdByUrl(TEST_URL_2); - c.close(); - - c = getHistoryEntryById(id); - mAsserter.is(c.moveToFirst(), true, "History entry was inserted"); - - dateCreated = c.getLong(c.getColumnIndex(BrowserContract.History.DATE_CREATED)); - dateModified = c.getLong(c.getColumnIndex(BrowserContract.History.DATE_MODIFIED)); - - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.History.VISITS)), 10L, - "Inserted history entry has correct specified number of visits"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.TITLE)), TEST_TITLE, - "Inserted history entry has correct specified title"); - - // Update the history entry, specifying additional visit count. - // The expectation is that the value is ignored, and count is bumped by 1 only. - // At the same time, a visit is inserted into the visits table. - // See junit4 tests in BrowserProviderHistoryVisitsTest. - values = new ContentValues(); - values.put(BrowserContract.History.VISITS, 10); - - updated = mProvider.update(updateOrInsertHistoryUri, values, - BrowserContract.History._ID + " = ?", - new String[] { String.valueOf(id) }); - mAsserter.is((updated == 1), true, "Inserted history entry was updated"); - c.close(); - - c = getHistoryEntryById(id); - mAsserter.is(c.moveToFirst(), true, "Updated history entry found"); - - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.TITLE)), TEST_TITLE, - "Updated history entry has correct unchanged title"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.History.URL)), TEST_URL_2, - "Updated history entry has correct unchanged URL"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.History.VISITS)), 11L, - "Updated history entry has correct number of visits"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.History.DATE_CREATED)), dateCreated, - "Updated history entry has same creation date"); - mAsserter.isnot(c.getLong(c.getColumnIndex(BrowserContract.History.DATE_MODIFIED)), dateModified, - "Updated history entry has new modification date"); - c.close(); - - } - } - - private class TestInsertHistoryThumbnails extends TestCase { - @Override - public void test() throws Exception { - ContentValues h = createOneHistoryEntry(); - - final String thumbnail = "THUMBNAIL"; - final String pageUrl = h.getAsString(BrowserContract.History.URL); - - long id = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, h)); - - // Insert the thumbnail into the thumbnails table - mProvider.insert(BrowserContract.Thumbnails.CONTENT_URI, createThumbnailEntry(pageUrl, thumbnail)); - - Cursor c = getThumbnailByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Inserted thumbnail found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Thumbnails.DATA)), "UTF8"), - thumbnail, "Inserted thumbnail has corresponding thumbnail image"); - c.close(); - } - } - - private class TestUpdateHistoryThumbnails extends TestCase { - @Override - public void test() throws Exception { - ContentValues h = createOneHistoryEntry(); - - final String thumbnail = "THUMBNAIL"; - final String newThumbnail = "NEW_THUMBNAIL"; - final String pageUrl = h.getAsString(BrowserContract.History.URL); - - mProvider.insert(BrowserContract.History.CONTENT_URI, h); - - // Insert the thumbnail into the thumbnails table - mProvider.insert(BrowserContract.Thumbnails.CONTENT_URI, createThumbnailEntry(pageUrl, thumbnail)); - - Cursor c = getThumbnailByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Inserted thumbnail found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Thumbnails.DATA)), "UTF8"), - thumbnail, "Inserted thumbnail has corresponding thumbnail image"); - - ContentValues u = createThumbnailEntry(pageUrl, newThumbnail); - - mProvider.update(BrowserContract.Thumbnails.CONTENT_URI, u, null, null); - c.close(); - - c = getThumbnailByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Updated thumbnail found"); - - mAsserter.is(new String(c.getBlob(c.getColumnIndex(BrowserContract.Thumbnails.DATA)), "UTF8"), - newThumbnail, "Updated thumbnail has corresponding thumbnail image"); - c.close(); - } - } - - private class TestDeleteHistoryThumbnails extends TestCase { - @Override - public void test() throws Exception { - ContentValues h = createOneHistoryEntry(); - - long id = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, h)); - final String pageUrl = h.getAsString(BrowserContract.History.URL); - - // Insert the thumbnail into the thumbnails table - mProvider.insert(BrowserContract.Thumbnails.CONTENT_URI, createThumbnailEntry(pageUrl, "THUMBNAIL")); - - Cursor c = getThumbnailByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), true, "Inserted thumbnail found"); - - mProvider.delete(ContentUris.withAppendedId(BrowserContract.History.CONTENT_URI, id), null, null); - c.close(); - - c = getThumbnailByUrl(pageUrl); - mAsserter.is(c.moveToFirst(), false, "Thumbnail is deleted with last reference to it"); - c.close(); - } - } - - private class TestInsertUrlAnnotations extends TestCase { - @Override - public void test() throws Exception { - testInsertionViaContentProvider(); - testInsertionViaUrlAnnotations(); - } - - private void testInsertionViaContentProvider() throws Exception { - final String url = "http://mozilla.org"; - final String key = "todo"; - final String value = "v"; - final long dateCreated = System.currentTimeMillis(); - - mProvider.insert(BrowserContract.UrlAnnotations.CONTENT_URI, createUrlAnnotationEntry(url, key, value, dateCreated)); - - final Cursor c = getUrlAnnotationByUrl(url); - try { - mAsserter.is(c.moveToFirst(), true, "Inserted url annotation found"); - assertKeyValueSync(c, key, value); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.UrlAnnotations.DATE_CREATED)), dateCreated, - "Inserted url annotation has correct date created"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.UrlAnnotations.DATE_MODIFIED)), dateCreated, - "Inserted url annotation has correct date modified"); - } finally { - c.close(); - } - } - - private void testInsertionViaUrlAnnotations() throws Exception { - final String url = "http://hello.org"; - final String key = "toTheUniverse"; - final String value = "42a"; - final long timeBeforeCreation = System.currentTimeMillis(); - - BrowserDB.from(getTestProfile()).getUrlAnnotations().insertAnnotation(mResolver, url, key, value); - - final Cursor c = getUrlAnnotationByUrl(url); - try { - mAsserter.is(c.moveToFirst(), true, "Inserted url annotation found"); - assertKeyValueSync(c, key, value); - mAsserter.is(true, c.getLong(c.getColumnIndex(BrowserContract.UrlAnnotations.DATE_CREATED)) >= timeBeforeCreation, - "Inserted url annotation has date created greater than or equal to time saved before insertion"); - mAsserter.is(true, c.getLong(c.getColumnIndex(BrowserContract.UrlAnnotations.DATE_MODIFIED)) >= timeBeforeCreation, - "Inserted url annotation has correct date modified greater than or equal to time saved before insertion"); - } finally { - c.close(); - } - } - - private void assertKeyValueSync(final Cursor c, final String key, final String value) { - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.UrlAnnotations.KEY)), key, - "Inserted url annotation has correct key"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.UrlAnnotations.VALUE)), value, - "Inserted url annotation has correct value"); - mAsserter.is(c.getInt(c.getColumnIndex(BrowserContract.UrlAnnotations.SYNC_STATUS)), SyncStatus.NEW.getDBValue(), - "Inserted url annotation has default sync status"); - } - } - - private class TestInsertUrlMetadata extends TestCase { - @Override - public void test() throws Exception { - testInsertionViaContentProvider(); - testInsertionViaUrlMetadata(); - // testRetrievalViaUrlMetadata depends on data added in the previous two tests - testRetrievalViaUrlMetadata(); - } - - final String url1 = "http://mozilla.org"; - final String url2 = "http://hello.org"; - - private void testInsertionViaContentProvider() throws Exception { - final String tileImage = "http://mozilla.org/tileImage.png"; - final String tileColor = "#FF0000"; - final String touchIcon = "http://mozilla.org/touchIcon.png"; - - // We can only use update since the redirection machinery doesn't exist for insert - mProvider.update(URLMetadataTable.CONTENT_URI.buildUpon().appendQueryParameter(BrowserContract.PARAM_INSERT_IF_NEEDED, "true").build(), - createUrlMetadataEntry(url1, tileImage, tileColor, touchIcon), - URLMetadataTable.URL_COLUMN + "=?", - new String[] {url1} - ); - - final Cursor c = getUrlMetadataByUrl(url1); - try { - mAsserter.is(c.getCount(), 1, "URL metadata inserted via Content Provider not found"); - } finally { - c.close(); - } - } - - private void testInsertionViaUrlMetadata() throws Exception { - final String tileImage = "http://hello.org/tileImage.png"; - final String tileColor = "#FF0000"; - final String touchIcon = "http://hello.org/touchIcon.png"; - - final Map data = new HashMap<>(); - data.put(URLMetadataTable.URL_COLUMN, url2); - data.put(URLMetadataTable.TILE_IMAGE_URL_COLUMN, tileImage); - data.put(URLMetadataTable.TILE_COLOR_COLUMN, tileColor); - data.put(URLMetadataTable.TOUCH_ICON_COLUMN, touchIcon); - - BrowserDB.from(getTestProfile()).getURLMetadata().save(mResolver, data); - - final Cursor c = getUrlMetadataByUrl(url2); - try { - mAsserter.is(c.moveToFirst(), true, "URL metadata inserted via UrlMetadata not found"); - } finally { - c.close(); - } - } - - private void testRetrievalViaUrlMetadata() { - // LocalURLMetadata has some caching of results: we need to test that this caching - // doesn't prevent us from accessing data that might not have been loaded into the cache. - // We do this by first doing queries with a subset of data, then later querying additional - // data for a given URL. E.g. even if the first query results in only the requested - // column being cached, the subsequent query should still retrieve all requested columns. - // (In this case the URL may be cached but without all data, we need to make sure that - // this state is correctly handled.) - URLMetadata metadata = BrowserDB.from(getTestProfile()).getURLMetadata(); - - Map> results; - Map urlData; - - // 1: retrieve just touch Icons for URL 1 - results = metadata.getForURLs(mResolver, - Collections.singletonList(url1), - Collections.singletonList(URLMetadataTable.TOUCH_ICON_COLUMN)); - - mAsserter.is(results.containsKey(url1), true, "URL 1 not found in results"); - - urlData = results.get(url1); - mAsserter.is(urlData.containsKey(URLMetadataTable.TOUCH_ICON_COLUMN), true, "touchIcon column missing in UrlMetadata results"); - - // 2: retrieve just tile color for URL 2 - results = metadata.getForURLs(mResolver, - Collections.singletonList(url2), - Collections.singletonList(URLMetadataTable.TILE_COLOR_COLUMN)); - - mAsserter.is(results.containsKey(url2), true, "URL 2 not found in results"); - - urlData = results.get(url2); - mAsserter.is(urlData.containsKey(URLMetadataTable.TILE_COLOR_COLUMN), true, "touchIcon column missing in UrlMetadata results"); - - - // 3: retrieve all columns for both URLs - final List urls = Arrays.asList(url1, url2); - - results = metadata.getForURLs(mResolver, - urls, - Arrays.asList(URLMetadataTable.TILE_IMAGE_URL_COLUMN, - URLMetadataTable.TILE_COLOR_COLUMN, - URLMetadataTable.TOUCH_ICON_COLUMN - )); - - mAsserter.is(results.containsKey(url1), true, "URL 1 not found in results"); - mAsserter.is(results.containsKey(url2), true, "URL 2 not found in results"); - - - for (final String url : urls) { - urlData = results.get(url); - mAsserter.is(urlData.containsKey(URLMetadataTable.TILE_IMAGE_URL_COLUMN), true, "touchIcon column missing in UrlMetadata results"); - mAsserter.is(urlData.containsKey(URLMetadataTable.TILE_COLOR_COLUMN), true, "touchIcon column missing in UrlMetadata results"); - mAsserter.is(urlData.containsKey(URLMetadataTable.TOUCH_ICON_COLUMN), true, "touchIcon column missing in UrlMetadata results"); - } - } - } - - private class TestCombinedView extends TestCase { - @Override - public void test() throws Exception { - final String TITLE_1 = "Test Page 1"; - final String TITLE_2 = "Test Page 2"; - final String TITLE_3_HISTORY = "Test Page 3 (History Entry)"; - final String TITLE_3_BOOKMARK = "Test Page 3 (Bookmark Entry)"; - final String TITLE_3_BOOKMARK2 = "Test Page 3 (Bookmark Entry 2)"; - - final String URL_1 = "http://example1.com"; - final String URL_2 = "http://example2.com"; - final String URL_3 = "http://example3.com"; - - final int VISITS = 10; - final long LAST_VISITED = System.currentTimeMillis(); - - // Create a basic history entry - ContentValues basicHistory = createHistoryEntry(TITLE_1, URL_1, VISITS, LAST_VISITED); - long basicHistoryId = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, basicHistory)); - - // Create a basic bookmark entry - ContentValues basicBookmark = createBookmark(TITLE_2, URL_2, mMobileFolderId, - BrowserContract.Bookmarks.TYPE_BOOKMARK, 0, "tags", "description", "keyword"); - long basicBookmarkId = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, basicBookmark)); - - // Create a history entry and bookmark entry with the same URL to - // represent a visited bookmark - ContentValues combinedHistory = createHistoryEntry(TITLE_3_HISTORY, URL_3, VISITS, LAST_VISITED); - long combinedHistoryId = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, combinedHistory)); - - - ContentValues combinedBookmark = createBookmark(TITLE_3_BOOKMARK, URL_3, mMobileFolderId, - BrowserContract.Bookmarks.TYPE_BOOKMARK, 0, "tags", "description", "keyword"); - long combinedBookmarkId = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, combinedBookmark)); - - ContentValues combinedBookmark2 = createBookmark(TITLE_3_BOOKMARK2, URL_3, mMobileFolderId, - BrowserContract.Bookmarks.TYPE_BOOKMARK, 0, "tags", "description", "keyword"); - long combinedBookmarkId2 = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, combinedBookmark2)); - - // Create a bookmark folder to make sure it _doesn't_ show up in the results - ContentValues folderBookmark = createBookmark("", "", mMobileFolderId, - BrowserContract.Bookmarks.TYPE_FOLDER, 0, "tags", "description", "keyword"); - mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, folderBookmark); - - // Sort entries by url so we can check them individually - final Cursor c = mProvider.query(BrowserContract.Combined.CONTENT_URI, null, "", null, BrowserContract.Combined.URL); - - try { - mAsserter.is(c.getCount(), 3, "3 combined entries found"); - - // First combined entry is basic history entry - mAsserter.is(c.moveToFirst(), true, "Found basic history entry"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined._ID)), 0L, - "Combined _id column should always be 0"); - // TODO: Should we change BrowserProvider to make this return -1, not 0? - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.BOOKMARK_ID)), 0L, - "Bookmark id should be 0 for basic history entry"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.HISTORY_ID)), basicHistoryId, - "Basic history entry has correct history id"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Combined.TITLE)), TITLE_1, - "Basic history entry has correct title"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Combined.URL)), URL_1, - "Basic history entry has correct url"); - mAsserter.is(c.getInt(c.getColumnIndex(BrowserContract.Combined.VISITS)), VISITS, - "Basic history entry has correct number of visits"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.DATE_LAST_VISITED)), LAST_VISITED, - "Basic history entry has correct last visit time"); - - // Second combined entry is basic bookmark entry - mAsserter.is(c.moveToNext(), true, "Found basic bookmark entry"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined._ID)), 0L, - "Combined _id column should always be 0"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.BOOKMARK_ID)), basicBookmarkId, - "Basic bookmark entry has correct bookmark id"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.HISTORY_ID)), -1L, - "History id should be -1 for basic bookmark entry"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Combined.TITLE)), TITLE_2, - "Basic bookmark entry has correct title"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Combined.URL)), URL_2, - "Basic bookmark entry has correct url"); - mAsserter.is(c.getInt(c.getColumnIndex(BrowserContract.Combined.VISITS)), -1, - "Visits should be -1 for basic bookmark entry"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.DATE_LAST_VISITED)), -1L, - "Basic entry has correct last visit time"); - - // Third combined entry is a combined history/bookmark entry - mAsserter.is(c.moveToNext(), true, "Found third combined entry"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined._ID)), 0L, - "Combined _id column should always be 0"); - // The bookmark data (bookmark_id and title) associated with the combined entry is non-deterministic, - // it might end up with data coming from any of the matching bookmark entries. - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.BOOKMARK_ID)) == combinedBookmarkId || - c.getLong(c.getColumnIndex(BrowserContract.Combined.BOOKMARK_ID)) == combinedBookmarkId2, true, - "Combined entry has correct bookmark id"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Combined.TITLE)).equals(TITLE_3_BOOKMARK) || - c.getString(c.getColumnIndex(BrowserContract.Combined.TITLE)).equals(TITLE_3_BOOKMARK2), true, - "Combined entry has title corresponding to bookmark entry"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.HISTORY_ID)), combinedHistoryId, - "Combined entry has correct history id"); - mAsserter.is(c.getString(c.getColumnIndex(BrowserContract.Combined.URL)), URL_3, - "Combined entry has correct url"); - mAsserter.is(c.getInt(c.getColumnIndex(BrowserContract.Combined.VISITS)), VISITS, - "Combined entry has correct number of visits"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.DATE_LAST_VISITED)), LAST_VISITED, - "Combined entry has correct last visit time"); - } finally { - c.close(); - } - } - } - - private class TestCombinedViewDisplay extends TestCase { - @Override - public void test() throws Exception { - final String TITLE_1 = "Test Page 1"; - final String TITLE_2 = "Test Page 2"; - final String TITLE_3_HISTORY = "Test Page 3 (History Entry)"; - final String TITLE_3_BOOKMARK = "Test Page 3 (Bookmark Entry)"; - - final String URL_1 = "http://example.com"; - final String URL_2 = "http://example.org"; - final String URL_3 = "http://examples2.com"; - - final int VISITS = 10; - final long LAST_VISITED = System.currentTimeMillis(); - - // Create a basic history entry - ContentValues basicHistory = createHistoryEntry(TITLE_1, URL_1, VISITS, LAST_VISITED); - ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, basicHistory)); - - // Create a basic bookmark entry - ContentValues basicBookmark = createBookmark(TITLE_2, URL_2, mMobileFolderId, - BrowserContract.Bookmarks.TYPE_BOOKMARK, 0, "tags", "description", "keyword"); - mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, basicBookmark); - - // Create a history entry and bookmark entry with the same URL to - // represent a visited bookmark - ContentValues combinedHistory = createHistoryEntry(TITLE_3_HISTORY, URL_3, VISITS, LAST_VISITED); - mProvider.insert(BrowserContract.History.CONTENT_URI, combinedHistory); - - ContentValues combinedBookmark = createBookmark(TITLE_3_BOOKMARK, URL_3, mMobileFolderId, - BrowserContract.Bookmarks.TYPE_BOOKMARK, 0, "tags", "description", "keyword"); - mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, combinedBookmark); - - final Cursor c = mProvider.query(BrowserContract.Combined.CONTENT_URI, null, "", null, null); - try { - mAsserter.is(c.getCount(), 3, "3 combined entries found"); - } finally { - c.close(); - } - } - } - - private class TestCombinedViewWithDeletedBookmark extends TestCase { - @Override - public void test() throws Exception { - final String TITLE = "Test Page 1"; - final String URL = "http://example.com"; - final int VISITS = 10; - final long LAST_VISITED = System.currentTimeMillis(); - - // Create a combined history entry - ContentValues combinedHistory = createHistoryEntry(TITLE, URL, VISITS, LAST_VISITED); - mProvider.insert(BrowserContract.History.CONTENT_URI, combinedHistory); - - // Create a combined bookmark entry - ContentValues combinedBookmark = createBookmark(TITLE, URL, mMobileFolderId, - BrowserContract.Bookmarks.TYPE_BOOKMARK, 0, "tags", "description", "keyword"); - long combinedBookmarkId = ContentUris.parseId(mProvider.insert(BrowserContract.Bookmarks.CONTENT_URI, combinedBookmark)); - - Cursor c = mProvider.query(BrowserContract.Combined.CONTENT_URI, null, "", null, null); - mAsserter.is(c.getCount(), 1, "1 combined entry found"); - - mAsserter.is(c.moveToFirst(), true, "Found combined entry with bookmark id"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.BOOKMARK_ID)), combinedBookmarkId, - "Bookmark id should be set correctly on combined entry"); - - int deleted = mProvider.delete(BrowserContract.Bookmarks.CONTENT_URI, - BrowserContract.Bookmarks._ID + " = ?", - new String[] { String.valueOf(combinedBookmarkId) }); - - mAsserter.is((deleted == 1), true, "Inserted combined bookmark was deleted"); - c.close(); - - c = mProvider.query(BrowserContract.Combined.CONTENT_URI, null, "", null, null); - mAsserter.is(c.getCount(), 1, "1 combined entry found"); - - mAsserter.is(c.moveToFirst(), true, "Found combined entry without bookmark id"); - mAsserter.is(c.getLong(c.getColumnIndex(BrowserContract.Combined.BOOKMARK_ID)), 0L, - "Bookmark id should not be set to removed bookmark id"); - c.close(); - } - } - - /* - * Verify that insert, update, delete, and bulkInsert operations - * notify the ambient content resolver. Each operation calls the - * content resolver notifyChange method synchronously, so it is - * okay to test sequentially. - */ - private class TestBrowserProviderNotifications extends TestCase { - public static final String LOGTAG = "TestBPNotifications"; - - protected void ensureOnlyChangeNotifiedStartsWith(Uri expectedUri, String operation) { - if (expectedUri == null) { - throw new IllegalArgumentException("expectedUri must not be null"); - } - - if (mResolver.notifyChangeList.size() != 1) { - // Log to help post-mortem debugging - Log.w(LOGTAG, "after operation, notifyChangeList = " + mResolver.notifyChangeList); - } - - mAsserter.is((long) mResolver.notifyChangeList.size(), - 1L, - "Content observer was notified exactly once by " + operation); - - Uri uri = mResolver.notifyChangeList.poll(); - - mAsserter.isnot(uri, - null, - "Notification from " + operation + " was valid"); - - mAsserter.ok(uri.toString().startsWith(expectedUri.toString()), - "Content observer was notified exactly once by " + operation, - uri.toString() + " starts with expected prefix " + expectedUri); - } - - @Override - public void test() throws Exception { - // Insert - final ContentValues h = createOneHistoryEntry(); - - mResolver.notifyChangeList.clear(); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.History.CONTENT_URI, h)); - - mAsserter.isnot(id, - -1L, - "Inserted item has valid id"); - - ensureOnlyChangeNotifiedStartsWith(BrowserContract.History.CONTENT_URI, "insert"); - - // Update - mResolver.notifyChangeList.clear(); - h.put(BrowserContract.History.TITLE, "http://newexample.com"); - - long numUpdated = mProvider.update(BrowserContract.History.CONTENT_URI, h, - BrowserContract.History._ID + " = ?", - new String[] { String.valueOf(id) }); - - mAsserter.is(numUpdated, - 1L, - "Correct number of items are updated"); - - ensureOnlyChangeNotifiedStartsWith(BrowserContract.History.CONTENT_URI, "update"); - - // Delete - mResolver.notifyChangeList.clear(); - long numDeleted = mProvider.delete(BrowserContract.History.CONTENT_URI, null, null); - - mAsserter.is(numDeleted, - 1L, - "Correct number of items are deleted"); - - ensureOnlyChangeNotifiedStartsWith(BrowserContract.History.CONTENT_URI, "delete"); - - // Bulk insert - final ContentValues[] hs = new ContentValues[] { createOneHistoryEntry() }; - - mResolver.notifyChangeList.clear(); - long numBulkInserted = mProvider.bulkInsert(BrowserContract.History.CONTENT_URI, hs); - - mAsserter.is(numBulkInserted, - 1L, - "Correct number of items are bulkInserted"); - - ensureOnlyChangeNotifiedStartsWith(BrowserContract.History.CONTENT_URI, "bulkInsert"); - } - } - - /** - * Assert that the provided cursor has the expected number of rows, - * closing the cursor afterwards. - */ - private void assertCountIsAndClose(Cursor c, int expectedCount, String message) { - try { - mAsserter.is(c.getCount(), expectedCount, message); - } finally { - c.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserSearchVisibility.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserSearchVisibility.java deleted file mode 100644 index d8fc793fc..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserSearchVisibility.java +++ /dev/null @@ -1,69 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.support.v4.app.Fragment; -import android.view.KeyEvent; -import android.view.View; - -import com.robotium.solo.Condition; - -/** - * Test for browser search visibility. - * Sends queries from url bar input and verifies that browser search - * visibility is correct. - */ -public class testBrowserSearchVisibility extends BaseTest { - public void testSearchSuggestions() { - blockForGeckoReady(); - - focusUrlBar(); - - // search should not be visible when editing mode starts - assertBrowserSearchVisibility(false); - - mActions.sendKeys("a"); - - // search should be visible when entry is not empty - assertBrowserSearchVisibility(true); - - mActions.sendKeys("b"); - - // search continues to be visible when more text is added - assertBrowserSearchVisibility(true); - - mActions.sendKeyCode(KeyEvent.KEYCODE_DEL); - - // search continues to be visible when not all text is deleted - assertBrowserSearchVisibility(true); - - mActions.sendKeyCode(KeyEvent.KEYCODE_DEL); - - // search should not be visible, entry is empty now - assertBrowserSearchVisibility(false); - } - - private void assertBrowserSearchVisibility(final boolean isVisible) { - waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - final Fragment browserSearch = getBrowserSearch(); - - // The fragment should not be present at all. Testing if the - // fragment is present but has no defined view is not a valid - // state. - if (browserSearch == null) - return !isVisible; - - final View v = browserSearch.getView(); - if (isVisible && v != null && v.getVisibility() == View.VISIBLE) - return true; - - return false; - } - }, 5000); - } -} - diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBug1217581.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBug1217581.java deleted file mode 100644 index fe3c047a3..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBug1217581.java +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: Java; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: nil; -*- - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - - -import org.mozilla.gecko.Telemetry; - -public class testBug1217581 extends BaseTest { - // Take arbitrary histogram names used by Fennec. - private static final String TEST_HISTOGRAM_NAME = "FENNEC_SYNC_NUMBER_OF_SYNCS_COMPLETED"; - private static final String TEST_KEYED_HISTOGRAM_NAME = "FX_MIGRATION_ERRORS"; - private static final String TEST_KEY_NAME = "testBug1217581"; - - - public void testBug1217581() { - blockForGeckoReady(); - - mAsserter.ok(true, "Checking that adding to a keyed histogram then adding to a normal histogram does not cause a crash.", ""); - Telemetry.addToKeyedHistogram(TEST_KEYED_HISTOGRAM_NAME, TEST_KEY_NAME, 1); - Telemetry.addToHistogram(TEST_HISTOGRAM_NAME, 1); - mAsserter.ok(true, "Adding to a keyed histogram then to a normal histogram was a success!", ""); - - mAsserter.ok(true, "Checking that adding to a normal histogram then adding to a keyed histogram does not cause a crash.", ""); - Telemetry.addToHistogram(TEST_HISTOGRAM_NAME, 1); - Telemetry.addToKeyedHistogram(TEST_KEYED_HISTOGRAM_NAME, TEST_KEY_NAME, 1); - mAsserter.ok(true, "Adding to a normal histogram then to a keyed histogram was a success!", ""); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testCheck2.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testCheck2.java deleted file mode 100644 index fc538b5bf..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testCheck2.java +++ /dev/null @@ -1,61 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.json.JSONObject; - -public class testCheck2 extends PixelTest { - @Override - protected Type getTestType() { - return Type.TALOS; - } - - public void testCheck2() { - String url = getAbsoluteUrl("/startup_test/fennecmark/cnn/cnn.com/index.html"); - - // Enable double-tap zooming - setPreferenceAndWaitForChange("browser.ui.zoom.force-user-scalable", true); - - blockForGeckoReady(); - loadAndPaint(url); - - mDriver.setupScrollHandling(); - - /* - * for this test, we load the timecube page, and replay a recorded sequence of events - * that is a user panning/zooming around the page. specific things in the sequence - * include: - * - scroll on one axis followed by scroll on another axis - * - pinch zoom (in and out) - * - double-tap zoom (in and out) - * - multi-fling panning with different velocities on each fling - * - * this checkerboarding metric is going to be more of a "functional" style test than - * a "unit" style test; i.e. it covers a little bit of a lot of things to measure - * overall performance, but doesn't really allow identifying which part is slow. - */ - - MotionEventReplayer mer = new MotionEventReplayer(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop(), - mDriver.getGeckoWidth(), mDriver.getGeckoHeight()); - - float completeness = 0.0f; - mDriver.startCheckerboardRecording(); - // replay the events - try { - mer.replayEvents(getAsset("testcheck2-motionevents")); - // give it some time to draw any final frames - Thread.sleep(1000); - completeness = mDriver.stopCheckerboardRecording(); - } catch (Exception e) { - e.printStackTrace(); - mAsserter.ok(false, "Exception while replaying events", e.toString()); - } - - mAsserter.dumpLog("__start_report" + completeness + "__end_report"); - System.out.println("Completeness score: " + completeness); - long msecs = System.currentTimeMillis(); - mAsserter.dumpLog("__startTimestamp" + msecs + "__endTimestamp"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testCheck3.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testCheck3.java deleted file mode 100644 index 28915bdbc..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testCheck3.java +++ /dev/null @@ -1,61 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.json.JSONObject; - -public class testCheck3 extends PixelTest { - @Override - protected Type getTestType() { - return Type.TALOS; - } - - public void testCheck3() { - String url = getAbsoluteUrl("/facebook.com/www.facebook.com/barackobama.html"); - - // Enable double-tap zooming - setPreferenceAndWaitForChange("browser.ui.zoom.force-user-scalable", true); - - blockForGeckoReady(); - loadAndPaint(url); - - mDriver.setupScrollHandling(); - - /* - * for this test, we load the timecube page, and replay a recorded sequence of events - * that is a user panning/zooming around the page. specific things in the sequence - * include: - * - scroll on one axis followed by scroll on another axis - * - pinch zoom (in and out) - * - double-tap zoom (in and out) - * - multi-fling panning with different velocities on each fling - * - * this checkerboarding metric is going to be more of a "functional" style test than - * a "unit" style test; i.e. it covers a little bit of a lot of things to measure - * overall performance, but doesn't really allow identifying which part is slow. - */ - - MotionEventReplayer mer = new MotionEventReplayer(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop(), - mDriver.getGeckoWidth(), mDriver.getGeckoHeight()); - - float completeness = 0.0f; - mDriver.startCheckerboardRecording(); - // replay the events - try { - mer.replayEvents(getAsset("testcheck2-motionevents")); - // give it some time to draw any final frames - Thread.sleep(1000); - completeness = mDriver.stopCheckerboardRecording(); - } catch (Exception e) { - e.printStackTrace(); - mAsserter.ok(false, "Exception while replaying events", e.toString()); - } - - mAsserter.dumpLog("__start_report" + completeness + "__end_report"); - System.out.println("Completeness score: " + completeness); - long msecs = System.currentTimeMillis(); - mAsserter.dumpLog("__startTimestamp" + msecs + "__endTimestamp"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDBUtils.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDBUtils.java deleted file mode 100644 index 700c1c255..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDBUtils.java +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: Java; c-basic-offset: 4; tab-width: 20; indent-tabs-mode: nil; -*- - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.content.ContentValues; -import android.database.Cursor; -import android.database.sqlite.SQLiteDatabase; -import org.mozilla.gecko.db.DBUtils; - -import java.io.File; -import java.io.IOException; - -public class testDBUtils extends BaseTest { - public void testDBUtils() throws IOException { - final File cacheDir = getInstrumentation().getContext().getCacheDir(); - final File dbFile = File.createTempFile("testDBUtils", ".db", cacheDir); - final SQLiteDatabase db = SQLiteDatabase.openOrCreateDatabase(dbFile, null); - try { - mAsserter.ok(db != null, "Created DB.", null); - db.execSQL("CREATE TABLE foo (x INTEGER NOT NULL DEFAULT 0, y TEXT)"); - final ContentValues v = new ContentValues(); - v.put("x", 5); - v.put("y", "a"); - db.insert("foo", null, v); - v.put("x", 2); - v.putNull("y"); - db.insert("foo", null, v); - v.put("x", 3); - v.put("y", "z"); - db.insert("foo", null, v); - - DBUtils.UpdateOperation[] ops = {DBUtils.UpdateOperation.BITWISE_OR, DBUtils.UpdateOperation.ASSIGN}; - ContentValues[] values = {new ContentValues(), new ContentValues()}; - values[0].put("x", 0xff); - values[1].put("y", "hello"); - - final int updated = DBUtils.updateArrays(db, "foo", values, ops, "x >= 3", null); - - mAsserter.ok(updated == 2, "Updated two rows.", null); - final Cursor out = db.query("foo", new String[]{"x", "y"}, null, null, null, null, "x"); - try { - mAsserter.ok(out.moveToNext(), "Has first result.", null); - mAsserter.ok(2 == out.getInt(0), "1: First column was untouched.", null); - mAsserter.ok(out.isNull(1), "1: Second column was untouched.", null); - - mAsserter.ok(out.moveToNext(), "Has second result.", null); - mAsserter.ok((0xff | 3) == out.getInt(0), "2: First column was ORed correctly.", null); - mAsserter.ok("hello".equals(out.getString(1)), "2: Second column was assigned correctly.", null); - - mAsserter.ok(out.moveToNext(), "Has third result.", null); - mAsserter.ok((0xff | 5) == out.getInt(0), "3: First column was ORed correctly.", null); - mAsserter.ok("hello".equals(out.getString(1)), "3: Second column was assigned correctly.", null); - - mAsserter.ok(!out.moveToNext(), "No more results.", null); - } finally { - out.close(); - } - - } finally { - try { - db.close(); - } catch (Exception e) { - } - dbFile.delete(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDistribution.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDistribution.java deleted file mode 100644 index 4cc08cc5c..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDistribution.java +++ /dev/null @@ -1,556 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.HttpURLConnection; -import java.net.URI; -import java.util.Locale; -import java.util.jar.JarInputStream; -import java.util.NoSuchElementException; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.AppConstants; -import org.mozilla.gecko.BrowserLocaleManager; -import org.mozilla.gecko.GeckoProfile; -import org.mozilla.gecko.GeckoSharedPrefs; -import org.mozilla.gecko.db.BrowserContract; -import org.mozilla.gecko.distribution.Distribution; -import org.mozilla.gecko.distribution.ReferrerDescriptor; -import org.mozilla.gecko.distribution.ReferrerReceiver; -import org.mozilla.gecko.preferences.DistroSharedPrefsImport; -import org.mozilla.gecko.preferences.GeckoPreferences; -import org.mozilla.gecko.util.ThreadUtils; - -import android.app.Activity; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; -import android.content.SharedPreferences; -import android.support.v4.content.LocalBroadcastManager; -import android.util.Log; - -/** - * Tests distribution customization. - * mock-package.zip should contain the following directory structure: - * - * distribution/ - * preferences.json - * bookmarks.json - * searchplugins/ - * common/ - * engine.xml - * suggestedsites/ - * locales/ - * en-US/ - * suggestedsites.json - * extensions/ - * distribution.test@mozilla.org.xpi - */ -public class testDistribution extends ContentProviderTest { - private static final String CLASS_REFERRER_RECEIVER = "org.mozilla.gecko.distribution.ReferrerReceiver"; - private static final String ACTION_INSTALL_REFERRER = "com.android.vending.INSTALL_REFERRER"; - private static final int WAIT_TIMEOUT_MSEC = 10000; - public static final String LOGTAG = "GeckoTestDistribution"; - - public static class TestableDistribution extends Distribution { - @Override - protected JarInputStream fetchDistribution(URI uri, - HttpURLConnection connection) throws IOException { - Log.i(LOGTAG, "Not downloading: this is a test."); - return null; - } - - public TestableDistribution(Context context) { - super(context); - } - - public void go() { - doInit(); - } - - public static void clearReferrerDescriptorForTesting() { - referrer = null; - } - - public static ReferrerDescriptor getReferrerDescriptorForTesting() { - return referrer; - } - } - - private static final String MOCK_PACKAGE = "mock-package.zip"; - private static final int PREF_REQUEST_ID = 0x7357; - - private Activity mActivity; - - /** - * This is a hack. - * - * Startup results in us writing prefs -- we fetch the Distribution, which - * caches its state. Our tests try to wipe those prefs, but apparently - * sometimes race with startup, which leads to us not getting one of our - * expected messages. The test fails. - * - * This hack waits for any existing background tasks -- such as the one that - * writes prefs -- to finish before we begin the test. - */ - private void waitForBackgroundHappiness() { - final Object signal = new Object(); - final Runnable done = new Runnable() { - @Override - public void run() { - synchronized (signal) { - signal.notify(); - } - } - }; - synchronized (signal) { - ThreadUtils.postToBackgroundThread(done); - try { - signal.wait(); - } catch (InterruptedException e) { - mAsserter.ok(false, "InterruptedException waiting on background thread.", e.toString()); - } - } - mAsserter.dumpLog("Background task completed. Proceeding."); - } - - public void testDistribution() throws Exception { - mActivity = getActivity(); - - String mockPackagePath = getMockPackagePath(); - - // Wait for any startup-related background distribution shenanigans to - // finish. This reduces the chance of us racing with startup pref writes. - waitForBackgroundHappiness(); - - // Pre-clear distribution pref, run basic preferences and en-US localized preferences Tests - clearDistributionPref(); - clearDistributionFromDataData(); - - setTestLocale("en-US"); - try { - initDistribution(mockPackagePath); - } catch(NoSuchElementException e) { - // TODO: determine why this exception is intermittently thrown - Log.w(LOGTAG, "NoSuchElementException on first initDistribution -- will retry"); - mSolo.sleep(4000); - initDistribution(mockPackagePath); - } - checkPreferences(); - checkAndroidPreferences(); - checkLocalizedPreferences("en-US"); - checkSearchPlugin(); - checkAddon(); - - // Pre-clear distribution pref, and run es-MX localized preferences Test - clearDistributionPref(); - clearDistributionFromDataData(); - setTestLocale("es-MX"); - initDistribution(mockPackagePath); - checkLocalizedPreferences("es-MX"); - - // Test the (stubbed) download interaction. - setTestLocale("en-US"); - clearDistributionPref(); - clearDistributionFromDataData(); - doTestValidReferrerIntent(); - - clearDistributionPref(); - clearDistributionFromDataData(); - doTestInvalidReferrerIntent(); - } - - private void setOSLocale(Locale locale) { - Locale.setDefault(locale); - BrowserLocaleManager.storeAndNotifyOSLocale(GeckoSharedPrefs.forProfile(mActivity), locale); - } - - private abstract class ExpectNoDistributionCallback implements Distribution.ReadyCallback { - @Override - public void distributionFound(final Distribution distribution) { - mAsserter.ok(false, "No distributionFound.", "Wasn't expecting a distribution!"); - synchronized (distribution) { - distribution.notifyAll(); - } - } - - @Override - public void distributionArrivedLate(final Distribution distribution) { - mAsserter.ok(false, "No distributionArrivedLate.", "Wasn't expecting a late distribution!"); - } - } - - private void doReferrerTest(String ref, final TestableDistribution distribution, final Distribution.ReadyCallback distributionReady) throws InterruptedException { - final Intent intent = new Intent(ACTION_INSTALL_REFERRER); - intent.setClassName(AppConstants.ANDROID_PACKAGE_NAME, CLASS_REFERRER_RECEIVER); - intent.putExtra("referrer", ref); - - final BroadcastReceiver receiver = new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - Log.i(LOGTAG, "Test received " + intent.getAction()); - - ThreadUtils.postToBackgroundThread(new Runnable() { - @Override - public void run() { - distribution.addOnDistributionReadyCallback(distributionReady); - distribution.go(); - } - }); - } - }; - - IntentFilter intentFilter = new IntentFilter(ReferrerReceiver.ACTION_REFERRER_RECEIVED); - final LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(mActivity); - localBroadcastManager.registerReceiver(receiver, intentFilter); - - Log.i(LOGTAG, "Broadcasting referrer intent."); - try { - mActivity.sendBroadcast(intent, null); - synchronized (distribution) { - distribution.wait(WAIT_TIMEOUT_MSEC); - } - } finally { - localBroadcastManager.unregisterReceiver(receiver); - } - } - - public void doTestValidReferrerIntent() throws Exception { - // Equivalent to - // am broadcast -a com.android.vending.INSTALL_REFERRER \ - // -n org.mozilla.fennec/org.mozilla.gecko.distribution.ReferrerReceiver \ - // --es "referrer" "utm_source=mozilla&utm_medium=testmedium&utm_term=testterm&utm_content=testcontent&utm_campaign=distribution" - final String ref = "utm_source=mozilla&utm_medium=testmedium&utm_term=testterm&utm_content=testcontent&utm_campaign=distribution"; - final TestableDistribution distribution = new TestableDistribution(mActivity); - final Distribution.ReadyCallback distributionReady = new ExpectNoDistributionCallback() { - @Override - public void distributionNotFound() { - Log.i(LOGTAG, "Test told distribution processing is done."); - mAsserter.ok(!distribution.exists(), "Not processed.", "No download because we're offline."); - ReferrerDescriptor referrerValue = TestableDistribution.getReferrerDescriptorForTesting(); - mAsserter.dumpLog("Referrer was " + referrerValue); - mAsserter.is(referrerValue.content, "testcontent", "Referrer content"); - mAsserter.is(referrerValue.medium, "testmedium", "Referrer medium"); - mAsserter.is(referrerValue.campaign, "distribution", "Referrer campaign"); - synchronized (distribution) { - distribution.notifyAll(); - } - } - }; - - doReferrerTest(ref, distribution, distributionReady); - } - - /** - * Test processing if the campaign isn't "distribution". The intent shouldn't - * result in a download, and won't be saved as the temporary referrer, - * even if we *do* include it in a Campaign:Set message. - */ - public void doTestInvalidReferrerIntent() throws Exception { - // Equivalent to - // am broadcast -a com.android.vending.INSTALL_REFERRER \ - // -n org.mozilla.fennec/org.mozilla.gecko.distribution.ReferrerReceiver \ - // --es "referrer" "utm_source=mozilla&utm_medium=testmedium&utm_term=testterm&utm_content=testcontent&utm_campaign=testname" - final String ref = "utm_source=mozilla&utm_medium=testmedium&utm_term=testterm&utm_content=testcontent&utm_campaign=testname"; - final TestableDistribution distribution = new TestableDistribution(mActivity); - final Distribution.ReadyCallback distributionReady = new ExpectNoDistributionCallback() { - @Override - public void distributionNotFound() { - mAsserter.ok(!distribution.exists(), "Not processed.", "No download because campaign was wrong."); - ReferrerDescriptor referrerValue = TestableDistribution.getReferrerDescriptorForTesting(); - mAsserter.is(referrerValue, null, "No referrer."); - synchronized (distribution) { - distribution.notifyAll(); - } - } - }; - - doReferrerTest(ref, distribution, distributionReady); - } - - // Initialize the distribution from the mock package. - private Distribution initDistribution(String aPackagePath) { - // Call Distribution.init with the mock package. - Actions.EventExpecter distributionSetExpecter = mActions.expectGeckoEvent("Distribution:Set:OK"); - Distribution dist = Distribution.init(mActivity, aPackagePath, "prefs-" + System.currentTimeMillis()); - distributionSetExpecter.blockForEvent(); - distributionSetExpecter.unregisterListener(); - DistroSharedPrefsImport.importPreferences(mActivity, dist); - return dist; - } - - // Test distribution and preferences values stored in preferences.json - private void checkPreferences() { - String prefID = "distribution.id"; - String prefAbout = "distribution.about"; - String prefVersion = "distribution.version"; - String prefTestBoolean = "distribution.test.boolean"; - String prefTestString = "distribution.test.string"; - String prefTestInt = "distribution.test.int"; - - try { - final String[] prefNames = { prefID, - prefAbout, - prefVersion, - prefTestBoolean, - prefTestString, - prefTestInt }; - - final JSONArray preferences = getPrefs(prefNames); - for (int i = 0; i < preferences.length(); i++) { - JSONObject pref = (JSONObject) preferences.get(i); - String name = pref.getString("name"); - - if (name.equals(prefID)) { - mAsserter.is(pref.getString("value"), "test-partner", "check " + prefID); - } else if (name.equals(prefAbout)) { - mAsserter.is(pref.getString("value"), "Test Partner", "check " + prefAbout); - } else if (name.equals(prefVersion)) { - mAsserter.is(pref.getInt("value"), 1, "check " + prefVersion); - } else if (name.equals(prefTestBoolean)) { - mAsserter.is(pref.getBoolean("value"), true, "check " + prefTestBoolean); - } else if (name.equals(prefTestString)) { - mAsserter.is(pref.getString("value"), "test", "check " + prefTestString); - } else if (name.equals(prefTestInt)) { - mAsserter.is(pref.getInt("value"), 5, "check " + prefTestInt); - } - } - - } catch (JSONException e) { - mAsserter.ok(false, "exception getting preferences", e.toString()); - } - } - - private void checkAndroidPreferences() { - final SharedPreferences sharedPreferences = GeckoSharedPrefs.forProfile(getActivity()); - String prefTestBoolean = "android.distribution.test.boolean"; - String prefTestString = "android.distribution.test.string"; - String prefTestInt = "android.distribution.test.int"; - String prefTestLong = "android.distribution.test.long"; - - final String[] prefNames = { prefTestBoolean, - prefTestString, - prefTestInt, - prefTestLong }; - - try { - for (String name : prefNames) { - if (name.equals(prefTestBoolean)) { - mAsserter.is(sharedPreferences.getBoolean(GeckoPreferences.NON_PREF_PREFIX + name, false), true, "check " + prefTestBoolean); - } else if (name.equals(prefTestString)) { - mAsserter.is(sharedPreferences.getString(GeckoPreferences.NON_PREF_PREFIX + name, ""), "test", "check " + prefTestString); - } else if (name.equals(prefTestInt)) { - mAsserter.is(sharedPreferences.getInt(GeckoPreferences.NON_PREF_PREFIX + name, 0), 1, "check " + prefTestInt); - } else if (name.equals(prefTestLong)) { - mAsserter.is(sharedPreferences.getLong(GeckoPreferences.NON_PREF_PREFIX + name, 0), 2147483648l, "check " + prefTestLong); - } - } - } catch (ClassCastException e) { - mAsserter.ok(false, "exception getting preferences", e.toString()); - } - } - - private void checkSearchPlugin() { - Actions.RepeatedEventExpecter eventExpecter = mActions.expectGeckoEvent("SearchEngines:Data"); - mActions.sendGeckoEvent("SearchEngines:GetVisible", null); - - try { - JSONObject data = new JSONObject(eventExpecter.blockForEventData()); - eventExpecter.unregisterListener(); - JSONArray searchEngines = data.getJSONArray("searchEngines"); - boolean foundEngine = false; - for (int i = 0; i < searchEngines.length(); i++) { - JSONObject engine = (JSONObject) searchEngines.get(i); - String name = engine.getString("name"); - if (name.equals("Test search engine")) { - foundEngine = true; - break; - } - } - mAsserter.ok(foundEngine, "check search plugin", "found test search plugin"); - } catch (JSONException e) { - mAsserter.ok(false, "exception getting search plugins", e.toString()); - } - } - - private void checkAddon() { - try { - final String[] prefNames = { "distribution.test.addonEnabled" }; - final JSONArray preferences = getPrefs(prefNames); - final JSONObject pref = (JSONObject) preferences.get(0); - mAsserter.is(pref.getBoolean("value"), true, "check distribution add-on is enabled"); - } catch (JSONException e) { - mAsserter.ok(false, "exception getting preferences", e.toString()); - } - } - - private JSONArray getPrefs(String[] prefNames) throws JSONException { - final JSONArray result = new JSONArray(); - - mActions.getPrefs(prefNames, new Actions.PrefHandlerBase() { - private void addItem(String pref, Object value) { - try { - final JSONObject item = new JSONObject(); - item.put("name", pref).put("value", value); - result.put(item); - } catch (final JSONException e) { - mAsserter.ok(false, "exception getting prefs", e.toString()); - } - } - - @Override // Actions.PrefHandlerBase - public void prefValue(String pref, boolean value) { - addItem(pref, value); - } - - @Override // Actions.PrefHandlerBase - public void prefValue(String pref, int value) { - addItem(pref, value); - } - - @Override // Actions.PrefHandlerBase - public void prefValue(String pref, String value) { - addItem(pref, value); - } - }).waitForFinish(); - - return result; - } - - // Sets the distribution locale preference for the test. - private void setTestLocale(String locale) { - BrowserLocaleManager.getInstance().setSelectedLocale(mActivity, locale); - } - - // Test localized distribution and preferences values stored in preferences.json - private void checkLocalizedPreferences(final String aLocale) { - final String prefAbout = "distribution.about"; - final String prefLocalizeable = "distribution.test.localizeable"; - final String prefLocalizeableOverride = "distribution.test.localizeable-override"; - final String[] prefNames = { prefAbout, prefLocalizeable, prefLocalizeableOverride }; - - mActions.getPrefs(prefNames, new Actions.PrefHandlerBase() { - @Override // Actions.PrefHandlerBase - public void prefValue(String name, String value) { - if (name.equals(prefAbout)) { - if (aLocale.equals("en-US")) { - mAsserter.is(value, "Test Partner", "check " + prefAbout); - } else if (aLocale.equals("es-MX")) { - mAsserter.is(value, "Afiliado de Prueba", "check " + prefAbout); - } - } else if (name.equals(prefLocalizeable)) { - if (aLocale.equals("en-US")) { - mAsserter.is(value, "http://test.org/en-US/en-US/", "check " + prefLocalizeable); - } else if (aLocale.equals("es-MX")) { - mAsserter.is(value, "http://test.org/es-MX/es-MX/", "check " + prefLocalizeable); - } - } else if (name.equals(prefLocalizeableOverride)) { - if (aLocale.equals("en-US")) { - mAsserter.is(value, "http://cheese.com", "check " + prefLocalizeableOverride); - } else if (aLocale.equals("es-MX")) { - mAsserter.is(value, "http://test.org/es-MX/", "check " + prefLocalizeableOverride); - } - } else { - // Raise exception. - super.prefValue(name, value); - } - } - }).waitForFinish(); - } - - // Copies the mock package to the data directory and returns the file path to it. - private String getMockPackagePath() { - String mockPackagePath = ""; - - try { - InputStream inStream = getAsset(MOCK_PACKAGE); - File dataDir = new File(mActivity.getApplicationInfo().dataDir); - File outFile = new File(dataDir, MOCK_PACKAGE); - - OutputStream outStream = new FileOutputStream(outFile); - int b; - while ((b = inStream.read()) != -1) { - outStream.write(b); - } - inStream.close(); - outStream.close(); - - mockPackagePath = outFile.getPath(); - - } catch (Exception e) { - mAsserter.ok(false, "exception copying mock distribution package to data directory", e.toString()); - } - - return mockPackagePath; - } - - /** - * Clears the distribution pref to return distribution state to STATE_UNKNOWN, - * and wipes the in-memory referrer pigeonhole. - */ - private void clearDistributionPref() { - mAsserter.dumpLog("Clearing distribution pref."); - SharedPreferences settings = mActivity.getSharedPreferences("GeckoApp", Activity.MODE_PRIVATE); - String keyName = mActivity.getPackageName() + ".distribution_state"; - settings.edit().remove(keyName).commit(); - TestableDistribution.clearReferrerDescriptorForTesting(); - } - - /** - * Clears any distribution found in /data/data. - */ - private void clearDistributionFromDataData() throws Exception { - File dataDir = new File(mActivity.getApplicationInfo().dataDir); - - // Recursively delete distribution files that Distribution.init copied to data directory. - File distDir = new File(dataDir, "distribution"); - if (distDir.exists()) { - mAsserter.dumpLog("Clearing distribution from " + distDir.getAbsolutePath()); - delete(distDir); - } else { - mAsserter.dumpLog("No distribution to clear from " + distDir.getAbsolutePath()); - } - } - - @Override - public void setUp() throws Exception { - // TODO: Set up the content provider after setting the distribution. - super.setUp(sBrowserProviderCallable, BrowserContract.AUTHORITY, "browser.db"); - } - - private void delete(File file) throws Exception { - if (file.isDirectory()) { - File[] files = file.listFiles(); - for (File f : files) { - delete(f); - } - } - mAsserter.ok(file.delete(), "clean up distribution files", "deleted " + file.getPath()); - } - - @Override - public void tearDown() throws Exception { - File dataDir = new File(mActivity.getApplicationInfo().dataDir); - - // Delete mock package from data directory. - File mockPackage = new File(dataDir, MOCK_PACKAGE); - mAsserter.ok(mockPackage.delete(), "clean up mock package", "deleted " + mockPackage.getPath()); - - clearDistributionFromDataData(); - clearDistributionPref(); - - super.tearDown(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDoorHanger.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDoorHanger.java deleted file mode 100644 index 2c3feb3a8..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testDoorHanger.java +++ /dev/null @@ -1,205 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.widget.CheckBox; -import android.view.View; -import com.robotium.solo.Condition; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.mozilla.gecko.Actions; - -/* This test will test if doorhangers are displayed and dismissed - The test will test: - * geolocation doorhangers - sharing and not sharing the location dismisses the doorhanger - * opening a new tab hides the doorhanger - * offline storage permission doorhangers - allowing and not allowing offline storage dismisses the doorhanger - * Password Manager doorhangers - Remember and Not Now options dismiss the doorhanger -*/ -public class testDoorHanger extends BaseTest { - private boolean offlineAllowedByDefault = true; - - public void testDoorHanger() { - String GEO_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_GEOLOCATION_URL); - String BLANK_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - String OFFLINE_STORAGE_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_OFFLINE_STORAGE_URL); - - blockForGeckoReady(); - - // Test geolocation notification - loadUrlAndWait(GEO_URL); - waitForText(mStringHelper.GEO_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.GEO_MESSAGE), true, "Geolocation doorhanger has been displayed"); - - // Test "Share" button hides the notification - waitForCheckBox(); - mSolo.clickOnCheckBox(0); - mSolo.clickOnButton(mStringHelper.GEO_ALLOW); - waitForTextDismissed(mStringHelper.GEO_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.GEO_MESSAGE), false, "Geolocation doorhanger has been hidden when allowing share"); - - // Re-trigger geolocation notification - loadUrlAndWait(GEO_URL); - waitForText(mStringHelper.GEO_MESSAGE); - - // Test "Don't share" button hides the notification - waitForCheckBox(); - mSolo.clickOnCheckBox(0); - mSolo.clickOnButton(mStringHelper.GEO_DENY); - waitForTextDismissed(mStringHelper.GEO_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.GEO_MESSAGE), false, "Geolocation doorhanger has been hidden when denying share"); - - /* FIXME: disabled on fig - bug 880060 (for some reason this fails because of some raciness) - // Re-trigger geolocation notification - loadUrlAndWait(GEO_URL); - waitForText(GEO_MESSAGE); - - // Add a new tab - addTab(BLANK_URL); - - // Make sure doorhanger is hidden - mAsserter.is(mSolo.searchText(GEO_MESSAGE), false, "Geolocation doorhanger notification is hidden when opening a new tab"); - */ - - // Save offline-allow-by-default preferences first - mActions.getPrefs(new String[] { "offline-apps.allow_by_default" }, - new Actions.PrefHandlerBase() { - @Override // Actions.PrefHandlerBase - public void prefValue(String pref, boolean value) { - mAsserter.is(pref, "offline-apps.allow_by_default", "Expecting correct pref name"); - offlineAllowedByDefault = value; - } - }).waitForFinish(); - - setPreferenceAndWaitForChange("offline-apps.allow_by_default", false); - - // Load offline storage page - loadUrlAndWait(OFFLINE_STORAGE_URL); - waitForText(mStringHelper.OFFLINE_MESSAGE); - - // Test doorhanger dismissed when tapping "Don't share" - waitForCheckBox(); - mSolo.clickOnCheckBox(0); - mSolo.clickOnButton(mStringHelper.OFFLINE_DENY); - waitForTextDismissed(mStringHelper.OFFLINE_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.OFFLINE_MESSAGE), false, "Offline storage doorhanger notification is hidden when denying storage"); - - // Load offline storage page - loadUrlAndWait(OFFLINE_STORAGE_URL); - waitForText(mStringHelper.OFFLINE_MESSAGE); - - // Test doorhanger dismissed when tapping "Allow" and is not displayed again - mSolo.clickOnButton(mStringHelper.OFFLINE_ALLOW); - waitForTextDismissed(mStringHelper.OFFLINE_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.OFFLINE_MESSAGE), false, "Offline storage doorhanger notification is hidden when allowing storage"); - loadUrlAndWait(OFFLINE_STORAGE_URL); - mAsserter.is(mSolo.searchText(mStringHelper.OFFLINE_MESSAGE), false, "Offline storage doorhanger is no longer triggered"); - - // Revert offline setting - setPreferenceAndWaitForChange("offline-apps.allow_by_default", offlineAllowedByDefault); - - // Load new login page - loadUrlAndWait(getAbsoluteUrl(mStringHelper.ROBOCOP_LOGIN_01_URL)); - waitForText(mStringHelper.LOGIN_MESSAGE); - - // Test doorhanger is dismissed when tapping "Remember". - mSolo.clickOnButton(mStringHelper.LOGIN_ALLOW); - waitForTextDismissed(mStringHelper.LOGIN_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.LOGIN_MESSAGE), false, "Login doorhanger notification is hidden when allowing saving password"); - - // Load login page - loadUrlAndWait(getAbsoluteUrl(mStringHelper.ROBOCOP_LOGIN_02_URL)); - waitForText(mStringHelper.LOGIN_MESSAGE); - - // Test doorhanger is dismissed when tapping "Never". - mSolo.clickOnButton(mStringHelper.LOGIN_DENY); - waitForTextDismissed(mStringHelper.LOGIN_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.LOGIN_MESSAGE), false, "Login doorhanger notification is hidden when denying saving password"); - - testPopupBlocking(); - } - - private void testPopupBlocking() { - String POPUP_URL = getAbsoluteUrl(mStringHelper.ROBOCOP_POPUP_URL); - - setPreferenceAndWaitForChange("dom.disable_open_during_load", true); - - // Load page with popup - loadUrlAndWait(POPUP_URL); - waitForText(mStringHelper.POPUP_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.POPUP_MESSAGE), true, "Popup blocker is displayed"); - - // Wait for the popup to be shown. - Actions.EventExpecter tabEventExpecter = mActions.expectGeckoEvent("Tab:Added"); - - waitForCheckBox(); - mSolo.clickOnCheckBox(0); - mSolo.clickOnButton(mStringHelper.POPUP_ALLOW); - waitForTextDismissed(mStringHelper.POPUP_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.POPUP_MESSAGE), false, "Popup blocker is hidden when popup allowed"); - - try { - final JSONObject data = new JSONObject(tabEventExpecter.blockForEventData()); - - // Check to make sure the popup window was opened. - mAsserter.is("data:text/plain;charset=utf-8,a", data.getString("uri"), "Checking popup URL"); - - // Close the popup window. - closeTab(data.getInt("tabID")); - - } catch (JSONException e) { - mAsserter.ok(false, "exception getting event data", e.toString()); - } - tabEventExpecter.unregisterListener(); - - // Load page with popup - loadUrlAndWait(POPUP_URL); - waitForText(mStringHelper.POPUP_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.POPUP_MESSAGE), true, "Popup blocker is displayed"); - - waitForCheckBox(); - mSolo.clickOnCheckBox(0); - mSolo.clickOnButton(mStringHelper.POPUP_DENY); - waitForTextDismissed(mStringHelper.POPUP_MESSAGE); - mAsserter.is(mSolo.searchText(mStringHelper.POPUP_MESSAGE), false, "Popup blocker is hidden when popup denied"); - - // Check that we're on the same page to verify that the popup was not shown. - verifyUrl(POPUP_URL); - - setPreferenceAndWaitForChange("dom.disable_open_during_load", false); - } - - // wait for a CheckBox view that is clickable - private void waitForCheckBox() { - waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - for (CheckBox view : mSolo.getCurrentViews(CheckBox.class)) { - // checking isClickable alone is not sufficient -- - // intermittent "cannot click" errors persist unless - // additional checks are used - if (view.isClickable() && - view.getVisibility() == View.VISIBLE && - view.getWidth() > 0 && - view.getHeight() > 0) { - return true; - } - } - return false; - } - }, MAX_WAIT_MS); - } - - // wait until the specified text is *not* displayed - private void waitForTextDismissed(final String text) { - waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return !mSolo.searchText(text); - } - }, MAX_WAIT_MS); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testEventDispatcher.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testEventDispatcher.java deleted file mode 100644 index ad40459d5..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testEventDispatcher.java +++ /dev/null @@ -1,450 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.*; - -import org.mozilla.gecko.EventDispatcher; -import org.mozilla.gecko.util.BundleEventListener; -import org.mozilla.gecko.util.EventCallback; -import org.mozilla.gecko.util.GeckoEventListener; -import org.mozilla.gecko.util.NativeEventListener; -import org.mozilla.gecko.util.NativeJSObject; -import org.mozilla.gecko.util.ThreadUtils; - -import android.os.Bundle; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -/** - * Tests the proper operation of EventDispatcher, - * including associated NativeJSObject objects. - */ -public class testEventDispatcher extends JavascriptBridgeTest - implements BundleEventListener, GeckoEventListener, NativeEventListener { - - private static final String TEST_JS = "testEventDispatcher.js"; - private static final String GECKO_EVENT = "Robocop:TestGeckoEvent"; - private static final String GECKO_RESPONSE_EVENT = "Robocop:TestGeckoResponse"; - private static final String NATIVE_EVENT = "Robocop:TestNativeEvent"; - private static final String NATIVE_RESPONSE_EVENT = "Robocop:TestNativeResponse"; - private static final String NATIVE_EXCEPTION_EVENT = "Robocop:TestNativeException"; - private static final String UI_EVENT = "Robocop:TestUIEvent"; - private static final String UI_RESPONSE_EVENT = "Robocop:TestUIResponse"; - private static final String BACKGROUND_EVENT = "Robocop:TestBackgroundEvent"; - private static final String BACKGROUND_RESPONSE_EVENT = "Robocop:TestBackgrondResponse"; - - private static final long WAIT_FOR_BUNDLE_EVENT_TIMEOUT_MILLIS = 20000; // 20 seconds - - private NativeJSObject savedMessage; - - private boolean handledGeckoEvent; - private boolean handledNativeEvent; - private boolean handledAsyncEvent; - - @Override - public void setUp() throws Exception { - super.setUp(); - - EventDispatcher.getInstance().registerGeckoThreadListener( - (GeckoEventListener) this, GECKO_EVENT, GECKO_RESPONSE_EVENT); - EventDispatcher.getInstance().registerGeckoThreadListener( - (NativeEventListener) this, - NATIVE_EVENT, NATIVE_RESPONSE_EVENT, NATIVE_EXCEPTION_EVENT); - EventDispatcher.getInstance().registerUiThreadListener( - this, UI_EVENT, UI_RESPONSE_EVENT); - EventDispatcher.getInstance().registerBackgroundThreadListener( - this, BACKGROUND_EVENT, BACKGROUND_RESPONSE_EVENT); - } - - @Override - public void tearDown() throws Exception { - EventDispatcher.getInstance().unregisterGeckoThreadListener( - (GeckoEventListener) this, GECKO_EVENT, GECKO_RESPONSE_EVENT); - EventDispatcher.getInstance().unregisterGeckoThreadListener( - (NativeEventListener) this, - NATIVE_EVENT, NATIVE_RESPONSE_EVENT, NATIVE_EXCEPTION_EVENT); - EventDispatcher.getInstance().unregisterUiThreadListener( - this, UI_EVENT, UI_RESPONSE_EVENT); - EventDispatcher.getInstance().unregisterBackgroundThreadListener( - this, BACKGROUND_EVENT, BACKGROUND_RESPONSE_EVENT); - - super.tearDown(); - } - - private synchronized void waitForAsyncEvent() { - final long startTime = System.nanoTime(); - while (!handledAsyncEvent) { - if (System.nanoTime() - startTime - >= WAIT_FOR_BUNDLE_EVENT_TIMEOUT_MILLIS * 1e6 /* ns per ms */) { - fFail("Should have completed event before timeout"); - } - try { - wait(1000); // Wait for 1 second at a time. - } catch (final InterruptedException e) { - // Attempt waiting again. - } - } - handledAsyncEvent = false; - } - - private synchronized void notifyAsyncEvent() { - handledAsyncEvent = true; - notifyAll(); - } - - public void testEventDispatcher() { - blockForReadyAndLoadJS(TEST_JS); - - getJS().syncCall("send_test_message", GECKO_EVENT); - fAssertTrue("Should have handled Gecko event synchronously", handledGeckoEvent); - - getJS().syncCall("send_message_for_response", GECKO_RESPONSE_EVENT, "success"); - getJS().syncCall("send_message_for_response", GECKO_RESPONSE_EVENT, "error"); - - getJS().syncCall("send_test_message", NATIVE_EVENT); - fAssertTrue("Should have handled native event synchronously", handledNativeEvent); - - getJS().syncCall("send_message_for_response", NATIVE_RESPONSE_EVENT, "success"); - getJS().syncCall("send_message_for_response", NATIVE_RESPONSE_EVENT, "error"); - - getJS().syncCall("send_test_message", NATIVE_EXCEPTION_EVENT); - - getJS().syncCall("send_test_message", UI_EVENT); - waitForAsyncEvent(); - - getJS().syncCall("send_message_for_response", UI_RESPONSE_EVENT, "success"); - waitForAsyncEvent(); - - getJS().syncCall("send_message_for_response", UI_RESPONSE_EVENT, "error"); - waitForAsyncEvent(); - - getJS().syncCall("send_test_message", BACKGROUND_EVENT); - waitForAsyncEvent(); - - getJS().syncCall("send_message_for_response", BACKGROUND_RESPONSE_EVENT, "success"); - waitForAsyncEvent(); - - getJS().syncCall("send_message_for_response", BACKGROUND_RESPONSE_EVENT, "error"); - waitForAsyncEvent(); - - getJS().syncCall("finish_test"); - } - - @Override - public void handleMessage(final String event, final Bundle message, - final EventCallback callback) { - - if (UI_EVENT.equals(event) || UI_RESPONSE_EVENT.equals(event)) { - fAssertTrue("UI event should be on UI thread", ThreadUtils.isOnUiThread()); - - } else if (BACKGROUND_EVENT.equals(event) || BACKGROUND_RESPONSE_EVENT.equals(event)) { - fAssertTrue("Background event should be on background thread", - ThreadUtils.isOnBackgroundThread()); - - } else { - fFail("Event type should be valid: " + event); - } - - if (UI_EVENT.equals(event) || BACKGROUND_EVENT.equals(event)) { - checkBundle(message); - checkBundle(message.getBundle("object")); - - } else if (UI_RESPONSE_EVENT.equals(event) || BACKGROUND_RESPONSE_EVENT.equals(event)) { - final String response = message.getString("response"); - if ("success".equals(response)) { - callback.sendSuccess(response); - } else if ("error".equals(response)) { - callback.sendError(response); - } else { - fFail("Response type should be valid: " + response); - } - - } else { - fFail("Event type should be valid: " + event); - } - - notifyAsyncEvent(); - } - - @Override - public void handleMessage(final String event, final JSONObject message) { - ThreadUtils.assertOnGeckoThread(); - - try { - if (GECKO_EVENT.equals(event)) { - checkJSONObject(message); - checkJSONObject(message.getJSONObject("object")); - handledGeckoEvent = true; - - } else if (GECKO_RESPONSE_EVENT.equals(event)) { - final String response = message.getString("response"); - if ("success".equals(response)) { - EventDispatcher.sendResponse(message, response); - } else if ("error".equals(response)) { - EventDispatcher.sendError(message, response); - } else { - fFail("Response type should be valid: " + response); - } - - } else { - fFail("Event type should be valid: " + event); - } - } catch (final JSONException e) { - fFail(e.toString()); - } - } - - @Override - public void handleMessage(final String event, final NativeJSObject message, - final EventCallback callback) { - ThreadUtils.assertOnGeckoThread(); - - if (NATIVE_EVENT.equals(event)) { - checkNativeJSObject(message); - checkNativeJSObject(message.getObject("object")); - fAssertNotSame("optObject returns existent value", - null, message.optObject("object", null)); - fAssertSame("optObject returns fallback value if nonexistent", - null, message.optObject("nonexistent_object", null)); - - final NativeJSObject[] objectArray = message.getObjectArray("objectArray"); - fAssertNotNull("Native object array should exist", objectArray); - fAssertEquals("Native object array has correct length", 2, objectArray.length); - fAssertSame("Native object array index 0 has correct value", null, objectArray[0]); - fAssertNotSame("Native object array index 1 has correct value", null, objectArray[1]); - checkNativeJSObject(objectArray[1]); - fAssertNotSame("optObjectArray returns existent value", - null, message.optObjectArray("objectArray", null)); - fAssertSame("optObjectArray returns fallback value if nonexistent", - null, message.optObjectArray("nonexistent_objectArray", null)); - - final Bundle bundle = message.toBundle(); - checkBundle(bundle); - checkBundle(bundle.getBundle("object")); - fAssertNotSame("optBundle returns property value if it exists", - null, message.optBundle("object", null)); - fAssertSame("optBundle returns fallback value if property does not exist", - null, message.optBundle("nonexistent_object", null)); - - final Bundle[] bundleArray = message.getBundleArray("objectArray"); - fAssertNotNull("Native bundle array should exist", bundleArray); - fAssertEquals("Native bundle array has correct length", 2, bundleArray.length); - fAssertSame("Native bundle array index 0 has correct value", null, bundleArray[0]); - fAssertNotSame("Native bundle array index 1 has correct value", null, bundleArray[1]); - checkBundle(bundleArray[1]); - fAssertNotSame("optBundleArray returns existent value", - null, message.optBundleArray("objectArray", null)); - fAssertSame("optBundleArray returns fallback value if nonexistent", - null, message.optBundleArray("nonexistent_objectArray", null)); - - handledNativeEvent = true; - - } else if (NATIVE_RESPONSE_EVENT.equals(event)) { - final String response = message.getString("response"); - if ("success".equals(response)) { - callback.sendSuccess(response); - } else if ("error".equals(response)) { - callback.sendError(response); - } else { - fFail("Response type should be valid: " + response); - } - - // Save this message for post-disposal check. - savedMessage = message; - - } else if (NATIVE_EXCEPTION_EVENT.equals(event)) { - // Make sure we throw the right exceptions. - try { - message.getString(null); - fFail("null property name should throw IllegalArgumentException"); - } catch (final IllegalArgumentException e) { - } - - try { - message.getString("nonexistent_string"); - fFail("Nonexistent property name should throw InvalidPropertyException"); - } catch (final NativeJSObject.InvalidPropertyException e) { - } - - try { - message.getString("int"); - fFail("Wrong property type should throw InvalidPropertyException"); - } catch (final NativeJSObject.InvalidPropertyException e) { - } - - fAssertNotSame("Should have saved a message", null, savedMessage); - try { - savedMessage.toString(); - fFail("Using NativeJSContainer should throw after disposal"); - } catch (final NullPointerException e) { - } - - // Save this test for last; make sure EventDispatcher catches InvalidPropertyException. - message.getString("nonexistent_string"); - fFail("EventDispatcher should catch InvalidPropertyException"); - - } else { - fFail("Event type should be valid: " + event); - } - } - - private void checkBundle(final Bundle bundle) { - fAssertEquals("Bundle boolean has correct value", true, bundle.getBoolean("boolean")); - fAssertEquals("Bundle int has correct value", 1, bundle.getInt("int")); - fAssertEquals("Bundle double has correct value", 0.5, bundle.getDouble("double")); - fAssertEquals("Bundle string has correct value", "foo", bundle.getString("string")); - - final boolean[] booleanArray = bundle.getBooleanArray("booleanArray"); - fAssertNotNull("Bundle boolean array should exist", booleanArray); - fAssertEquals("Bundle boolean array has correct length", 2, booleanArray.length); - fAssertEquals("Bundle boolean array index 0 has correct value", false, booleanArray[0]); - fAssertEquals("Bundle boolean array index 1 has correct value", true, booleanArray[1]); - - final int[] intArray = bundle.getIntArray("intArray"); - fAssertNotNull("Bundle int array should exist", intArray); - fAssertEquals("Bundle int array has correct length", 2, intArray.length); - fAssertEquals("Bundle int array index 0 has correct value", 2, intArray[0]); - fAssertEquals("Bundle int array index 1 has correct value", 3, intArray[1]); - - final double[] doubleArray = bundle.getDoubleArray("doubleArray"); - fAssertNotNull("Bundle double array should exist", doubleArray); - fAssertEquals("Bundle double array has correct length", 2, doubleArray.length); - fAssertEquals("Bundle double array index 0 has correct value", 1.5, doubleArray[0]); - fAssertEquals("Bundle double array index 1 has correct value", 2.5, doubleArray[1]); - - final String[] stringArray = bundle.getStringArray("stringArray"); - fAssertNotNull("Bundle string array should exist", stringArray); - fAssertEquals("Bundle string array has correct length", 2, stringArray.length); - fAssertEquals("Bundle string array index 0 has correct value", "bar", stringArray[0]); - fAssertEquals("Bundle string array index 1 has correct value", "baz", stringArray[1]); - } - - private void checkJSONObject(final JSONObject object) throws JSONException { - fAssertEquals("JSON boolean has correct value", true, object.getBoolean("boolean")); - fAssertEquals("JSON int has correct value", 1, object.getInt("int")); - fAssertEquals("JSON double has correct value", 0.5, object.getDouble("double")); - fAssertEquals("JSON string has correct value", "foo", object.getString("string")); - - final JSONArray booleanArray = object.getJSONArray("booleanArray"); - fAssertNotNull("JSON boolean array should exist", booleanArray); - fAssertEquals("JSON boolean array has correct length", 2, booleanArray.length()); - fAssertEquals("JSON boolean array index 0 has correct value", - false, booleanArray.getBoolean(0)); - fAssertEquals("JSON boolean array index 1 has correct value", - true, booleanArray.getBoolean(1)); - - final JSONArray intArray = object.getJSONArray("intArray"); - fAssertNotNull("JSON int array should exist", intArray); - fAssertEquals("JSON int array has correct length", 2, intArray.length()); - fAssertEquals("JSON int array index 0 has correct value", - 2, intArray.getInt(0)); - fAssertEquals("JSON int array index 1 has correct value", - 3, intArray.getInt(1)); - - final JSONArray doubleArray = object.getJSONArray("doubleArray"); - fAssertNotNull("JSON double array should exist", doubleArray); - fAssertEquals("JSON double array has correct length", 2, doubleArray.length()); - fAssertEquals("JSON double array index 0 has correct value", - 1.5, doubleArray.getDouble(0)); - fAssertEquals("JSON double array index 1 has correct value", - 2.5, doubleArray.getDouble(1)); - - final JSONArray stringArray = object.getJSONArray("stringArray"); - fAssertNotNull("JSON string array should exist", stringArray); - fAssertEquals("JSON string array has correct length", 2, stringArray.length()); - fAssertEquals("JSON string array index 0 has correct value", - "bar", stringArray.getString(0)); - fAssertEquals("JSON string array index 1 has correct value", - "baz", stringArray.getString(1)); - } - - private void checkNativeJSObject(final NativeJSObject object) { - fAssertEquals("Native boolean has correct value", - true, object.getBoolean("boolean")); - fAssertEquals("optBoolean returns existent value", - true, object.optBoolean("boolean", false)); - fAssertEquals("optBoolean returns fallback value if nonexistent", - false, object.optBoolean("nonexistent_boolean", false)); - - fAssertEquals("Native int has correct value", - 1, object.getInt("int")); - fAssertEquals("optInt returns existent value", - 1, object.optInt("int", 0)); - fAssertEquals("optInt returns fallback value if nonexistent", - 0, object.optInt("nonexistent_int", 0)); - - fAssertEquals("Native double has correct value", - 0.5, object.getDouble("double")); - fAssertEquals("optDouble returns existent value", - 0.5, object.optDouble("double", -0.5)); - fAssertEquals("optDouble returns fallback value if nonexistent", - -0.5, object.optDouble("nonexistent_double", -0.5)); - - fAssertEquals("Native string has correct value", - "foo", object.getString("string")); - fAssertEquals("optDouble returns existent value", - "foo", object.optString("string", "bar")); - fAssertEquals("optDouble returns fallback value if nonexistent", - "bar", object.optString("nonexistent_string", "bar")); - - final boolean[] booleanArray = object.getBooleanArray("booleanArray"); - fAssertNotNull("Native boolean array should exist", booleanArray); - fAssertEquals("Native boolean array has correct length", 2, booleanArray.length); - fAssertEquals("Native boolean array index 0 has correct value", false, booleanArray[0]); - fAssertEquals("Native boolean array index 1 has correct value", true, booleanArray[1]); - fAssertNotSame("optBooleanArray returns existent value", - null, object.optBooleanArray("booleanArray", null)); - fAssertSame("optBooleanArray returns fallback value if nonexistent", - null, object.optBooleanArray("nonexistent_booleanArray", null)); - - final int[] intArray = object.getIntArray("intArray"); - fAssertNotNull("Native int array should exist", intArray); - fAssertEquals("Native int array has correct length", 2, intArray.length); - fAssertEquals("Native int array index 0 has correct value", 2, intArray[0]); - fAssertEquals("Native int array index 1 has correct value", 3, intArray[1]); - fAssertNotSame("optIntArray returns existent value", - null, object.optIntArray("intArray", null)); - fAssertSame("optIntArray returns fallback value if nonexistent", - null, object.optIntArray("nonexistent_intArray", null)); - - final double[] doubleArray = object.getDoubleArray("doubleArray"); - fAssertNotNull("Native double array should exist", doubleArray); - fAssertEquals("Native double array has correct length", 2, doubleArray.length); - fAssertEquals("Native double array index 0 has correct value", 1.5, doubleArray[0]); - fAssertEquals("Native double array index 1 has correct value", 2.5, doubleArray[1]); - fAssertNotSame("optDoubleArray returns existent value", - null, object.optDoubleArray("doubleArray", null)); - fAssertSame("optDoubleArray returns fallback value if nonexistent", - null, object.optDoubleArray("nonexistent_doubleArray", null)); - - final String[] stringArray = object.getStringArray("stringArray"); - fAssertNotNull("Native string array should exist", stringArray); - fAssertEquals("Native string array has correct length", 2, stringArray.length); - fAssertEquals("Native string array index 0 has correct value", "bar", stringArray[0]); - fAssertEquals("Native string array index 1 has correct value", "baz", stringArray[1]); - fAssertNotSame("optStringArray returns existent value", - null, object.optStringArray("stringArray", null)); - fAssertSame("optStringArray returns fallback value if nonexistent", - null, object.optStringArray("nonexistent_stringArray", null)); - - fAssertEquals("Native has(null) is false", false, object.has("null")); - fAssertEquals("Native has(emptyString) is true", true, object.has("emptyString")); - - fAssertEquals("Native optBoolean returns fallback value if null", - true, object.optBoolean("null", true)); - fAssertEquals("Native optInt returns fallback value if null", - 42, object.optInt("null", 42)); - fAssertEquals("Native optDouble returns fallback value if null", - -3.1415926535, object.optDouble("null", -3.1415926535)); - fAssertEquals("Native optString returns fallback value if null", - "baz", object.optString("null", "baz")); - - fAssertNotEquals("Native optString does not return fallback value if emptyString", - "baz", object.optString("emptyString", "baz")); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilePicker.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilePicker.java deleted file mode 100644 index c613eca8f..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilePicker.java +++ /dev/null @@ -1,52 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fFail; - -import org.mozilla.gecko.EventDispatcher; -import org.mozilla.gecko.GeckoApp; -import org.mozilla.gecko.GeckoAppShell; -import org.mozilla.gecko.util.GeckoEventListener; - -import org.json.JSONException; -import org.json.JSONObject; - -public class testFilePicker extends JavascriptTest implements GeckoEventListener { - private static final String TEST_FILENAME = "/mnt/sdcard/my-favorite-martian.png"; - - public testFilePicker() { - super("testFilePicker.js"); - } - - @Override - public void handleMessage(String event, final JSONObject message) { - // We handle the FilePicker message here so we can send back hard coded file information. We - // don't want to try to emulate "picking" a file using the Android intent chooser. - if (event.equals("FilePicker:Show")) { - try { - message.put("file", TEST_FILENAME); - } catch (JSONException ex) { - fFail("Can't add filename to message " + TEST_FILENAME); - } - - mActions.sendGeckoEvent("FilePicker:Result", message.toString()); - } - } - - @Override - public void setUp() throws Exception { - super.setUp(); - - GeckoApp.getEventDispatcher().registerGeckoThreadListener(this, "FilePicker:Show"); - } - - @Override - public void tearDown() throws Exception { - super.tearDown(); - - GeckoApp.getEventDispatcher().unregisterGeckoThreadListener(this, "FilePicker:Show"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilterOpenTab.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilterOpenTab.java deleted file mode 100644 index 3c57b864a..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFilterOpenTab.java +++ /dev/null @@ -1,133 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.Callable; - -import org.mozilla.gecko.GeckoProfile; -import org.mozilla.gecko.PrivateTab; -import org.mozilla.gecko.Tab; -import org.mozilla.gecko.db.BrowserContract; -import org.mozilla.gecko.db.TabsProvider; - -import android.content.ContentProvider; -import android.content.Context; -import android.database.Cursor; - -/** - * Tests that local tabs are filtered prior to upload. - * - create a set of tabs and persists them through TabsAccessor. - * - verifies that tabs are filtered by querying. - */ -public class testFilterOpenTab extends ContentProviderTest { - private static final String[] TABS_PROJECTION_COLUMNS = new String[] { - BrowserContract.Tabs.TITLE, - BrowserContract.Tabs.URL, - BrowserContract.Clients.GUID, - BrowserContract.Clients.NAME - }; - - private static final String LOCAL_TABS_SELECTION = BrowserContract.Tabs.CLIENT_GUID + " IS NULL"; - - /** - * Factory function that makes new ContentProvider instances. - *

          - * We want a fresh provider each test, so this should be invoked in - * setUp before each individual test. - */ - protected static Callable sTabProviderCallable = new Callable() { - @Override - public ContentProvider call() { - return new TabsProvider(); - } - }; - - private Cursor getTabsFromLocalClient() throws Exception { - return mProvider.query(BrowserContract.Tabs.CONTENT_URI, - TABS_PROJECTION_COLUMNS, - LOCAL_TABS_SELECTION, - null, - null); - } - - private Tab createTab(int id, String url, boolean external, int parentId, String title) { - return new Tab((Context) getActivity(), id, url, external, parentId, title); - } - - private Tab createPrivateTab(int id, String url, boolean external, int parentId, String title) { - return new PrivateTab((Context) getActivity(), id, url, external, parentId, title); - } - - @Override - public void setUp() throws Exception { - super.setUp(sTabProviderCallable, BrowserContract.TABS_AUTHORITY, "tabs.db"); - mTests.add(new TestInsertLocalTabs()); - } - - public void testFilterOpenTab() throws Exception { - blockForGeckoReady(); - - for (int i = 0; i < mTests.size(); i++) { - Runnable test = mTests.get(i); - - setTestName(test.getClass().getSimpleName()); - test.run(); - } - } - - private class TestInsertLocalTabs extends TestCase { - @Override - public void test() throws Exception { - final String TITLE1 = "Google"; - final String URL1 = "http://www.google.com/"; - final String TITLE2 = "Mozilla Start Page"; - final String URL2 = "about:home"; - final String TITLE3 = "Chrome Weave URL"; - final String URL3 = "chrome://weave/"; - final String TITLE4 = "What You Cache Is What You Get"; - final String URL4 = "wyciwyg://1/test.com"; - final String TITLE5 = "Root Folder"; - final String URL5 = "file:///"; - - // Create a list of local tabs. - List tabs = new ArrayList(6); - Tab tab1 = createTab(1, URL1, false, 0, TITLE1); - Tab tab2 = createTab(2, URL2, false, 0, TITLE2); - Tab tab3 = createTab(3, URL3, false, 0, TITLE3); - Tab tab4 = createTab(4, URL4, false, 0, TITLE4); - Tab tab5 = createTab(5, URL5, false, 0, TITLE5); - Tab tab6 = createPrivateTab(6, URL1, false, 0, TITLE1); - tabs.add(tab1); - tabs.add(tab2); - tabs.add(tab3); - tabs.add(tab4); - tabs.add(tab5); - tabs.add(tab6); - - // Persist the created tabs. Normally, you should be careful that you get a profile on the - // original thread, and do the work in a background one, but for testing we don't. - final DatabaseHelper helper = new DatabaseHelper(getActivity(), mAsserter); - helper.getProfileDB().getTabsAccessor().persistLocalTabs(mResolver, tabs); - - // Get the persisted tab and check if urls are filtered. - Cursor c = getTabsFromLocalClient(); - assertCountIsAndClose(c, 1, 1 + " tabs entries found"); - } - } - - /** - * Assert that the provided cursor has the expected number of rows, - * closing the cursor afterwards. - */ - private void assertCountIsAndClose(Cursor c, int expectedCount, String message) { - try { - mAsserter.is(c.getCount(), expectedCount, message); - } finally { - c.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFindInPage.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFindInPage.java deleted file mode 100644 index 2797fdf5b..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFindInPage.java +++ /dev/null @@ -1,107 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fFail; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Element; -import org.mozilla.gecko.R; - -import org.mozilla.gecko.EventDispatcher; -import org.mozilla.gecko.util.GeckoEventListener; - -import org.json.JSONObject; - -import com.robotium.solo.Condition; - -public class testFindInPage extends JavascriptTest implements GeckoEventListener { - private static final int WAIT_FOR_CONDITION_MS = 3000; - - protected Element next, close; - - public testFindInPage() { - super("testFindInPage.js"); - } - - @Override - public void handleMessage(String event, final JSONObject message) { - if (event.equals("Test:FindInPage")) { - try { - final String text = message.getString("text"); - final int nrOfMatches = Integer.parseInt(message.getString("nrOfMatches")); - findText(text, nrOfMatches); - } catch (Exception e) { - fFail("Can't extract find query from JSON"); - } - } - - if (event.equals("Test:CloseFindInPage")) { - try { - close.click(); - } catch (Exception e) { - fFail("FindInPage prompt not opened"); - } - } - } - - @Override - public void setUp() throws Exception { - super.setUp(); - - EventDispatcher.getInstance().registerGeckoThreadListener(this, - "Test:FindInPage", - "Test:CloseFindInPage"); - } - - @Override - public void tearDown() throws Exception { - super.tearDown(); - - EventDispatcher.getInstance().unregisterGeckoThreadListener(this, - "Test:FindInPage", - "Test:CloseFindInPage"); - } - - public void findText(String text, int nrOfMatches){ - selectMenuItem(mStringHelper.FIND_IN_PAGE_LABEL); - close = mDriver.findElement(getActivity(), R.id.find_close); - boolean success = waitForCondition ( new Condition() { - @Override - public boolean isSatisfied() { - next = mDriver.findElement(getActivity(), R.id.find_next); - if (next != null) { - return true; - } else { - return false; - } - } - }, WAIT_FOR_CONDITION_MS); - mAsserter.ok(success, "Looking for the next search match button in the Find in Page UI", "Found the next match button"); - - // TODO: Find a better way to wait and then enter the text - // Without the sleep this seems to work but the actions are not updated in the UI - mSolo.sleep(500); - - mActions.sendKeys(text); - mActions.sendSpecialKey(Actions.SpecialKey.ENTER); - - // Advance a few matches to scroll the page - for (int i=1;i < nrOfMatches;i++) { - success = waitForCondition ( new Condition() { - @Override - public boolean isSatisfied() { - if (next.click()) { - return true; - } else { - return false; - } - } - }, WAIT_FOR_CONDITION_MS); - mSolo.sleep(500); // TODO: Find a better way to wait here because waitForCondition is not enough - mAsserter.ok(success, "Checking if the next button was clicked", "button was clicked"); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFlingCorrectness.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFlingCorrectness.java deleted file mode 100644 index e173a8c16..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFlingCorrectness.java +++ /dev/null @@ -1,52 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.PaintedSurface; - -/** - * Basic fling correctness test. - * - Loads a page and verifies it draws - * - Drags page upwards by 200 pixels to get ready for a fling - * - Fling the page downwards so we get back to the top and verify. - */ -public class testFlingCorrectness extends PixelTest { - public void testFlingCorrectness() { - String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL); - - MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop()); - - blockForGeckoReady(); - - // load page and check we're at 0,0 - loadAndVerifyBoxes(url); - - // drag page upwards by 200 pixels (use two drags instead of one in case - // the screen size is small) - Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint(); - meh.dragSync(10, 150, 10, 50); - meh.dragSync(10, 150, 10, 50); - PaintedSurface painted = waitForPaint(paintExpecter); - paintExpecter.unregisterListener(); - try { - checkScrollWithBoxes(painted, 0, 200); - } finally { - painted.close(); - } - - // now fling page downwards using a 100-pixel drag but a velocity of 15px/sec, so that - // we scroll the full 200 pixels back to the top of the page - paintExpecter = mActions.expectPaint(); - meh.flingSync(10, 50, 10, 150, 15); - painted = waitForPaint(paintExpecter); - paintExpecter.unregisterListener(); - try { - checkScrollWithBoxes(painted, 0, 0); - } finally { - painted.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFormHistory.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFormHistory.java deleted file mode 100644 index 40968b9be..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testFormHistory.java +++ /dev/null @@ -1,104 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.File; - -import org.mozilla.gecko.db.BrowserContract.FormHistory; - -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.net.Uri; - -/** - * A basic form history contentprovider test. - * - inserts an element in form history when it is not yet set up - * - inserts an element in form history - * - updates an element in form history - * - deletes an element in form history - */ -public class testFormHistory extends BaseTest { - private static final String DB_NAME = "formhistory.sqlite"; - - public void testFormHistory() { - Context context = (Context)getActivity(); - ContentResolver cr = context.getContentResolver(); - ContentValues[] cvs = new ContentValues[1]; - cvs[0] = new ContentValues(); - - blockForGeckoReady(); - - Uri formHistoryUri; - Uri insertUri; - Uri expectedUri; - int numUpdated; - int numDeleted; - - cvs[0].put("fieldname", "fieldname"); - cvs[0].put("value", "value"); - cvs[0].put("timesUsed", "0"); - cvs[0].put("guid", "guid"); - - // Attempt to insert into the db - formHistoryUri = FormHistory.CONTENT_URI; - Uri.Builder builder = formHistoryUri.buildUpon(); - formHistoryUri = builder.appendQueryParameter("profilePath", mProfile).build(); - - insertUri = cr.insert(formHistoryUri, cvs[0]); - expectedUri = formHistoryUri.buildUpon().appendPath("1").build(); - mAsserter.is(expectedUri.toString(), insertUri.toString(), "Insert returned correct uri"); - SqliteCompare(DB_NAME, "SELECT * FROM moz_formhistory", cvs); - - cvs[0].put("fieldname", "fieldname2"); - cvs[0].putNull("guid"); - - numUpdated = cr.update(formHistoryUri, cvs[0], null, null); - mAsserter.is(1, numUpdated, "Correct number updated"); - SqliteCompare(DB_NAME, "SELECT * FROM moz_formhistory", cvs); - - numDeleted = cr.delete(formHistoryUri, null, null); - mAsserter.is(1, numDeleted, "Correct number deleted"); - cvs = new ContentValues[0]; - SqliteCompare(DB_NAME, "SELECT * FROM moz_formhistory", cvs); - - cvs = new ContentValues[1]; - cvs[0] = new ContentValues(); - cvs[0].put("fieldname", "fieldname"); - cvs[0].put("value", "value"); - cvs[0].put("timesUsed", "0"); - cvs[0].putNull("guid"); - - insertUri = cr.insert(formHistoryUri, cvs[0]); - expectedUri = formHistoryUri.buildUpon().appendPath("1").build(); - mAsserter.is(expectedUri.toString(), insertUri.toString(), "Insert returned correct uri"); - SqliteCompare(DB_NAME, "SELECT * FROM moz_formhistory", cvs); - - cvs[0].put("guid", "guid"); - - numUpdated = cr.update(formHistoryUri, cvs[0], null, null); - mAsserter.is(1, numUpdated, "Correct number updated"); - SqliteCompare(DB_NAME, "SELECT * FROM moz_formhistory", cvs); - - numDeleted = cr.delete(formHistoryUri, null, null); - mAsserter.is(1, numDeleted, "Correct number deleted"); - cvs = new ContentValues[0]; - SqliteCompare(DB_NAME, "SELECT * FROM moz_formhistory", cvs); - } - - @Override - public void tearDown() throws Exception { - // remove the entire signons.sqlite file - File profile = new File(mProfile); - File db = new File(profile, "formhistory.sqlite"); - if (db.delete()) { - mAsserter.dumpLog("tearDown deleted "+db.toString()); - } else { - mAsserter.dumpLog("tearDown did not delete "+db.toString()); - } - - super.tearDown(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGeckoProfile.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGeckoProfile.java deleted file mode 100644 index eb9a705be..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGeckoProfile.java +++ /dev/null @@ -1,295 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.File; -import java.util.Enumeration; -import java.util.Hashtable; - -import org.mozilla.gecko.GeckoApp; -import org.mozilla.gecko.GeckoProfile; -import org.mozilla.gecko.GeckoProfileDirectories; -import org.mozilla.gecko.GeckoSharedPrefs; -import org.mozilla.gecko.util.INIParser; -import org.mozilla.gecko.util.INISection; - -import android.content.Context; -import android.text.TextUtils; - -/** - * This patch tests GeckoProfile. It has unit tests for basic getting and removing of profiles, as well as - * some guest mode tests. It does not test locking and unlocking profiles yet. It does not test the file management in GeckoProfile. - */ - -public class testGeckoProfile extends PixelTest { - private final String TEST_PROFILE_NAME = "testProfile"; - private File mozDir; - public void testGeckoProfile() { - blockForGeckoReady(); - - try { - mozDir = GeckoProfileDirectories.getMozillaDirectory(getActivity()); - } catch(Exception ex) { - // If we can't get the moz dir, something is wrong. Just fail quickly. - mAsserter.ok(false, "Couldn't get moz dir", ex.toString()); - return; - } - - checkProfileCreationDeletion(); - checkGuestProfile(); - } - - // This getter just passes an activity. Passing null should throw. - private void checkDefaultGetter() { - // "Default" is a custom profile set up by the test harness. - mAsserter.info("Test using the test profile", GeckoProfile.CUSTOM_PROFILE); - GeckoProfile profile = GeckoProfile.get(getActivity()); - verifyProfile(profile, GeckoProfile.CUSTOM_PROFILE, ((GeckoApp) getActivity()).getProfile().getDir(), true); - - try { - profile = GeckoProfile.get(null); - mAsserter.ok(false, "Passing a null context should throw", profile.toString()); - } catch(Exception ex) { - mAsserter.ok(true, "Passing a null context should throw", ex.toString()); - } - } - - // Test get(Context, String) methods - private void checkNamedGetter(String name) { - mAsserter.info("Test using a named profile", name); - GeckoProfile profile = GeckoProfile.get(getActivity(), name); - if (name != null) { - verifyProfile(profile, name, findDir(name), false); - removeProfile(profile, true); - } else { - // Passing in null for a profile name, should get you the default - File defaultProfile = ((GeckoApp) getActivity()).getProfile().getDir(); - verifyProfile(profile, GeckoProfile.CUSTOM_PROFILE, defaultProfile, true); - } - } - - // Test get(Context, String, String) methods - private void checkNameAndPathGetter(String name, boolean createBefore) { - if (name == null) { - checkNameAndPathGetter(name, null, createBefore); - } else { - checkNameAndPathGetter(name, name + "_FORCED_DIR", createBefore); - } - } - - // Test get(Context, String, String) methods - private void checkNameAndPathGetter(String name, String path, boolean createBefore) { - mAsserter.info("Test using a named profile and path", name + ", " + path); - checkNameAndDirGetter(name, /* useFile */ false, path, /* file */ null, createBefore); - } - - private void checkNameAndFileGetter(String name, boolean createBefore) { - if (name == null) { - checkNameAndFileGetter(name, null, createBefore); - } else { - checkNameAndFileGetter(name, new File(mozDir, name + "_FORCED_DIR"), createBefore); - } - } - - private void checkNameAndFileGetter(String name, File f, boolean createBefore) { - mAsserter.info("Test using a named profile and File", name + ", " + f); - checkNameAndDirGetter(name, /* useFile */ true, /* path */ null, f, createBefore); - } - - private void checkNameAndDirGetter(final String name, final boolean useFile, - String path, final File file, - final boolean createBefore) { - final File f; - if (useFile) { - f = file; - } else if (!TextUtils.isEmpty(path)) { - f = new File(mozDir, path); - path = f.getAbsolutePath(); - } else { - f = null; - } - - if (f != null && createBefore) { - // For some tests we create explicitly beforehand - f.mkdir(); - } - - final File testProfileDir = ((GeckoApp) getActivity()).getProfile().getDir(); - final String expectedName = name != null ? name : GeckoProfile.CUSTOM_PROFILE; - - final GeckoProfile profile; - if (useFile) { - profile = GeckoProfile.get(getActivity(), name, file); - } else { - profile = GeckoProfile.get(getActivity(), name, path); - } - - if (name != null || f != null) { - // GeckoProfile will create a directory and add an ini section if f is null - // here. Therefore, when f is null, shouldHaveFound is false for the - // verifyProfile call, and inProfileIni is true for the removeProfile call. - verifyProfile(profile, expectedName, f, f != null); - removeProfile(profile, f == null); - if (name == null) { - // A side effect of calling GeckoProfile.get with null name is it changes - // the test profile's directory to the new directory. Restore it back. - GeckoProfile.get(getActivity(), null, testProfileDir); - mAsserter.is(GeckoProfile.get(getActivity()).getDir(), testProfileDir, - "Test profile should be restored"); - } - } else { - // Passing in null for a profile name and path, should get you the default - verifyProfile(profile, expectedName, testProfileDir, true); - } - } - - private void checkProfileCreationDeletion() { - // Test - checkDefaultGetter(); - - int index = 0; - checkNamedGetter(TEST_PROFILE_NAME + (index++)); // 0 - checkNamedGetter(null); - - // name and path - checkNameAndPathGetter(TEST_PROFILE_NAME + (index++), true); - checkNameAndPathGetter(TEST_PROFILE_NAME + (index++), false); - checkNameAndPathGetter(null, false); - // null name and path - checkNameAndPathGetter(null, TEST_PROFILE_NAME + (index++) + "_FORCED_DIR", true); - checkNameAndPathGetter(null, TEST_PROFILE_NAME + (index++) + "_FORCED_DIR", false); - // name and null path - checkNameAndPathGetter(TEST_PROFILE_NAME + (index++), null, false); - checkNameAndPathGetter(TEST_PROFILE_NAME + (index++), "", false); - // null name and null path - checkNameAndPathGetter(null, null, false); - checkNameAndPathGetter(null, "", false); - - // name and path - checkNameAndFileGetter(TEST_PROFILE_NAME + (index++), true); - checkNameAndFileGetter(TEST_PROFILE_NAME + (index++), false); - checkNameAndFileGetter(null, false); - // null name and path - checkNameAndFileGetter(null, new File(mozDir, TEST_PROFILE_NAME + (index++) + "_FORCED_DIR"), true); - checkNameAndFileGetter(null, new File(mozDir, TEST_PROFILE_NAME + (index++) + "_FORCED_DIR"), false); - // name and null path - checkNameAndFileGetter(TEST_PROFILE_NAME + (index++), null, false); - // null name and null path - checkNameAndFileGetter(null, null, false); - } - - // Tests of Guest profile methods - private void checkGuestProfile() { - final File testProfileDir = ((GeckoApp) getActivity()).getProfile().getDir(); - - mAsserter.info("Test getting a guest profile", ""); - GeckoProfile profile = GeckoProfile.getGuestProfile(getActivity()); - verifyProfile(profile, GeckoProfile.CUSTOM_PROFILE, getActivity().getFileStreamPath("guest"), true); - mAsserter.ok(profile.inGuestMode(), "Profile is in guest mode", profile.getName()); - - final File dir = profile.getDir(); - mAsserter.info("Test deleting a guest profile", ""); - mAsserter.ok(GeckoProfile.removeProfile(getActivity(), profile), "Cleaned up unlocked guest profile", profile.getName()); - mAsserter.ok(!dir.exists(), "Guest dir was deleted", dir.toString()); - - // Restore test profile directory, which was changed in the last GeckoProfile.get call. - GeckoProfile.get(getActivity(), null, testProfileDir); - mAsserter.is(GeckoProfile.get(getActivity()).getDir(), testProfileDir, - "Test profile should be restored"); - } - - // Runs generic tests on a profile to make sure it looks correct - private void verifyProfile(GeckoProfile profile, String name, File requestedDir, boolean shouldHaveFound) { - mAsserter.is(profile.getName(), name, "Profile name is correct"); - - File dir = null; - if (!shouldHaveFound) { - mAsserter.is(findDir(name), null, "Dir with name doesn't exist yet"); - - dir = profile.getDir(); - mAsserter.isnot(requestedDir, dir, "Profile should not have used expectedDir"); - - // The used dir should be based on the name passed in. - requestedDir = findDir(name); - } else { - dir = profile.getDir(); - } - - mAsserter.is(dir, requestedDir, "Profile dir is correct"); - mAsserter.ok(dir.exists(), "Profile dir exists after getting it", dir.toString()); - } - - // Tries to find a profile in profiles.ini. Makes sure its name and path match what is expected - private void findInProfilesIni(final String name, final File dir, final boolean shouldFind) { - final File mozDir; - try { - mozDir = GeckoProfileDirectories.getMozillaDirectory(getActivity()); - } catch(Exception ex) { - mAsserter.ok(false, "Couldn't get moz dir", ex.toString()); - return; - } - - final INIParser parser = GeckoProfileDirectories.getProfilesINI(mozDir); - final Hashtable sections = parser.getSections(); - - boolean found = false; - for (Enumeration e = sections.elements(); e.hasMoreElements();) { - final INISection section = e.nextElement(); - String iniName = section.getStringProperty("Name"); - if (iniName == null || !iniName.equals(name)) { - continue; - } - - found = true; - - String iniPath = section.getStringProperty("Path"); - mAsserter.is(name, iniName, "Section with name found"); - mAsserter.is(dir.getName(), iniPath, "Section has correct path"); - } - - mAsserter.is(found, shouldFind, "Found profile where expected"); - } - - // Tries to remove a profile from Gecko profile. Verifies that it's removed from profiles.ini and its directory is deleted. - // TODO: Reconsider profile removal. Firefox would not normally remove a - // profile. Outstanding tasks may still try to access files in the profile. - private void removeProfile(GeckoProfile profile, boolean inProfilesIni) { - final String name = profile.getName(); - final File dir = profile.getDir(); - findInProfilesIni(name, dir, inProfilesIni); - mAsserter.ok(dir.exists(), "Profile dir exists before removing", dir.toString()); - mAsserter.ok(GeckoProfile.removeProfile(getActivity(), profile), "Remove was successful", name); - mAsserter.ok(!dir.exists(), "Profile dir was deleted when it was removed", dir.toString()); - findInProfilesIni(name, dir, false); - } - - // Looks for a dir whose name ends with the passed-in string. - private File findDir(String name) { - final File root; - try { - root = GeckoProfileDirectories.getMozillaDirectory(getActivity()); - } catch(Exception ex) { - return null; - } - - File[] dirs = root.listFiles(); - for (File dir : dirs) { - if (dir.getName().endsWith(name)) { - return dir; - } - } - - return null; - } - - @Override - public void tearDown() throws Exception { - // Clear SharedPreferences. - final Context context = getInstrumentation().getContext(); - GeckoSharedPrefs.forProfile(context).edit().clear().apply(); - - super.tearDown(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGeckoRequest.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGeckoRequest.java deleted file mode 100644 index ac4a9862c..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGeckoRequest.java +++ /dev/null @@ -1,121 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.util.concurrent.atomic.AtomicBoolean; - -import com.robotium.solo.Condition; - -import org.mozilla.gecko.GeckoAppShell; -import org.mozilla.gecko.tests.helpers.AssertionHelper; -import org.mozilla.gecko.tests.helpers.WaitHelper; -import org.mozilla.gecko.util.GeckoRequest; -import org.mozilla.gecko.util.NativeJSObject; - -/** - * Tests sending and receiving Gecko requests using the GeckoRequest API. - */ -public class testGeckoRequest extends JavascriptBridgeTest { - private static final String TEST_JS = "testGeckoRequest.js"; - private static final String REQUEST_EVENT = "Robocop:GeckoRequest"; - private static final String REQUEST_EXCEPTION_EVENT = "Robocop:GeckoRequestException"; - private static final int MAX_WAIT_MS = 5000; - - public void testGeckoRequest() { - blockForReadyAndLoadJS(TEST_JS); - - // Register a listener for this request. - getJS().syncCall("add_request_listener", REQUEST_EVENT); - - // Make sure we receive the expected response. - checkFooRequest(); - - // Try registering a second listener for this request, which should fail. - getJS().syncCall("add_second_request_listener", REQUEST_EVENT); - - // Unregister the listener for this request. - getJS().syncCall("remove_request_listener", REQUEST_EVENT); - - // Make sure we don't receive a response after removing the listener. - checkUnregisteredRequest(); - - // Check that we still receive a response for listeners that throw. - getJS().syncCall("add_exception_listener", REQUEST_EXCEPTION_EVENT); - checkExceptionRequest(); - getJS().syncCall("remove_request_listener", REQUEST_EXCEPTION_EVENT); - - getJS().syncCall("finish_test"); - } - - private void checkFooRequest() { - final AtomicBoolean responseReceived = new AtomicBoolean(false); - final String data = "foo"; - - GeckoAppShell.sendRequestToGecko(new GeckoRequest(REQUEST_EVENT, data) { - @Override - public void onResponse(NativeJSObject nativeJSObject) { - // Ensure we receive the expected response from Gecko. - final String result = nativeJSObject.getString("result"); - AssertionHelper.fAssertEquals("Sent and received request data", data + "bar", result); - responseReceived.set(true); - } - }); - - WaitHelper.waitFor("Received response for registered listener", new Condition() { - @Override - public boolean isSatisfied() { - return responseReceived.get(); - } - }, MAX_WAIT_MS); - } - - private void checkExceptionRequest() { - final AtomicBoolean responseReceived = new AtomicBoolean(false); - final AtomicBoolean errorReceived = new AtomicBoolean(false); - - GeckoAppShell.sendRequestToGecko(new GeckoRequest(REQUEST_EXCEPTION_EVENT, null) { - @Override - public void onResponse(NativeJSObject nativeJSObject) { - responseReceived.set(true); - } - - @Override - public void onError(NativeJSObject error) { - errorReceived.set(true); - } - }); - - WaitHelper.waitFor("Received error for listener with exception", new Condition() { - @Override - public boolean isSatisfied() { - return errorReceived.get(); - } - }, MAX_WAIT_MS); - - AssertionHelper.fAssertTrue("onResponse not called for listener with exception", !responseReceived.get()); - } - - private void checkUnregisteredRequest() { - final AtomicBoolean responseReceived = new AtomicBoolean(false); - - GeckoAppShell.sendRequestToGecko(new GeckoRequest(REQUEST_EVENT, null) { - @Override - public void onResponse(NativeJSObject nativeJSObject) { - responseReceived.set(true); - } - }); - - // This check makes sure that we do *not* receive a response for an unregistered listener, - // meaning waitForCondition() should always time out. - getSolo().waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return responseReceived.get(); - } - }, MAX_WAIT_MS); - - AssertionHelper.fAssertTrue("Did not receive response for unregistered listener", !responseReceived.get()); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGetUserMedia.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGetUserMedia.java deleted file mode 100644 index 405ddef7a..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testGetUserMedia.java +++ /dev/null @@ -1,159 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.AppConstants; - -import android.widget.Spinner; -import android.view.View; - -import com.robotium.solo.Condition; - -import android.hardware.Camera; -import android.os.Build; - -public class testGetUserMedia extends BaseTest { - private static final String LOGTAG = testGetUserMedia.class.getSimpleName(); - - private static final String GUM_MESSAGE = "Would you like to share your camera and microphone with"; - private static final String GUM_ALLOW = "^Share$"; - private static final String GUM_DENY = "^Don't Share$"; - - private static final String GUM_BACK_CAMERA = "Back facing camera"; - private static final String GUM_SELECT_TAB = "Choose a tab to stream"; - - private static final String GUM_PAGE_TITLE = "gUM Test Page"; - private static final String GUM_PAGE_FAILED = "failed gumtest"; - private static final String GUM_PAGE_AUDIO = "audio gumtest"; - private static final String GUM_PAGE_VIDEO = "video gumtest"; - private static final String GUM_PAGE_AUDIOVIDEO = "audiovideo gumtest"; - - public void testGetUserMedia() { - // TabShare.js is disabled on release builds. - if (AppConstants.RELEASE_OR_BETA) { - mAsserter.dumpLog(LOGTAG + " is disabled on release builds: returning"); - return; - } - - // Only try GUM test if the device has a camera (emulation). - if (Camera.getNumberOfCameras() <= 0) { - return; - } - - blockForGeckoReady(); - - final String GUM_CAMERA_URL = getAbsoluteUrl("/robocop/robocop_getusermedia2.html"); - final String GUM_TAB_URL = getAbsoluteUrl("/robocop/robocop_getusermedia.html"); - // Browser constraint needs HTTPS - final String GUM_TAB_HTTPS_URL = GUM_TAB_URL.replace("http://mochi.test:8888", "https://example.com"); - - // Tests on Camera page will test camera enumeration code, but - // the actual cameras don't seem to work on the emulators, so - // the enumeration is all that gets tested. - - // Test GUM notification showing - loadUrlAndWait(GUM_CAMERA_URL); - waitForText(GUM_MESSAGE); - mAsserter.is(mSolo.searchText(GUM_MESSAGE), true, "getUserMedia doorhanger has been displayed"); - waitForSpinner(); - // At least one camera detected - mAsserter.is(mSolo.searchText(GUM_BACK_CAMERA), true, "getUserMedia found a camera"); - mSolo.clickOnButton(GUM_DENY); - waitForTextDismissed(GUM_MESSAGE); - mAsserter.is(mSolo.searchText(GUM_MESSAGE), false, "getUserMedia doorhanger hidden after dismissal"); - verifyUrlBarTitle(GUM_CAMERA_URL); - - // Cameras don't work on the testing hardware, so stream a tab - loadUrlAndWait(GUM_TAB_HTTPS_URL); - waitForText(GUM_MESSAGE); - mAsserter.is(mSolo.searchText(GUM_MESSAGE), true, "getUserMedia doorhanger has been displayed"); - waitForSpinner(); - mAsserter.is(mSolo.searchText(GUM_SELECT_TAB), true, "Video source selection available"); - mAsserter.is(mSolo.searchText("MICROPHONE TO USE"), true, "Microphone selection available"); - mAsserter.is(mSolo.searchText("Microphone 1"), true, "Microphone 1 available"); - mSolo.clickOnText("Microphone 1"); - waitForText("No Audio"); - mAsserter.is(mSolo.searchText("No Audio"), true, "No 'No Audio' selection available"); - mSolo.clickOnText("No Audio"); - waitForTextDismissed("Microphone 1"); - mAsserter.is(mSolo.searchText("Microphone 1"), false, "Audio selection hidden after dismissal"); - mAsserter.is(mSolo.searchText(GUM_ALLOW), true, "Share button available after selection"); - mSolo.clickOnButton(GUM_ALLOW); - waitForTextDismissed(GUM_MESSAGE); - mAsserter.is(mSolo.searchText(GUM_MESSAGE), false, "getUserMedia doorhanger hidden after dismissal"); - waitForText(GUM_SELECT_TAB); - mAsserter.is(mSolo.searchText(GUM_SELECT_TAB), true, "Tab selection dialog displayed"); - mSolo.clickOnText(GUM_PAGE_TITLE); - waitForTextDismissed(GUM_SELECT_TAB); - mAsserter.is(mSolo.searchText(GUM_SELECT_TAB), false, "Tab selection dialog hidden"); - verifyUrlBarTitle(GUM_TAB_HTTPS_URL); - - // Android 2.3 testers fail because of audio issues: - // E/AudioRecord( 650): Unsupported configuration: sampleRate 44100, format 1, channelCount 1 - // E/libOpenSLES( 650): android_audioRecorder_realize(0x26d7d8) error creating AudioRecord object - if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { - return; - } - - loadUrlAndWait(GUM_TAB_HTTPS_URL); - waitForText(GUM_MESSAGE); - mAsserter.is(mSolo.searchText(GUM_MESSAGE), true, "getUserMedia doorhanger has been displayed"); - - waitForSpinner(); - mAsserter.is(mSolo.searchText(GUM_SELECT_TAB), true, "Video source selection available"); - mSolo.clickOnButton(GUM_ALLOW); - waitForTextDismissed(GUM_MESSAGE); - waitForText(GUM_SELECT_TAB); - mAsserter.is(mSolo.searchText(GUM_SELECT_TAB), true, "Tab selection dialog displayed"); - mSolo.clickOnText(GUM_PAGE_TITLE); - waitForTextDismissed(GUM_SELECT_TAB); - mAsserter.is(mSolo.searchText(GUM_SELECT_TAB), false, "Tab selection dialog hidden"); - verifyUrlBarTitle(GUM_TAB_HTTPS_URL); - - loadUrlAndWait(GUM_TAB_HTTPS_URL); - waitForText(GUM_MESSAGE); - mAsserter.is(mSolo.searchText(GUM_MESSAGE), true, "getUserMedia doorhanger has been displayed"); - - waitForSpinner(); - mAsserter.is(mSolo.searchText(GUM_SELECT_TAB), true, "Video source selection available"); - mSolo.clickOnText(GUM_SELECT_TAB); - waitForText("No Video"); - mAsserter.is(mSolo.searchText("No Video"), true, "'No video' source selection available"); - mSolo.clickOnText("No Video"); - waitForTextDismissed(GUM_SELECT_TAB); - mSolo.clickOnButton(GUM_ALLOW); - waitForTextDismissed(GUM_MESSAGE); - mAsserter.is(mSolo.searchText(GUM_MESSAGE), false, "getUserMedia doorhanger hidden after dismissal"); - verifyUrlBarTitle(GUM_TAB_HTTPS_URL); - } - - // wait for a Spinner view that is clickable - private void waitForSpinner() { - waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - for (Spinner view : mSolo.getCurrentViews(Spinner.class)) { - if (view.isClickable() && - view.getVisibility() == View.VISIBLE && - view.getWidth() > 0 && - view.getHeight() > 0) { - return true; - } - } - return false; - } - }, MAX_WAIT_MS); - } - - // wait until the specified text is *not* displayed - private void waitForTextDismissed(final String text) { - waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return !mSolo.searchText(text); - } - }, MAX_WAIT_MS); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHistory.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHistory.java deleted file mode 100644 index 1f2fbbd38..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHistory.java +++ /dev/null @@ -1,74 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.view.View; -import android.view.ViewGroup; -import android.widget.ListView; - -import org.mozilla.gecko.home.HomePager; - -import com.robotium.solo.Condition; - -public class testHistory extends AboutHomeTest { - private View mFirstChild; - - public void testHistory() { - blockForGeckoReady(); - - String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - String url2 = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - String url3 = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_03_URL); - - inputAndLoadUrl(url); - verifyUrlBarTitle(url); - inputAndLoadUrl(url2); - verifyUrlBarTitle(url2); - inputAndLoadUrl(url3); - verifyUrlBarTitle(url3); - - openAboutHomeTab(AboutHomeTabs.HISTORY); - - final ListView hList = findListViewWithTag(HomePager.LIST_TAG_HISTORY); - mAsserter.is(waitForNonEmptyListToLoad(hList), true, "list is properly loaded"); - - // Click on the history item and wait for the page to load - // wait for the history list to be populated - mFirstChild = null; - boolean success = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - mFirstChild = hList.getChildAt(1); - if (mFirstChild == null) { - return false; - } - if (mFirstChild instanceof android.view.ViewGroup) { - ViewGroup group = (ViewGroup)mFirstChild; - if (group.getChildCount() < 1) { - return false; - } - for (int i = 0; i < group.getChildCount(); i++) { - View grandChild = group.getChildAt(i); - if (grandChild instanceof android.widget.TextView) { - mAsserter.ok(true, "found TextView:", ((android.widget.TextView)grandChild).getText().toString()); - } - } - } else { - mAsserter.dumpLog("first child not a ViewGroup: "+mFirstChild); - return false; - } - return true; - } - }, MAX_WAIT_MS); - - mAsserter.isnot(mFirstChild, null, "Got history item"); - mSolo.clickOnView(mFirstChild); - - // The first item here (since it was just visited) should be a "Switch to tab" item - // i.e. don't expect a DOMContentLoaded event - verifyUrlBarTitle(mStringHelper.ROBOCOP_BLANK_PAGE_03_URL); - verifyUrl(url3); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHistoryService.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHistoryService.java deleted file mode 100644 index 4c605f6c3..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHistoryService.java +++ /dev/null @@ -1,12 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -public class testHistoryService extends JavascriptTest { - - public testHistoryService() { - super("testHistoryService.js"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHomeBanner.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHomeBanner.java deleted file mode 100644 index be36ae5a0..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHomeBanner.java +++ /dev/null @@ -1,94 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.tests.helpers.GeckoHelper; -import org.mozilla.gecko.tests.helpers.NavigationHelper; - -public class testHomeBanner extends UITest { - - private static final String TEST_URL = "chrome://roboextender/content/robocop_home_banner.html"; - private static final String TEXT = "The quick brown fox jumps over the lazy dog."; - - public void testHomeBanner() { - GeckoHelper.blockForReady(); - - // Make sure the banner is not visible to start. - mAboutHome.assertVisible() - .assertBannerNotVisible(); - - // These test methods depend on being run in this order. - addBannerTest(); - - // Make sure the banner hides when the user starts interacting with the url bar. - hideOnToolbarFocusTest(); - - // Make sure to test dismissing the banner after everything else, since dismissing - // the banner will prevent it from showing up again. - dismissBannerTest(); - } - - /** - * Adds a banner message, verifies that it appears when it should, and verifies that - * onshown/onclick handlers are called in JS. - * - * Note: This test does not remove the message after it is done. - */ - private void addBannerTest() { - // Load about:home and make sure the onshown handler is called. - Actions.EventExpecter eventExpecter = getActions().expectGeckoEvent("TestHomeBanner:MessageShown"); - addBannerMessage(); - NavigationHelper.enterAndLoadUrl(mStringHelper.ABOUT_HOME_URL); - eventExpecter.blockForEvent(); - - // Verify that the banner is visible with the correct text. - mAboutHome.assertBannerText(TEXT); - - // Verify that the banner isn't visible after navigating away from about:home. - NavigationHelper.enterAndLoadUrl(mStringHelper.ABOUT_FIREFOX_URL); - mAboutHome.assertBannerNotVisible(); - } - - - private void hideOnToolbarFocusTest() { - NavigationHelper.enterAndLoadUrl(mStringHelper.ABOUT_HOME_URL); - mAboutHome.assertVisible() - .assertBannerVisible(); - - mToolbar.enterEditingMode(); - mAboutHome.assertBannerNotVisible(); - - mToolbar.dismissEditingMode(); - mAboutHome.assertBannerVisible(); - } - - /** - * Adds a banner message, verifies that its ondismiss handler is called in JS, - * and verifies that the banner is no longer shown after it is dismissed. - * - * Note: This test does not remove the message after it is done. - */ - private void dismissBannerTest() { - NavigationHelper.enterAndLoadUrl(mStringHelper.ABOUT_HOME_URL); - mAboutHome.assertVisible(); - - // Test to make sure the ondismiss handler is called when the close button is clicked. - final Actions.EventExpecter eventExpecter = getActions().expectGeckoEvent("TestHomeBanner:MessageDismissed"); - mAboutHome.dismissBanner(); - eventExpecter.blockForEvent(); - - mAboutHome.assertBannerNotVisible(); - } - - /** - * Loads the roboextender page to add a message to the banner. - */ - private void addBannerMessage() { - final Actions.EventExpecter eventExpecter = getActions().expectGeckoEvent("TestHomeBanner:MessageAdded"); - NavigationHelper.enterAndLoadUrl(TEST_URL + "#addMessage"); - eventExpecter.blockForEvent(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHomeListsProvider.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHomeListsProvider.java deleted file mode 100644 index fbe2df82f..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testHomeListsProvider.java +++ /dev/null @@ -1,118 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.content.ContentUris; -import android.content.ContentValues; -import android.database.Cursor; -import android.net.Uri; - -public class testHomeListsProvider extends ContentProviderTest { - // This test does not run, so it just needs to compile. The test was - // disabled at the time the real Contract was removed; to leave a skeleton - // for a future re-implementor, we include this dummy Contract class. - private static class Contract { - public static final Uri CONTENT_URI = null; - public static final Uri CONTENT_FAKE_URI = null; - - public static final String _ID = null; - public static final String PROVIDER_ID = null; - public static final String TITLE = null; - public static final String URL = null; - } - - @SuppressWarnings("unused") - private void ensureEmptyDatabase() throws Exception { - // Delete all the list entries. - mProvider.delete(Contract.CONTENT_URI, null, null); - - final Cursor c = mProvider.query(Contract.CONTENT_URI, null, null, null, null); - mAsserter.is(c.getCount(), 0, "All list entries were deleted"); - c.close(); - } - - @Override - public void setUp() throws Exception { - // This test is disabled, so this just needs to compile. - super.setUp(null, null, "homelists.db"); - - mTests.add(new TestFakeItems()); - - // Disabled until database support lands - //mTests.add(new TestInsertItem()); - } - - public void testListsProvider() throws Exception { - for (int i = 0; i < mTests.size(); i++) { - Runnable test = mTests.get(i); - - setTestName(test.getClass().getSimpleName()); - // Disabled until database support lands - //ensureEmptyDatabase(); - test.run(); - } - } - - abstract class Test implements Runnable { - @Override - public void run() { - try { - test(); - } catch (Exception e) { - mAsserter.is(true, false, "Test " + this.getClass().getName() + - " threw exception: " + e); - } - } - - public abstract void test() throws Exception; - } - - class TestFakeItems extends Test { - @Override - public void test() throws Exception { - final long id = 1; - final String providerId = "fake-provider"; - final String title = "Example"; - final String url = "http://example.com"; - - final Cursor c = mProvider.query(Contract.CONTENT_FAKE_URI, null, null, null, null); - mAsserter.is(c.moveToFirst(), true, "Fake list item found"); - - mAsserter.is(c.getLong(c.getColumnIndex(Contract._ID)), id, "Fake list item has correct ID"); - mAsserter.is(c.getString(c.getColumnIndex(Contract.PROVIDER_ID)), providerId, "Fake list item has correct provider ID"); - mAsserter.is(c.getString(c.getColumnIndex(Contract.TITLE)), title, "Fake list item has correct title"); - mAsserter.is(c.getString(c.getColumnIndex(Contract.URL)), url, "Fake list item has correct URL"); - - c.close(); - } - } - - class TestInsertItem extends Test { - @Override - public void test() throws Exception { - final String providerId = "{c77da387-4c80-0c45-9f22-70276c29b3ed}"; - final String title = "Mozilla"; - final String url = "https://mozilla.org"; - - // Insert a new list item with test values. - final ContentValues cv = new ContentValues(); - cv.put(Contract.PROVIDER_ID, providerId); - cv.put(Contract.TITLE, title); - cv.put(Contract.URL, url); - - final long id = ContentUris.parseId(mProvider.insert(Contract.CONTENT_URI, cv)); - - // Check that the item was inserted correctly. - final Cursor c = mProvider.query(Contract.CONTENT_URI, null, Contract._ID + " = ?", new String[] { String.valueOf(id) }, null); - mAsserter.is(c.moveToFirst(), true, "Inserted list item found"); - - mAsserter.is(c.getString(c.getColumnIndex(Contract.PROVIDER_ID)), providerId, "Inserted list item has correct provider ID"); - mAsserter.is(c.getString(c.getColumnIndex(Contract.TITLE)), title, "Inserted list item has correct title"); - mAsserter.is(c.getString(c.getColumnIndex(Contract.URL)), url, "Inserted list item has correct URL"); - - c.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testICODecoder.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testICODecoder.java deleted file mode 100644 index 5cbbd1be9..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testICODecoder.java +++ /dev/null @@ -1,238 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.graphics.Bitmap; - -import org.mozilla.gecko.icons.decoders.ICODecoder; -import org.mozilla.gecko.icons.decoders.IconDirectoryEntry; -import org.mozilla.gecko.icons.decoders.LoadFaviconResult; - -import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertEquals; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNull; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotNull; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -public class testICODecoder extends UITest { - - private int mGolemNumIconDirEntries; - - public void testICODecoder() throws IOException { - testMicrosoftFavicon(); - testNvidiaFavicon(); - testGolemFavicon(); - testMissingHeader(); - testCorruptIconDirectory(); - } - - /** - * Decode and verify a Microsoft favicon with six different sizes: - * 128x128, 72x72, 48x48, 32x32, 24x24, 16x16 - * Each of the six BMPs supposedly has zero colour depth. - */ - private void testMicrosoftFavicon() throws IOException { - byte[] icoBytes = readICO("microsoft_favicon.ico"); - fAssertEquals("Expecting Microsoft favicon to be 17174 bytes.", 17174, icoBytes.length); - - ICODecoder decoder = new ICODecoder(getInstrumentation().getTargetContext(), icoBytes, 0, - icoBytes.length); - LoadFaviconResult result = decoder.decode(); - fAssertNotNull("Expecting Microsoft favicon to not fail decoding.", result); - - int largestBitmap = Integer.MAX_VALUE; - - int[] possibleSizes = {16, 24, 32, 48, 72, 128}; - for (int i = 0; i < possibleSizes.length; i++) { - if (possibleSizes[i] > decoder.getLargestFaviconSize()) { - largestBitmap = possibleSizes[i]; - - // Verify that all bitmaps but the smallest larger than Favicons.largestFaviconSize - // have been discarded. - for (int j = i + 1; j < possibleSizes.length; j++) { - Bitmap selectedBitmap = result.getBestBitmap(possibleSizes[j]); - fAssertNotNull("Expecting a best bitmap to be found for " + - possibleSizes[j] + "x" + possibleSizes[j], selectedBitmap); - - fAssertEquals("Expecting best bitmap to have width " + possibleSizes[i], - possibleSizes[i], selectedBitmap.getWidth()); - fAssertEquals("Expecting best bitmap to have height " + possibleSizes[i], - possibleSizes[i], selectedBitmap.getHeight()); - - // Reset the result's bitmap iterator. - result = decoder.decode(); - } - - break; - } - } - - int[] expectedSizes = { - // If we request a 33x33 we should get a 48x48. - 33, 48, - // If we request a 24x24 we should get a 24x24. - 24, 24, - // If we request a 8x8 we should get a 16x16. - 8, 16, - }; - - for (int i = 0; i < expectedSizes.length - 1; i += 2) { - if (expectedSizes[i + 1] > largestBitmap) { - // This bitmap has been discarded. - continue; - } - - Bitmap selectedBitmap = result.getBestBitmap(expectedSizes[i]); - fAssertNotNull("Expecting a best bitmap to have been found for " + - expectedSizes[i] + "x" + expectedSizes[i], selectedBitmap); - - fAssertEquals("Expecting best bitmap to have width " + expectedSizes[i + 1], - expectedSizes[i + 1], selectedBitmap.getWidth()); - fAssertEquals("Expecting best bitmap to have height " + expectedSizes[i + 1], - expectedSizes[i + 1], selectedBitmap.getHeight()); - - // Reset the result's bitmap iterator. - result = decoder.decode(); - } - } - - /** - * Decode and verify a NVIDIA favicon with three different colour depths, - * and three different sizes for each colour depth. All payloads are BMP. - */ - private void testNvidiaFavicon() throws IOException { - byte[] icoBytes = readICO("nvidia_favicon.ico"); - fAssertEquals("Expecting NVIDIA favicon to be 25214 bytes.", 25214, icoBytes.length); - - ICODecoder decoder = new ICODecoder(getInstrumentation().getTargetContext(), icoBytes, 0, - icoBytes.length); - fAssertNotNull("Expecting NVIDIA favicon to not fail decoding.", decoder.decode()); - - // Verify the best entry is correctly chosen for each width. - // We expect 32 bpp in all cases even if 32 bpp exceeds IconDirectoryEntry.maxBPP. - // This is okay because IconDirectoryEntry.maxBPP is a "desired bpp" not the absolute max. - // This was chosen because we think it gives better results to select a higher bpp and let - // Android downscale the bpp, rather than showing a bitmap of potentially significantly - // lower color depth. - IconDirectoryEntry[] expectedEntries = { - new IconDirectoryEntry(16, 16, 0, 32, 1128, 24086, false), - new IconDirectoryEntry(32, 32, 0, 32, 4264, 19822, false), - new IconDirectoryEntry(48, 48, 0, 32, 9640, 10182, false) - }; - - IconDirectoryEntry[] directory = decoder.getIconDirectory(); - fAssertTrue("NVIDIA icon directory must contain at least one entry.", directory.length > 0); - for (int i = 0; i < directory.length; i++) { - if (expectedEntries[i].getWidth() > directory[directory.length - 1].getWidth()) { - // This test-case has been discarded due to being over-sized. Next. - // All subsequent cases will be too. - fAssertTrue("At least one test-case should not have been discarded.", i > 0); - break; - } - - // Verify the actual Icon Directory entry was as expected. - fAssertEquals(directory[i] + " is expected to be equal to " + expectedEntries[i], - 0, directory[i].compareTo(expectedEntries[i])); - } - } - - /** - * Decode and verify a Golem.de favicon with five bitmaps: 256x256, 48x48, 32x32, 24x24, 16x16 - * Only the 256x256 is a PNG payload. All others are BMP. - */ - private void testGolemFavicon() throws IOException { - byte[] icoBytes = readICO("golem_favicon.ico"); - fAssertEquals("Expecting Golem favicon to be 40648 bytes.", 40648, icoBytes.length); - - ICODecoder decoder = new ICODecoder(getInstrumentation().getTargetContext(), icoBytes, 0, - icoBytes.length); - fAssertNotNull("Expecting Golem favicon to not fail decoding.", decoder.decode()); - - // Verify the five entries were correctly identified. - IconDirectoryEntry[] expectedEntries = { - new IconDirectoryEntry(16, 16, 0, 32, 1128, 39250, false), - new IconDirectoryEntry(24, 24, 0, 32, 2488, 37032, false), - new IconDirectoryEntry(32, 32, 0, 32, 4392, 32640, false), - new IconDirectoryEntry(48, 48, 0, 32, 9832, 22808, false), - new IconDirectoryEntry(256, 256, 0, 32, 22722, 86, true) - }; - - IconDirectoryEntry[] directory = decoder.getIconDirectory(); - fAssertTrue("Golem icon directory must contain at least one entry.", directory.length > 0); - for (int i = 0; i < directory.length; i++) { - if (expectedEntries[i].getWidth() > directory[directory.length - 1].getWidth()) { - // This test-case has been discarded due to being over-sized. - // All subsequent cases will be too. - fAssertTrue("At least one test-case should not have been discarded.", i > 0); - break; - } - - // Verify the actual Icon Directory entry was as expected. - fAssertEquals(directory[i] + " is expected to be equal to " + expectedEntries[i], - 0, directory[i].compareTo(expectedEntries[i])); - } - - // How many icon directory entries in the non-maimed favicon? - mGolemNumIconDirEntries = directory.length; - } - - /** - * Verify that deleting the header will make decoding fail. - */ - private void testMissingHeader() throws IOException { - byte[] icoBytes = readICO("microsoft_favicon.ico"); - fAssertEquals("Expecting Microsoft favicon to be 17174 bytes.", 17174, icoBytes.length); - - int offsetNoHeader = ICODecoder.ICO_HEADER_LENGTH_BYTES; - int lenNoHeader = icoBytes.length - ICODecoder.ICO_HEADER_LENGTH_BYTES; - ICODecoder decoder = new ICODecoder(getInstrumentation().getTargetContext(), icoBytes, - offsetNoHeader, lenNoHeader); - fAssertNull("Expecting Microsoft favicon to fail decoding.", decoder.decode()); - } - - /** - * Verify that decoding does not fail if the number of icon directory entries is smaller than - * the number given in the header. - */ - private void testCorruptIconDirectory() throws IOException { - byte[] icoBytes = readICO("golem_favicon.ico"); - fAssertEquals("Expecting Golem favicon to be 40648 bytes.", 40648, icoBytes.length); - - byte[] icoMaimed = new byte[icoBytes.length - ICODecoder.ICO_ICONDIRENTRY_LENGTH_BYTES]; - // Copy the header and first four icon directory entries into icoMaimed. - System.arraycopy(icoBytes, 0, icoMaimed, 0, - ICODecoder.ICO_HEADER_LENGTH_BYTES + 4 * ICODecoder.ICO_ICONDIRENTRY_LENGTH_BYTES); - // Skip the last icon directory entry. - System.arraycopy(icoBytes, - ICODecoder.ICO_HEADER_LENGTH_BYTES + 5 * ICODecoder.ICO_ICONDIRENTRY_LENGTH_BYTES, - icoMaimed, - ICODecoder.ICO_HEADER_LENGTH_BYTES + 4 * ICODecoder.ICO_ICONDIRENTRY_LENGTH_BYTES, - icoBytes.length - ICODecoder.ICO_HEADER_LENGTH_BYTES - 5 * ICODecoder.ICO_ICONDIRENTRY_LENGTH_BYTES); - - ICODecoder decoder = new ICODecoder(getInstrumentation().getTargetContext(), icoMaimed, 0, - icoMaimed.length); - fAssertNotNull("Expecting Golem favicon to not fail decoding.", decoder.decode()); - fAssertEquals("Expecting Golem favicon icon directory to contain one less bitmap.", - mGolemNumIconDirEntries - 1, decoder.getIconDirectory().length); - } - - private byte[] readICO(String fileName) throws IOException { - String filePath = "ico_decoder_favicons" + File.separator + fileName; - InputStream icoStream = getInstrumentation().getContext().getAssets().open(filePath); - ByteArrayOutputStream byteStream = new ByteArrayOutputStream(icoStream.available()); - - int readByte; - while ((readByte = icoStream.read()) != -1) { - byteStream.write(readByte); - } - - return byteStream.toByteArray(); - } -} - diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputConnection.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputConnection.java deleted file mode 100644 index f9a6bcef7..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputConnection.java +++ /dev/null @@ -1,349 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertEquals; -import static org.mozilla.gecko.tests.helpers.WaitHelper.waitFor; - -import org.mozilla.gecko.tests.components.GeckoViewComponent.InputConnectionTest; -import org.mozilla.gecko.tests.helpers.GeckoHelper; -import org.mozilla.gecko.tests.helpers.NavigationHelper; - -import com.robotium.solo.Condition; - -import android.view.KeyEvent; -import android.view.inputmethod.EditorInfo; -import android.view.inputmethod.InputConnection; - -/** - * Tests the proper operation of GeckoInputConnection - */ -public class testInputConnection extends JavascriptBridgeTest { - - private static final String INITIAL_TEXT = "foo"; - - public void testInputConnection() throws InterruptedException { - GeckoHelper.blockForReady(); - - final String url = mStringHelper.ROBOCOP_INPUT_URL; - NavigationHelper.enterAndLoadUrl(url); - mToolbar.assertTitle(url); - - // First run tests inside the normal input field. - getJS().syncCall("focus_input", INITIAL_TEXT); - mGeckoView.mTextInput - .waitForInputConnection() - .testInputConnection(new BasicInputConnectionTest()); - - // Then switch focus to the text area and rerun tests. - getJS().syncCall("focus_text_area", INITIAL_TEXT); - mGeckoView.mTextInput - .waitForInputConnection() - .testInputConnection(new BasicInputConnectionTest()); - - // Then switch focus to the content editable and rerun tests. - getJS().syncCall("focus_content_editable", INITIAL_TEXT); - mGeckoView.mTextInput - .waitForInputConnection() - .testInputConnection(new BasicInputConnectionTest()); - - // Then switch focus to the design mode document and rerun tests. - getJS().syncCall("focus_design_mode", INITIAL_TEXT); - mGeckoView.mTextInput - .waitForInputConnection() - .testInputConnection(new BasicInputConnectionTest()); - - // Then switch focus to the resetting input field, and run tests there. - getJS().syncCall("focus_resetting_input", ""); - mGeckoView.mTextInput - .waitForInputConnection() - .testInputConnection(new ResettingInputConnectionTest()); - - // Then switch focus to the hiding input field, and run tests there. - getJS().syncCall("focus_hiding_input", ""); - mGeckoView.mTextInput - .waitForInputConnection() - .testInputConnection(new HidingInputConnectionTest()); - - getJS().syncCall("finish_test"); - } - - private class BasicInputConnectionTest extends InputConnectionTest { - @Override - public void test(final InputConnection ic, EditorInfo info) { - waitFor("focus change", new Condition() { - @Override - public boolean isSatisfied() { - return INITIAL_TEXT.equals(getText(ic)); - } - }); - - // Test setSelection - ic.setSelection(0, 3); - assertSelection("Can set selection to range", ic, 0, 3); - ic.setSelection(-3, 6); - // Test both forms of assert - assertTextAndSelection("Can handle invalid range", ic, INITIAL_TEXT, 0, 3); - ic.setSelection(3, 3); - assertSelectionAt("Can collapse selection", ic, 3); - ic.setSelection(4, 4); - assertTextAndSelectionAt("Can handle invalid cursor", ic, INITIAL_TEXT, 3); - - // Test commitText - ic.commitText("", 10); // Selection past end of new text - assertTextAndSelectionAt("Can commit empty text", ic, "foo", 3); - ic.commitText("bar", 1); // Selection at end of new text - assertTextAndSelectionAt("Can commit text (select after)", ic, "foobar", 6); - ic.commitText("foo", -1); // Selection at start of new text - assertTextAndSelectionAt("Can commit text (select before)", ic, "foobarfoo", 5); - - // Test deleteSurroundingText - ic.deleteSurroundingText(1, 0); - assertTextAndSelectionAt("Can delete text before", ic, "foobrfoo", 4); - ic.deleteSurroundingText(1, 1); - assertTextAndSelectionAt("Can delete text before/after", ic, "foofoo", 3); - ic.deleteSurroundingText(0, 10); - assertTextAndSelectionAt("Can delete text after", ic, "foo", 3); - ic.deleteSurroundingText(0, 0); - assertTextAndSelectionAt("Can delete empty text", ic, "foo", 3); - - // Test setComposingText - ic.setComposingText("foo", 1); - assertTextAndSelectionAt("Can start composition", ic, "foofoo", 6); - ic.setComposingText("", 1); - assertTextAndSelectionAt("Can set empty composition", ic, "foo", 3); - ic.setComposingText("bar", 1); - assertTextAndSelectionAt("Can update composition", ic, "foobar", 6); - - // Test finishComposingText - ic.finishComposingText(); - assertTextAndSelectionAt("Can finish composition", ic, "foobar", 6); - - // Test setComposingRegion - ic.setComposingRegion(0, 3); - assertTextAndSelectionAt("Can set composing region", ic, "foobar", 6); - - ic.setComposingText("far", 1); - assertTextAndSelectionAt("Can set composing region text", ic, "farbar", 3); - - ic.setComposingRegion(1, 4); - assertTextAndSelectionAt("Can set existing composing region", ic, "farbar", 3); - - ic.setComposingText("rab", 3); - assertTextAndSelectionAt("Can set new composing region text", ic, "frabar", 6); - - // Test getTextBeforeCursor - fAssertEquals("Can retrieve text before cursor", "bar", ic.getTextBeforeCursor(3, 0)); - - // Test getTextAfterCursor - fAssertEquals("Can retrieve text after cursor", "", ic.getTextAfterCursor(3, 0)); - - ic.finishComposingText(); - assertTextAndSelectionAt("Can finish composition", ic, "frabar", 6); - - // Test sendKeyEvent - final KeyEvent shiftKey = new KeyEvent(KeyEvent.ACTION_DOWN, - KeyEvent.KEYCODE_SHIFT_LEFT); - final KeyEvent leftKey = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DPAD_LEFT); - final KeyEvent tKey = new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_T); - - ic.sendKeyEvent(shiftKey); - ic.sendKeyEvent(leftKey); - ic.sendKeyEvent(KeyEvent.changeAction(leftKey, KeyEvent.ACTION_UP)); - ic.sendKeyEvent(KeyEvent.changeAction(shiftKey, KeyEvent.ACTION_UP)); - assertTextAndSelection("Can select using key event", ic, "frabar", 6, 5); - - ic.sendKeyEvent(tKey); - ic.sendKeyEvent(KeyEvent.changeAction(tKey, KeyEvent.ACTION_UP)); - assertTextAndSelectionAt("Can type using event", ic, "frabat", 6); - - ic.deleteSurroundingText(6, 0); - assertTextAndSelectionAt("Can clear text", ic, "", 0); - - // Bug 1133802, duplication when setting the same composing text more than once. - ic.setComposingText("foo", 1); - assertTextAndSelectionAt("Can set the composing text", ic, "foo", 3); - ic.setComposingText("foo", 1); - assertTextAndSelectionAt("Can set the same composing text", ic, "foo", 3); - ic.setComposingText("bar", 1); - assertTextAndSelectionAt("Can set different composing text", ic, "bar", 3); - ic.setComposingText("bar", 1); - assertTextAndSelectionAt("Can set the same composing text", ic, "bar", 3); - ic.setComposingText("bar", 1); - assertTextAndSelectionAt("Can set the same composing text again", ic, "bar", 3); - ic.finishComposingText(); - assertTextAndSelectionAt("Can finish composing text", ic, "bar", 3); - - ic.deleteSurroundingText(3, 0); - assertTextAndSelectionAt("Can clear text", ic, "", 0); - - // Bug 1209465, cannot enter ideographic space character by itself (U+3000). - ic.commitText("\u3000", 1); - assertTextAndSelectionAt("Can commit ideographic space", ic, "\u3000", 1); - - ic.deleteSurroundingText(1, 0); - assertTextAndSelectionAt("Can clear text", ic, "", 0); - - // Bug 1051556, exception due to committing text changes during flushing. - ic.setComposingText("bad", 1); - assertTextAndSelectionAt("Can set the composing text", ic, "bad", 3); - getJS().asyncCall("test_reflush_changes"); - // Wait for text change notifications to come in. - processGeckoEvents(); - assertTextAndSelectionAt("Can re-flush text changes", ic, "good", 4); - ic.setComposingText("done", 1); - assertTextAndSelectionAt("Can update composition after re-flushing", ic, "gooddone", 8); - ic.finishComposingText(); - assertTextAndSelectionAt("Can finish composing text", ic, "gooddone", 8); - - ic.deleteSurroundingText(8, 0); - assertTextAndSelectionAt("Can clear text", ic, "", 0); - - // Bug 1241558 - wrong selection due to ignoring selection notification. - ic.setComposingText("foobar", 1); - assertTextAndSelectionAt("Can set the composing text", ic, "foobar", 6); - getJS().asyncCall("test_set_selection"); - // Wait for text change notifications to come in. - processGeckoEvents(); - assertTextAndSelectionAt("Can select after committing", ic, "foobar", 3); - ic.setComposingText("barfoo", 1); - assertTextAndSelectionAt("Can compose after selecting", ic, "barfoo", 6); - ic.beginBatchEdit(); - ic.setSelection(3, 3); - ic.finishComposingText(); - ic.deleteSurroundingText(1, 1); - ic.endBatchEdit(); - assertTextAndSelectionAt("Can delete after committing", ic, "baoo", 2); - - ic.deleteSurroundingText(2, 2); - assertTextAndSelectionAt("Can clear text", ic, "", 0); - - // Bug 1275371 - shift+backspace should not forward delete on Android. - final KeyEvent delKey = new KeyEvent(KeyEvent.ACTION_DOWN, - KeyEvent.KEYCODE_DEL); - - ic.beginBatchEdit(); - ic.commitText("foo", 1); - ic.setSelection(1, 1); - ic.endBatchEdit(); - assertTextAndSelectionAt("Can commit text", ic, "foo", 1); - - ic.sendKeyEvent(shiftKey); - ic.sendKeyEvent(delKey); - ic.sendKeyEvent(KeyEvent.changeAction(delKey, KeyEvent.ACTION_UP)); - assertTextAndSelectionAt("Can backspace with shift+backspace", ic, "oo", 0); - - ic.sendKeyEvent(delKey); - ic.sendKeyEvent(KeyEvent.changeAction(delKey, KeyEvent.ACTION_UP)); - ic.sendKeyEvent(KeyEvent.changeAction(shiftKey, KeyEvent.ACTION_UP)); - assertTextAndSelectionAt("Cannot forward delete with shift+backspace", ic, "oo", 0); - - ic.deleteSurroundingText(0, 2); - assertTextAndSelectionAt("Can clear text", ic, "", 0); - - // Bug 1123514 - exception due to incorrect text replacement offsets. - getJS().syncCall("test_bug1123514"); - // Gecko will change text to 'abc' when we input 'b', potentially causing - // incorrect calculation of text replacement offsets. - ic.commitText("b", 1); - // We don't assert text here because this test only works for input/textarea, - // so an assertion would fail for contentEditable/designMode. - processGeckoEvents(); - processInputConnectionEvents(); - - ic.deleteSurroundingText(2, 1); - assertTextAndSelectionAt("Can clear text", ic, "", 0); - - // Make sure we don't leave behind stale events for the following test. - processGeckoEvents(); - processInputConnectionEvents(); - } - } - - /** - * ResettingInputConnectionTest performs tests on the resetting input in - * robocop_input.html. Any test that uses the normal input should be put in - * BasicInputConnectionTest. - */ - private class ResettingInputConnectionTest extends InputConnectionTest { - @Override - public void test(final InputConnection ic, EditorInfo info) { - waitFor("focus change", new Condition() { - @Override - public boolean isSatisfied() { - return "".equals(getText(ic)); - } - }); - - // Bug 1199658, duplication when page has JS that resets input field value. - - ic.commitText("foo", 1); - assertTextAndSelectionAt("Can commit text (resetting)", ic, "foo", 3); - - ic.setComposingRegion(0, 3); - // The bug appears after composition update events are processed. We only - // issue these events after some back-and-forth calls between the Gecko thread - // and the input connection thread. Therefore, to ensure these events are - // issued and to ensure the bug appears, we have to process all Gecko events, - // then all input connection events, and finally all Gecko events again. - processGeckoEvents(); - processInputConnectionEvents(); - processGeckoEvents(); - assertTextAndSelectionAt("Can set composing region (resetting)", ic, "foo", 3); - - ic.setComposingText("foobar", 1); - processGeckoEvents(); - processInputConnectionEvents(); - processGeckoEvents(); - assertTextAndSelectionAt("Can change composing text (resetting)", ic, "foobar", 6); - - ic.setComposingText("baz", 1); - processGeckoEvents(); - processInputConnectionEvents(); - processGeckoEvents(); - assertTextAndSelectionAt("Can reset composing text (resetting)", ic, "baz", 3); - - ic.finishComposingText(); - assertTextAndSelectionAt("Can finish composing text (resetting)", ic, "baz", 3); - - ic.deleteSurroundingText(3, 0); - assertTextAndSelectionAt("Can clear text", ic, "", 0); - - // Make sure we don't leave behind stale events for the following test. - processGeckoEvents(); - processInputConnectionEvents(); - } - } - - /** - * HidingInputConnectionTest performs tests on the hiding input in - * robocop_input.html. Any test that uses the normal input should be put in - * BasicInputConnectionTest. - */ - private class HidingInputConnectionTest extends InputConnectionTest { - @Override - public void test(final InputConnection ic, EditorInfo info) { - waitFor("focus change", new Condition() { - @Override - public boolean isSatisfied() { - return "".equals(getText(ic)); - } - }); - - // Bug 1254629, crash when hiding input during input. - ic.commitText("foo", 1); - assertTextAndSelectionAt("Can commit text (hiding)", ic, "foo", 3); - - ic.commitText("!", 1); - // The '!' key causes the input to hide in robocop_input.html, - // and there won't be a text/selection update as a result. - assertTextAndSelectionAt("Can handle hiding input", ic, "foo", 3); - - // Make sure we don't leave behind stale events for the following test. - processGeckoEvents(); - processInputConnectionEvents(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputUrlBar.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputUrlBar.java deleted file mode 100644 index c12ccef98..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testInputUrlBar.java +++ /dev/null @@ -1,136 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Element; -import org.mozilla.gecko.R; - -import android.widget.EditText; - -/** - * Basic test of text editing within the editing mode. - * - Enter some text, move the cursor around, and modifying some text. - * - Check that all edit entry text is selected after switching about:home tabs. - */ -public final class testInputUrlBar extends BaseTest { - private Element mUrlBarEditElement; - private EditText mUrlBarEditView; - - public void testInputUrlBar() { - blockForGeckoReady(); - - startEditingMode(); - assertUrlBarText(""); - - // Avoid any auto domain completion by using a prefix that matches - // nothing, including about: pages - mActions.sendKeys("zy"); - assertUrlBarText("zy"); - - mActions.sendKeys("cd"); - assertUrlBarText("zycd"); - - mActions.sendSpecialKey(Actions.SpecialKey.LEFT); - mActions.sendSpecialKey(Actions.SpecialKey.LEFT); - - // Inserting "" should not do anything. - mActions.sendKeys(""); - assertUrlBarText("zycd"); - - mActions.sendKeys("ef"); - assertUrlBarText("zyefcd"); - - mActions.sendSpecialKey(Actions.SpecialKey.RIGHT); - mActions.sendKeys("gh"); - assertUrlBarText("zyefcghd"); - - final EditText editText = mUrlBarEditView; - runOnUiThreadSync(new Runnable() { - @Override - public void run() { - // Select "ef" - editText.setSelection(2); - } - }); - mActions.sendKeys("op"); - assertUrlBarText("zyopefcghd"); - - runOnUiThreadSync(new Runnable() { - @Override - public void run() { - // Select "cg" - editText.setSelection(6, 8); - } - }); - mActions.sendKeys("qr"); - assertUrlBarText("zyopefqrhd"); - - runOnUiThreadSync(new Runnable() { - @Override - public void run() { - // Select "op" - editText.setSelection(4,2); - } - }); - mActions.sendKeys("st"); - assertUrlBarText("zystefqrhd"); - - runOnUiThreadSync(new Runnable() { - @Override - public void run() { - editText.selectAll(); - } - }); - mActions.sendKeys("uv"); - assertUrlBarText("uv"); - - // Dismiss the VKB - mSolo.goBack(); - - // Dismiss editing mode - mSolo.goBack(); - - waitForText(mStringHelper.TITLE_PLACE_HOLDER); - - // URL bar should have forgotten about "uv" text. - startEditingMode(); - assertUrlBarText(""); - - int width = mDriver.getGeckoWidth() / 2; - int y = mDriver.getGeckoHeight() / 2; - - // Slide to the right, force URL bar entry to lose input focus - mActions.drag(width, 0, y, y); - - // Select text and replace the content - mSolo.clickOnView(mUrlBarEditView); - mActions.sendKeys("yz"); - - String yz = getUrlBarText(); - mAsserter.ok("yz".equals(yz), "Is the URL bar text \"yz\"?", yz); - } - - private void startEditingMode() { - focusUrlBar(); - - mUrlBarEditElement = mDriver.findElement(getActivity(), R.id.url_edit_text); - final int id = mUrlBarEditElement.getId(); - mUrlBarEditView = (EditText) getActivity().findViewById(id); - } - - private String getUrlBarText() { - final String elementText = mUrlBarEditElement.getText(); - final String editText = mUrlBarEditView.getText().toString(); - mAsserter.is(editText, elementText, "Does URL bar editText == elementText?"); - - return editText; - } - - private void assertUrlBarText(String expectedText) { - String actualText = getUrlBarText(); - mAsserter.is(actualText, expectedText, "Does URL bar actualText == expectedText?"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJarReader.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJarReader.java deleted file mode 100644 index 9310599d3..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJarReader.java +++ /dev/null @@ -1,70 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.InputStream; - -import org.mozilla.gecko.AppConstants; -import org.mozilla.gecko.util.GeckoJarReader; - -import android.content.Context; - -/** - * A basic jar reader test. Tests reading a png from fennec's apk, as well - * as loading some invalid jar urls. - */ -public class testJarReader extends BaseTest { - public void testJarReader() { - // Invalid characters are escaped. - final String s = GeckoJarReader.computeJarURI("some[1].apk", "something/else"); - mAsserter.ok(!s.contains("["), "Illegal characters are escaped away.", null); - mAsserter.ok(!s.toLowerCase().contains("%2f"), "Path characters aren't escaped.", null); - - final Context context = getInstrumentation().getTargetContext().getApplicationContext(); - String appPath = getActivity().getApplication().getPackageResourcePath(); - mAsserter.isnot(appPath, null, "getPackageResourcePath is non-null"); - - // Test reading a file from a jar url that looks correct. - String url = "jar:file://" + appPath + "!/" + AppConstants.OMNIJAR_NAME; - InputStream stream = GeckoJarReader.getStream(context, "jar:" + url + "!/chrome/chrome/content/branding/favicon32.png"); - mAsserter.isnot(stream, null, "JarReader returned non-null for valid file in valid jar"); - - // Test looking for an non-existent file in a jar. - url = "jar:file://" + appPath + "!/" + AppConstants.OMNIJAR_NAME; - stream = GeckoJarReader.getStream(context, "jar:" + url + "!/chrome/chrome/content/branding/nonexistent_file.png"); - mAsserter.is(stream, null, "JarReader returned null for non-existent file in valid jar"); - - // Test looking for a file that doesn't exist in the APK. - url = "jar:file://" + appPath + "!/" + "BAD" + AppConstants.OMNIJAR_NAME; - stream = GeckoJarReader.getStream(context, "jar:" + url + "!/chrome/chrome/content/branding/favicon32.png"); - mAsserter.is(stream, null, "JarReader returned null for valid file in invalid jar file"); - - // Test looking for a file that doesn't exist in the APK. - // Bug 1174922, prefixed string / length error. - url = "jar:file://" + appPath + "!/" + AppConstants.OMNIJAR_NAME + "BAD"; - stream = GeckoJarReader.getStream(context, "jar:" + url + "!/chrome/chrome/content/branding/favicon32.png"); - mAsserter.is(stream, null, "JarReader returned null for valid file in other invalid jar file"); - - // Test looking for an jar with an invalid url. - url = "jar:file://" + appPath + "!" + "!/" + AppConstants.OMNIJAR_NAME; - stream = GeckoJarReader.getStream(context, "jar:" + url + "!/chrome/chrome/content/branding/nonexistent_file.png"); - mAsserter.is(stream, null, "JarReader returned null for bad jar url"); - - // Test looking for a file that doesn't exist on disk. - url = "jar:file://" + appPath + "BAD" + "!/" + AppConstants.OMNIJAR_NAME; - stream = GeckoJarReader.getStream(context, "jar:" + url + "!/chrome/chrome/content/branding/favicon32.png"); - mAsserter.is(stream, null, "JarReader returned null for a non-existent APK"); - - // This test completes very quickly. If it completes too soon, the - // minidumps directory may not be created before the process is - // taken down, causing bug 722166. - blockForGeckoReady(); - } - - private String getData(InputStream stream) { - return new java.util.Scanner(stream).useDelimiter("\\A").next(); - } - -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJavascriptBridge.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJavascriptBridge.java deleted file mode 100644 index 724b6b4ab..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testJavascriptBridge.java +++ /dev/null @@ -1,69 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.*; - -import org.json.JSONException; -import org.json.JSONObject; - -/** - * Tests the proper operation of JavascriptBridge and JavaBridge, - * which are used by tests for communication between Java and JS. - */ -public class testJavascriptBridge extends JavascriptBridgeTest { - - private static final String TEST_JS = "testJavascriptBridge.js"; - - private boolean syncCallReceived; - - public void testJavascriptBridge() { - blockForReadyAndLoadJS(TEST_JS); - getJS().syncCall("check_js_int_arg", 1); - } - - public void checkJavaIntArg(final int int2) { - // Async call from JS - fAssertEquals("Integer argument matches", 2, int2); - getJS().syncCall("check_js_double_arg", 3.0D); - } - - public void checkJavaDoubleArg(final double double4) { - // Async call from JS - fAssertEquals("Double argument matches", 4.0, double4); - getJS().syncCall("check_js_boolean_arg", false); - } - - public void checkJavaBooleanArg(final boolean booltrue) { - // Async call from JS - fAssertEquals("Boolean argument matches", true, booltrue); - getJS().syncCall("check_js_string_arg", "foo"); - } - - public void checkJavaStringArg(final String stringbar) throws JSONException { - // Async call from JS - fAssertEquals("String argument matches", "bar", stringbar); - final JSONObject obj = new JSONObject(); - obj.put("caller", "java"); - getJS().syncCall("check_js_object_arg", (JSONObject) obj); - } - - public void checkJavaObjectArg(final JSONObject obj) throws JSONException { - // Async call from JS - fAssertEquals("Object argument matches", "js", obj.getString("caller")); - getJS().syncCall("check_js_sync_call"); - } - - public void doJSSyncCall() { - // Sync call from JS - syncCallReceived = true; - getJS().asyncCall("respond_to_js_sync_call"); - } - - public void checkJSSyncCallReceived() { - fAssertTrue("Received sync call before end of test", syncCallReceived); - // End of test - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLinkContextMenu.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLinkContextMenu.java deleted file mode 100644 index 556ed0e07..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLinkContextMenu.java +++ /dev/null @@ -1,37 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -public class testLinkContextMenu extends ContentContextMenuTest { - - // Test website strings - private static String LINK_PAGE_URL; - private static String BLANK_PAGE_URL; - private static final String LINK_PAGE_TITLE = "Big Link"; - - public void testLinkContextMenu() { - final String linkMenuItems [] = mStringHelper.CONTEXT_MENU_ITEMS_IN_NORMAL_TAB; - - blockForGeckoReady(); - - LINK_PAGE_URL=getAbsoluteUrl(mStringHelper.ROBOCOP_BIG_LINK_URL); - BLANK_PAGE_URL=getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - loadUrlAndWait(LINK_PAGE_URL); - waitForText(LINK_PAGE_TITLE); - - verifyContextMenuItems(linkMenuItems); // Verify context menu items are correct - openTabFromContextMenu(linkMenuItems[0],2); // Test the "Open in New Tab" option - expecting 2 tabs: the original and the new one - openTabFromContextMenu(linkMenuItems[1],2); // Test the "Open in Private Tab" option - expecting only 2 tabs in normal mode - verifyCopyOption(linkMenuItems[2], BLANK_PAGE_URL); // Test the "Copy Link" option - verifyShareOption(linkMenuItems[3], LINK_PAGE_TITLE); // Test the "Share Link" option - verifyBookmarkLinkOption(linkMenuItems[4], BLANK_PAGE_URL); // Test the "Bookmark Link" option - } - - @Override - public void tearDown() throws Exception { - mDatabaseHelper.deleteBookmark(BLANK_PAGE_URL); - super.tearDown(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLoad.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLoad.java deleted file mode 100644 index e62bd7899..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLoad.java +++ /dev/null @@ -1,23 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -/** - * A basic page load test. - * - loads a page - * - verifies it rendered properly - * - verifies the displayed url is correct - */ -public class testLoad extends PixelTest { - public void testLoad() { - String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL); - - blockForGeckoReady(); - - loadAndVerifyBoxes(url); - - verifyUrl(url); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLoginsProvider.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLoginsProvider.java deleted file mode 100644 index 10dde28cd..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testLoginsProvider.java +++ /dev/null @@ -1,387 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.content.ContentProvider; -import android.content.ContentUris; -import android.content.ContentValues; -import android.database.Cursor; -import android.database.sqlite.SQLiteDatabase; -import android.net.Uri; - -import org.mozilla.gecko.db.BrowserContract; -import org.mozilla.gecko.db.BrowserContract.DeletedLogins; -import org.mozilla.gecko.db.BrowserContract.Logins; -import org.mozilla.gecko.db.BrowserContract.LoginsDisabledHosts; -import org.mozilla.gecko.db.LoginsProvider; - -import java.util.concurrent.Callable; - -import static org.mozilla.gecko.db.BrowserContract.CommonColumns._ID; -import static org.mozilla.gecko.db.BrowserContract.DeletedLogins.TABLE_DELETED_LOGINS; -import static org.mozilla.gecko.db.BrowserContract.Logins.TABLE_LOGINS; -import static org.mozilla.gecko.db.BrowserContract.LoginsDisabledHosts.TABLE_DISABLED_HOSTS; - -public class testLoginsProvider extends ContentProviderTest { - - private static final String DB_NAME = "browser.db"; - - private final TestCase[] TESTS_TO_RUN = { - new InsertLoginsTest(), - new UpdateLoginsTest(), - new DeleteLoginsTest(), - new InsertDeletedLoginsTest(), - new InsertDeletedLoginsFailureTest(), - new DisabledHostsInsertTest(), - new DisabledHostsInsertFailureTest(), - new InsertLoginsWithDefaultValuesTest(), - new InsertLoginsWithDuplicateGuidFailureTest(), - new DeleteLoginsByNonExistentGuidTest(), - }; - - /** - * Factory function that makes new LoginsProvider instances. - *

          - * We want a fresh provider each test, so this should be invoked in - * setUp before each individual test. - */ - private static final Callable sProviderFactory = new Callable() { - @Override - public ContentProvider call() { - return new LoginsProvider(); - } - }; - - @Override - public void setUp() throws Exception { - super.setUp(sProviderFactory, BrowserContract.LOGINS_AUTHORITY, DB_NAME); - for (TestCase test: TESTS_TO_RUN) { - mTests.add(test); - } - } - - public void testLoginProviderTests() throws Exception { - for (Runnable test : mTests) { - final String testName = test.getClass().getSimpleName(); - setTestName(testName); - ensureEmptyDatabase(); - mAsserter.dumpLog("testLoginsProvider: Database empty - Starting " + testName + "."); - test.run(); - } - } - - /** - * Wipe DB. - */ - private void ensureEmptyDatabase() { - getWritableDatabase(Logins.CONTENT_URI).delete(TABLE_LOGINS, null, null); - getWritableDatabase(DeletedLogins.CONTENT_URI).delete(TABLE_DELETED_LOGINS, null, null); - getWritableDatabase(LoginsDisabledHosts.CONTENT_URI).delete(TABLE_DISABLED_HOSTS, null, null); - } - - private SQLiteDatabase getWritableDatabase(Uri uri) { - Uri testUri = appendUriParam(uri, BrowserContract.PARAM_IS_TEST, "1"); - DelegatingTestContentProvider delegateProvider = (DelegatingTestContentProvider) mProvider; - LoginsProvider loginsProvider = (LoginsProvider) delegateProvider.getTargetProvider(); - return loginsProvider.getWritableDatabaseForTesting(testUri); - } - - /** - * LoginsProvider insert logins test. - */ - private class InsertLoginsTest extends TestCase { - @Override - public void test() throws Exception { - ContentValues contentValues = createLogin("http://www.example.com", "http://www.example.com", - "http://www.example.com", "username1", "password1", "username1", "password1", "guid1"); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.Logins.CONTENT_URI, contentValues)); - verifyLoginExists(contentValues, id); - Cursor cursor = mProvider.query(Logins.CONTENT_URI, null, Logins.GUID + " = ?", new String[] { "guid1" }, null); - verifyRowMatches(contentValues, cursor, "logins found"); - - // Empty ("") encrypted username and password are valid. - contentValues = createLogin("http://www.example.com", "http://www.example.com", - "http://www.example.com", "username1", "password1", "", "", "guid2"); - id = ContentUris.parseId(mProvider.insert(BrowserContract.Logins.CONTENT_URI, contentValues)); - verifyLoginExists(contentValues, id); - cursor = mProvider.query(Logins.CONTENT_URI, null, Logins.GUID + " = ?", new String[] { "guid2" }, null); - verifyRowMatches(contentValues, cursor, "logins found"); - } - } - - /** - * LoginsProvider updates logins test. - */ - private class UpdateLoginsTest extends TestCase { - @Override - public void test() throws Exception { - final String guid1 = "guid1"; - ContentValues contentValues = createLogin("http://www.example.com", "http://www.example.com", - "http://www.example.com", "username1", "password1", "username1", "password1", guid1); - long timeBeforeCreated = System.currentTimeMillis(); - long id = ContentUris.parseId(mProvider.insert(BrowserContract.Logins.CONTENT_URI, contentValues)); - long timeAfterCreated = System.currentTimeMillis(); - verifyLoginExists(contentValues, id); - - Cursor cursor = getLoginById(id); - try { - mAsserter.ok(cursor.moveToFirst(), "cursor is not empty", ""); - verifyBounded(timeBeforeCreated, cursor.getLong(cursor.getColumnIndexOrThrow(Logins.TIME_CREATED)), timeAfterCreated); - } finally { - cursor.close(); - } - - contentValues.put(BrowserContract.Logins.ENCRYPTED_USERNAME, "username2"); - contentValues.put(Logins.ENCRYPTED_PASSWORD, "password2"); - - Uri updateUri = Logins.CONTENT_URI.buildUpon().appendPath(String.valueOf(id)).build(); - int numUpdated = mProvider.update(updateUri, contentValues, null, null); - mAsserter.is(1, numUpdated, "Correct number updated"); - verifyLoginExists(contentValues, id); - - contentValues.put(BrowserContract.Logins.ENCRYPTED_USERNAME, "username1"); - contentValues.put(Logins.ENCRYPTED_PASSWORD, "password1"); - - updateUri = Logins.CONTENT_URI; - numUpdated = mProvider.update(updateUri, contentValues, Logins.GUID + " = ?", new String[]{guid1}); - mAsserter.is(1, numUpdated, "Correct number updated"); - verifyLoginExists(contentValues, id); - } - } - - /** - * LoginsProvider deletion logins test. - * - inserts a new logins - * - deletes the logins and verify deleted-logins table has entry for deleted guid. - */ - private class DeleteLoginsTest extends TestCase { - @Override - public void test() throws Exception { - final String guid1 = "guid1"; - ContentValues contentValues = createLogin("http://www.example.com", "http://www.example.com", - "http://www.example.com", "username1", "password1", "username1", "password1", guid1); - long id = ContentUris.parseId(mProvider.insert(Logins.CONTENT_URI, contentValues)); - verifyLoginExists(contentValues, id); - - Uri deletedUri = Logins.CONTENT_URI.buildUpon().appendPath(String.valueOf(id)).build(); - int numDeleted = mProvider.delete(deletedUri, null, null); - mAsserter.is(1, numDeleted, "Correct number deleted"); - verifyNoRowExists(Logins.CONTENT_URI, "No login entry found"); - - contentValues = new ContentValues(); - contentValues.put(DeletedLogins.GUID, guid1); - Cursor cursor = mProvider.query(DeletedLogins.CONTENT_URI, null, null, null, null); - verifyRowMatches(contentValues, cursor, "deleted-login found"); - cursor = mProvider.query(DeletedLogins.CONTENT_URI, null, DeletedLogins.GUID + " = ?", new String[] { guid1 }, null); - verifyRowMatches(contentValues, cursor, "deleted-login found"); - } - } - - /** - * LoginsProvider re-insert logins test. - * - inserts a row into deleted-logins - * - insert the same login (matching guid) and verify deleted-logins table is empty. - */ - private class InsertDeletedLoginsTest extends TestCase { - @Override - public void test() throws Exception { - ContentValues contentValues = new ContentValues(); - contentValues.put(DeletedLogins.GUID, "guid1"); - long id = ContentUris.parseId(mProvider.insert(DeletedLogins.CONTENT_URI, contentValues)); - final Uri insertedUri = DeletedLogins.CONTENT_URI.buildUpon().appendPath(String.valueOf(id)).build(); - Cursor cursor = mProvider.query(insertedUri, null, null, null, null); - verifyRowMatches(contentValues, cursor, "deleted-login found"); - verifyNoRowExists(BrowserContract.Logins.CONTENT_URI, "No login entry found"); - - contentValues = createLogin("http://www.example.com", "http://www.example.com", - "http://www.example.com", "username1", "password1", "username1", "password1", "guid1"); - id = ContentUris.parseId(mProvider.insert(Logins.CONTENT_URI, contentValues)); - verifyLoginExists(contentValues, id); - verifyNoRowExists(DeletedLogins.CONTENT_URI, "No deleted-login entry found"); - } - } - - /** - * LoginsProvider insert Deleted logins test. - * - inserts a row into deleted-login without GUID. - */ - private class InsertDeletedLoginsFailureTest extends TestCase { - @Override - public void test() throws Exception { - ContentValues contentValues = new ContentValues(); - try { - mProvider.insert(DeletedLogins.CONTENT_URI, contentValues); - fail("Failed to throw IllegalArgumentException while missing GUID"); - } catch (Exception e) { - mAsserter.is(e.getClass(), IllegalArgumentException.class, "IllegalArgumentException thrown for invalid GUID"); - } - } - } - - /** - * LoginsProvider disabled host test. - * - inserts a disabled-host - * - delete the inserted disabled-host and verify disabled-hosts table is empty. - */ - private class DisabledHostsInsertTest extends TestCase { - @Override - public void test() throws Exception { - final String hostname = "localhost"; - final ContentValues contentValues = new ContentValues(); - contentValues.put(LoginsDisabledHosts.HOSTNAME, hostname); - mProvider.insert(LoginsDisabledHosts.CONTENT_URI, contentValues); - final Uri insertedUri = LoginsDisabledHosts.CONTENT_URI.buildUpon().appendPath("hostname").appendPath(hostname).build(); - final Cursor cursor = mProvider.query(insertedUri, null, null, null, null); - verifyRowMatches(contentValues, cursor, "disabled-hosts found"); - - final Uri deletedUri = LoginsDisabledHosts.CONTENT_URI.buildUpon().appendPath("hostname").appendPath(hostname).build(); - final int numDeleted = mProvider.delete(deletedUri, null, null); - mAsserter.is(1, numDeleted, "Correct number deleted"); - verifyNoRowExists(LoginsDisabledHosts.CONTENT_URI, "No disabled-hosts entry found"); - } - } - - /** - * LoginsProvider disabled host insert failure testcase. - * - inserts a disabled-host without providing hostname - */ - private class DisabledHostsInsertFailureTest extends TestCase { - @Override - public void test() throws Exception { - final String hostname = "localhost"; - final ContentValues contentValues = new ContentValues(); - try { - mProvider.insert(LoginsDisabledHosts.CONTENT_URI, contentValues); - fail("Failed to throw IllegalArgumentException while missing hostname"); - } catch (Exception e) { - mAsserter.is(e.getClass(), IllegalArgumentException.class, "IllegalArgumentException thrown for invalid hostname"); - } - } - } - - /** - * LoginsProvider login insertion with default values test. - * - insert a login missing GUID, FORM_SUBMIT_URL, HTTP_REALM and verify default values are set. - */ - private class InsertLoginsWithDefaultValuesTest extends TestCase { - @Override - protected void test() throws Exception { - ContentValues contentValues = createLogin("http://www.example.com", "http://www.example.com", - "http://www.example.com", "username1", "password1", "username1", "password1", null); - // Remove GUID, HTTP_REALM, FORM_SUBMIT_URL from content values - contentValues.remove(Logins.GUID); - contentValues.remove(Logins.FORM_SUBMIT_URL); - contentValues.remove(Logins.HTTP_REALM); - - long id = ContentUris.parseId(mProvider.insert(BrowserContract.Logins.CONTENT_URI, contentValues)); - Cursor cursor = getLoginById(id); - assertNotNull(cursor); - cursor.moveToFirst(); - - mAsserter.isnot(cursor.getString(cursor.getColumnIndex(Logins.GUID)), null, "GUID is not null"); - mAsserter.is(cursor.getString(cursor.getColumnIndex(Logins.HTTP_REALM)), null, "HTTP_REALM is not null"); - mAsserter.is(cursor.getString(cursor.getColumnIndex(Logins.FORM_SUBMIT_URL)), null, "FORM_SUBMIT_URL is not null"); - mAsserter.isnot(cursor.getString(cursor.getColumnIndex(Logins.TIME_LAST_USED)), null, "TIME_LAST_USED is not null"); - mAsserter.isnot(cursor.getString(cursor.getColumnIndex(Logins.TIME_CREATED)), null, "TIME_CREATED is not null"); - mAsserter.isnot(cursor.getString(cursor.getColumnIndex(Logins.TIME_PASSWORD_CHANGED)), null, "TIME_PASSWORD_CHANGED is not null"); - mAsserter.is(cursor.getString(cursor.getColumnIndex(Logins.ENC_TYPE)), "0", "ENC_TYPE is 0"); - mAsserter.is(cursor.getString(cursor.getColumnIndex(Logins.TIMES_USED)), "0", "TIMES_USED is 0"); - - // Verify other values. - verifyRowMatches(contentValues, cursor, "Updated login found"); - } - } - - /** - * LoginsProvider login insertion with duplicate GUID test. - * - insert two different logins with same GUID and verify that only one login exists. - */ - private class InsertLoginsWithDuplicateGuidFailureTest extends TestCase { - @Override - protected void test() throws Exception { - final String guid = "guid1"; - ContentValues contentValues = createLogin("http://www.example.com", "http://www.example.com", - "http://www.example.com", "username1", "password1", "username1", "password1", guid); - long id1 = ContentUris.parseId(mProvider.insert(BrowserContract.Logins.CONTENT_URI, contentValues)); - verifyLoginExists(contentValues, id1); - - // Insert another login with duplicate GUID. - contentValues = createLogin("http://www.example2.com", "http://www.example2.com", - "http://www.example2.com", "username2", "password2", "username2", "password2", guid); - Uri insertUri = mProvider.insert(Logins.CONTENT_URI, contentValues); - mAsserter.is(insertUri, null, "Duplicate Guid insertion id1"); - - // Verify login with id1 still exists. - verifyLoginExists(contentValues, id1); - } - } - - /** - * LoginsProvider deletion by non-existent GUID test. - * - delete a login with random GUID and verify that no entry was deleted. - */ - private class DeleteLoginsByNonExistentGuidTest extends TestCase { - @Override - protected void test() throws Exception { - Uri deletedUri = Logins.CONTENT_URI; - int numDeleted = mProvider.delete(deletedUri, Logins.GUID + "= ?", new String[] { "guid1" }); - mAsserter.is(0, numDeleted, "Correct number deleted"); - } - } - - private void verifyBounded(long left, long middle, long right) { - mAsserter.ok(left <= middle, "Left <= middle", left + " <= " + middle); - mAsserter.ok(middle <= right, "Middle <= right", middle + " <= " + right); - } - - private Cursor getById(Uri uri, long id, String[] projection) { - return mProvider.query(uri, projection, - _ID + " = ?", - new String[] { String.valueOf(id) }, - null); - } - - private Cursor getLoginById(long id) { - return getById(Logins.CONTENT_URI, id, null); - } - - private void verifyLoginExists(ContentValues contentValues, long id) { - Cursor cursor = getLoginById(id); - verifyRowMatches(contentValues, cursor, "Updated login found"); - } - - private void verifyRowMatches(ContentValues contentValues, Cursor cursor, String name) { - try { - mAsserter.ok(cursor.moveToFirst(), name, "cursor is not empty"); - CursorMatches(cursor, contentValues); - } finally { - cursor.close(); - } - } - - private void verifyNoRowExists(Uri contentUri, String name) { - Cursor cursor = mProvider.query(contentUri, null, null, null, null); - try { - mAsserter.is(0, cursor.getCount(), name); - } finally { - cursor.close(); - } - } - - private ContentValues createLogin(String hostname, String httpRealm, String formSubmitUrl, - String usernameField, String passwordField, String encryptedUsername, - String encryptedPassword, String guid) { - final ContentValues values = new ContentValues(); - values.put(Logins.HOSTNAME, hostname); - values.put(Logins.HTTP_REALM, httpRealm); - values.put(Logins.FORM_SUBMIT_URL, formSubmitUrl); - values.put(Logins.USERNAME_FIELD, usernameField); - values.put(Logins.PASSWORD_FIELD, passwordField); - values.put(Logins.ENCRYPTED_USERNAME, encryptedUsername); - values.put(Logins.ENCRYPTED_PASSWORD, encryptedPassword); - values.put(Logins.GUID, guid); - return values; - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testMailToContextMenu.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testMailToContextMenu.java deleted file mode 100644 index af674f441..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testMailToContextMenu.java +++ /dev/null @@ -1,26 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -public class testMailToContextMenu extends ContentContextMenuTest { - - // Test website strings - private static String MAILTO_PAGE_URL; - private static final String mailtoMenuItems [] = {"Copy Email Address", "Share Email Address"}; - - public void testMailToContextMenu() { - final String MAILTO_PAGE_TITLE = mStringHelper.ROBOCOP_BIG_MAILTO_TITLE; - - blockForGeckoReady(); - - MAILTO_PAGE_URL=getAbsoluteUrl(mStringHelper.ROBOCOP_BIG_MAILTO_URL); - loadUrlAndWait(MAILTO_PAGE_URL); - waitForText(MAILTO_PAGE_TITLE); - - verifyContextMenuItems(mailtoMenuItems); - verifyCopyOption(mailtoMenuItems[0], "foo.bar@example.com"); // Test the "Copy Email Address" option - verifyShareOption(mailtoMenuItems[1], MAILTO_PAGE_TITLE); // Test the "Share Email Address" option - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNativeCrypto.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNativeCrypto.java deleted file mode 100644 index 2ae2bb532..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNativeCrypto.java +++ /dev/null @@ -1,288 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertArrayEquals; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertEquals; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotNull; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fFail; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.security.GeneralSecurityException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; - -import org.mozilla.gecko.background.nativecode.NativeCrypto; -import org.mozilla.gecko.sync.Utils; -import org.mozilla.gecko.tests.helpers.GeckoHelper; - -import android.os.SystemClock; - -/** - * Tests the Java wrapper over native implementations of crypto code. Test vectors from: - * * PBKDF2SHA256: - * - - - - * SHA-1: - - - */ -public class testNativeCrypto extends UITest { - private final static String LOGTAG = "testNativeCrypto"; - - /** - * Robocop supports only a single test function per test class. Therefore, we - * have a single top-level test function that dispatches to sub-tests, - * accepting that we might fail part way through the cycle. Proper JUnit 3 - * testing can't land soon enough! - * - * @throws Exception - */ - public void test() throws Exception { - // This test could complete very quickly. If it completes too soon, the - // minidumps directory may not be created before the process is - // taken down, causing bug 722166. But we can't run the test and then block - // for Gecko:Ready, since it may have arrived before we block. So we wait. - // Again, JUnit 3 can't land soon enough! - GeckoHelper.blockForReady(); - - _testPBKDF2SHA256A(); - _testPBKDF2SHA256B(); - _testPBKDF2SHA256C(); - _testPBKDF2SHA256scryptA(); - _testPBKDF2SHA256scryptB(); - _testPBKDF2SHA256InvalidLenArg(); - - _testSHA1(); - _testSHA1AgainstMessageDigest(); - - _testSHA256(); - _testSHA256MultiPart(); - _testSHA256AgainstMessageDigest(); - _testSHA256WithMultipleUpdatesFromStream(); - } - - public void _testPBKDF2SHA256A() throws UnsupportedEncodingException, GeneralSecurityException { - final String p = "password"; - final String s = "salt"; - final int dkLen = 32; - - checkPBKDF2SHA256(p, s, 1, dkLen, "120fb6cffcf8b32c43e7225256c4f837a86548c92ccc35480805987cb70be17b"); - checkPBKDF2SHA256(p, s, 4096, dkLen, "c5e478d59288c841aa530db6845c4c8d962893a001ce4e11a4963873aa98134a"); - } - - public void _testPBKDF2SHA256B() throws UnsupportedEncodingException, GeneralSecurityException { - final String p = "passwordPASSWORDpassword"; - final String s = "saltSALTsaltSALTsaltSALTsaltSALTsalt"; - final int dkLen = 40; - - checkPBKDF2SHA256(p, s, 4096, dkLen, "348c89dbcbd32b2f32d814b8116e84cf2b17347ebc1800181c4e2a1fb8dd53e1c635518c7dac47e9"); - } - - public void _testPBKDF2SHA256scryptA() throws UnsupportedEncodingException, GeneralSecurityException { - final String p = "passwd"; - final String s = "salt"; - final int dkLen = 64; - - checkPBKDF2SHA256(p, s, 1, dkLen, "55ac046e56e3089fec1691c22544b605f94185216dde0465e68b9d57c20dacbc49ca9cccf179b645991664b39d77ef317c71b845b1e30bd509112041d3a19783"); - } - - public void _testPBKDF2SHA256scryptB() throws UnsupportedEncodingException, GeneralSecurityException { - final String p = "Password"; - final String s = "NaCl"; - final int dkLen = 64; - - checkPBKDF2SHA256(p, s, 80000, dkLen, "4ddcd8f60b98be21830cee5ef22701f9641a4418d04c0414aeff08876b34ab56a1d425a1225833549adb841b51c9b3176a272bdebba1d078478f62b397f33c8d"); - } - - public void _testPBKDF2SHA256C() throws UnsupportedEncodingException, GeneralSecurityException { - final String p = "pass\0word"; - final String s = "sa\0lt"; - final int dkLen = 16; - - checkPBKDF2SHA256(p, s, 4096, dkLen, "89b69d0516f829893c696226650a8687"); - } - - public void _testPBKDF2SHA256InvalidLenArg() throws UnsupportedEncodingException, GeneralSecurityException { - final String p = "password"; - final String s = "salt"; - final int c = 1; - final int dkLen = -1; // Should always be positive. - - try { - final byte[] key = NativeCrypto.pbkdf2SHA256(p.getBytes("US-ASCII"), s.getBytes("US-ASCII"), c, dkLen); - fFail("Expected sha256 to throw with negative dkLen argument."); - } catch (IllegalArgumentException e) { } // Expected. - } - - private void _testSHA1() throws UnsupportedEncodingException { - final String[] inputs = new String[] { - "abc", - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "" // To be filled in below. - }; - final String baseStr = "01234567"; - final int repetitions = 80; - final StringBuilder builder = new StringBuilder(baseStr.length() * repetitions); - for (int i = 0; i < 80; ++i) { - builder.append(baseStr); - } - inputs[2] = builder.toString(); - - final String[] expecteds = new String[] { - "a9993e364706816aba3e25717850c26c9cd0d89d", - "84983e441c3bd26ebaae4aa1f95129e5e54670f1", - "dea356a2cddd90c7a7ecedc5ebb563934f460452" - }; - - for (int i = 0; i < inputs.length; ++i) { - final byte[] input = inputs[i].getBytes("US-ASCII"); - final String expected = expecteds[i]; - - final byte[] actual = NativeCrypto.sha1(input); - fAssertNotNull("Hashed value is non-null", actual); - assertExpectedBytes(expected, actual); - } - } - - /** - * Test to ensure the output of our SHA1 algo is the same as MessageDigest's. This is important - * because we intend to replace MessageDigest in FHR with this SHA-1 algo (bug 959652). - */ - private void _testSHA1AgainstMessageDigest() throws UnsupportedEncodingException, - NoSuchAlgorithmException { - final String[] inputs = { - "password", - "saranghae", - "aoeusnthaoeusnthaoeusnth \0 12345098765432109876_!" - }; - - final MessageDigest digest = MessageDigest.getInstance("SHA-1"); - for (final String input : inputs) { - final byte[] inputBytes = input.getBytes("US-ASCII"); - - final byte[] mdBytes = digest.digest(inputBytes); - final byte[] ourBytes = NativeCrypto.sha1(inputBytes); - fAssertArrayEquals("MessageDigest hash is the same as NativeCrypto SHA-1 hash", mdBytes, ourBytes); - } - } - - private void _testSHA256() throws UnsupportedEncodingException { - final String[] inputs = new String[] { - "abc", - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "" // To be filled in below. - }; - final String baseStr = "01234567"; - final int repetitions = 80; - final StringBuilder builder = new StringBuilder(baseStr.length() * repetitions); - for (int i = 0; i < repetitions; ++i) { - builder.append(baseStr); - } - inputs[2] = builder.toString(); - - final String[] expecteds = new String[] { - "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad", - "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1", - "594847328451bdfa85056225462cc1d867d877fb388df0ce35f25ab5562bfbb5" - }; - - for (int i = 0; i < inputs.length; ++i) { - final byte[] input = inputs[i].getBytes("US-ASCII"); - final String expected = expecteds[i]; - - final byte[] ctx = NativeCrypto.sha256init(); - NativeCrypto.sha256update(ctx, input, input.length); - final byte[] actual = NativeCrypto.sha256finalize(ctx); - fAssertNotNull("Hashed value is non-null", actual); - assertExpectedBytes(expected, actual); - } - } - - private void _testSHA256MultiPart() throws UnsupportedEncodingException { - final String input = "01234567"; - final int repetitions = 80; - final String expected = "594847328451bdfa85056225462cc1d867d877fb388df0ce35f25ab5562bfbb5"; - - final byte[] inputBytes = input.getBytes("US-ASCII"); - final byte[] ctx = NativeCrypto.sha256init(); - for (int i = 0; i < repetitions; ++i) { - NativeCrypto.sha256update(ctx, inputBytes, inputBytes.length); - } - final byte[] actual = NativeCrypto.sha256finalize(ctx); - fAssertNotNull("Hashed value is non-null", actual); - assertExpectedBytes(expected, actual); - } - - private void _testSHA256AgainstMessageDigest() throws UnsupportedEncodingException, - NoSuchAlgorithmException { - final String[] inputs = { - "password", - "saranghae", - "aoeusnthaoeusnthaoeusnth \0 12345098765432109876_!" - }; - - final MessageDigest digest = MessageDigest.getInstance("SHA-256"); - for (final String input : inputs) { - final byte[] inputBytes = input.getBytes("US-ASCII"); - - final byte[] mdBytes = digest.digest(inputBytes); - - final byte[] ctx = NativeCrypto.sha256init(); - NativeCrypto.sha256update(ctx, inputBytes, inputBytes.length); - final byte[] ourBytes = NativeCrypto.sha256finalize(ctx); - fAssertArrayEquals("MessageDigest hash is the same as NativeCrypto SHA-256 hash", mdBytes, ourBytes); - } - } - - private void _testSHA256WithMultipleUpdatesFromStream() throws UnsupportedEncodingException { - final String input = "HelloWorldThisIsASuperLongStringThatIsReadAsAStreamOfBytes"; - final ByteArrayInputStream stream = new ByteArrayInputStream(input.getBytes("UTF-8")); - final String expected = "8b5cb76b80f7eb6fb83ee138bfd31e2922e71dd245daa21a8d9876e8dee9eef5"; - - byte[] buffer = new byte[10]; - final byte[] ctx = NativeCrypto.sha256init(); - int c; - - try { - while ((c = stream.read(buffer)) != -1) { - NativeCrypto.sha256update(ctx, buffer, c); - } - final byte[] actual = NativeCrypto.sha256finalize(ctx); - fAssertNotNull("Hashed value is non-null", actual); - assertExpectedBytes(expected, actual); - } catch (IOException e) { - fFail("IOException while reading stream"); - } - } - - private void checkPBKDF2SHA256(String p, String s, int c, int dkLen, final String expectedStr) - throws GeneralSecurityException, UnsupportedEncodingException { - final long start = SystemClock.elapsedRealtime(); - - final byte[] key = NativeCrypto.pbkdf2SHA256(p.getBytes("US-ASCII"), s.getBytes("US-ASCII"), c, dkLen); - fAssertNotNull("Hash result is non-null", key); - - final long end = SystemClock.elapsedRealtime(); - dumpLog(LOGTAG, "SHA-256 " + c + " took " + (end - start) + "ms"); - - if (expectedStr == null) { - return; - } - - fAssertEquals("Hash result is the appropriate length", dkLen, - Utils.hex2Byte(expectedStr).length); - assertExpectedBytes(expectedStr, key); - } - - private void assertExpectedBytes(final String expectedStr, byte[] key) { - fAssertEquals("Expected string matches hash result", expectedStr, Utils.byte2Hex(key)); - final byte[] expected = Utils.hex2Byte(expectedStr); - - fAssertEquals("Expected byte array length matches key length", expected.length, key.length); - fAssertArrayEquals("Expected byte array matches key byte array", expected, key); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNewTab.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNewTab.java deleted file mode 100644 index d9b014c1a..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testNewTab.java +++ /dev/null @@ -1,65 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Element; -import org.mozilla.gecko.R; - -import android.app.Activity; -import android.view.View; - -import com.robotium.solo.Condition; - -/* A simple test that creates 2 new tabs and checks that the tab count increases. */ -public class testNewTab extends BaseTest { - private Element tabCount = null; - private Element tabs = null; - private final Element closeTab = null; - private int tabCountInt = 0; - - public void testNewTab() { - String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - String url2 = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - - blockForGeckoReady(); - - Activity activity = getActivity(); - tabCount = mDriver.findElement(activity, R.id.tabs_counter); - tabs = mDriver.findElement(activity, R.id.tabs); - mAsserter.ok(tabCount != null && tabs != null, - "Checking elements", "all elements present"); - - int expectedTabCount = 1; - getTabCount(expectedTabCount); - mAsserter.is(tabCountInt, expectedTabCount, "Initial number of tabs correct"); - - addTab(url); - expectedTabCount++; - getTabCount(expectedTabCount); - mAsserter.is(tabCountInt, expectedTabCount, "Number of tabs increased"); - - addTab(url2); - expectedTabCount++; - getTabCount(expectedTabCount); - mAsserter.is(tabCountInt, expectedTabCount, "Number of tabs increased"); - - // cleanup: close all opened tabs - closeAddedTabs(); - } - - private void getTabCount(final int expected) { - waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - String newTabCountText = tabCount.getText(); - tabCountInt = Integer.parseInt(newTabCountText); - if (tabCountInt == expected) { - return true; - } - return false; - } - }, MAX_WAIT_MS); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testOSLocale.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testOSLocale.java deleted file mode 100644 index 434594fee..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testOSLocale.java +++ /dev/null @@ -1,137 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.util.Locale; - -import org.mozilla.gecko.BrowserLocaleManager; -import org.mozilla.gecko.GeckoSharedPrefs; -import org.mozilla.gecko.GeckoThread; -import org.mozilla.gecko.Locales; -import org.mozilla.gecko.PrefsHelper; - -import android.content.SharedPreferences; - - -public class testOSLocale extends BaseTest { - @Override - public void setUp() throws Exception { - super.setUp(); - - // Clear per-profile SharedPreferences as a workaround for Bug 1069687. - // We're trying to exercise logic that only applies on first onCreate! - // We can't rely on this occurring prior to the first broadcast, though, - // so see the main test method for more logic. - final String profileName = getTestProfile().getName(); - mAsserter.info("Setup", "Clearing pref in " + profileName + "."); - GeckoSharedPrefs.forProfileName(getActivity(), profileName) - .edit() - .remove("osLocale") - .apply(); - } - - public static class PrefState extends PrefsHelper.PrefHandlerBase { - private static final String PREF_LOCALE_OS = "intl.locale.os"; - private static final String PREF_ACCEPT_LANG = "intl.accept_languages"; - - private static final String[] TO_FETCH = {PREF_LOCALE_OS, PREF_ACCEPT_LANG}; - - public volatile String osLocale; - public volatile String acceptLanguages; - - private final Object waiter = new Object(); - - public void fetch() throws InterruptedException { - // Wait for any pending changes to have taken. Bug 1092580. - GeckoThread.waitOnGecko(); - synchronized (waiter) { - PrefsHelper.getPrefs(TO_FETCH, this); - waiter.wait(MAX_WAIT_MS); - } - } - - @Override - public void prefValue(String pref, String value) { - switch (pref) { - case PREF_LOCALE_OS: - osLocale = value; - return; - case PREF_ACCEPT_LANG: - acceptLanguages = value; - return; - } - } - - @Override - public void finish() { - synchronized (waiter) { - waiter.notify(); - } - } - } - - public void testOSLocale() throws Exception { - blockForDelayedStartup(); - - final SharedPreferences prefs = GeckoSharedPrefs.forProfile(getActivity()); - final PrefState state = new PrefState(); - - state.fetch(); - - // We don't know at this point whether we were run against a dirty profile or not. - // - // If we cleared the pref above prior to BrowserApp's delayed init, or our Gecko - // profile has been used before, then we're already going to be set up for en-US. - // - // If we cleared the pref after the initial broadcast, and our Android-side profile - // has been used before but the Gecko profile is clean, then the Gecko prefs won't - // have been set. - // - // Instead, we always send a new locale code, and see what we get. - final Locale fr = Locales.parseLocaleCode("fr"); - BrowserLocaleManager.storeAndNotifyOSLocale(prefs, fr); - - state.fetch(); - - mAsserter.is(state.osLocale, "fr", "We're in fr."); - - // Now we can see what the expected Accept-Languages header should be. - // The OS locale is 'fr', so we have our app locale (en-US), - // the OS locale (fr), then any remaining fallbacks from intl.properties. - mAsserter.is(state.acceptLanguages, "en-us,fr,en", "We have the default en-US+fr Accept-Languages."); - - // Now set the app locale to be es-ES. - BrowserLocaleManager.getInstance().setSelectedLocale(getActivity(), "es-ES"); - - state.fetch(); - - mAsserter.is(state.osLocale, "fr", "We're still in fr."); - - // The correct set here depends on whether the - // browser was built with multiple locales or not. - // This is exasperating, but hey. - final boolean isMultiLocaleBuild = false; - - // This never changes. - final String SELECTED_LOCALES = "es-es,fr,"; - - // Expected, from es-ES's intl.properties: - final String EXPECTED = SELECTED_LOCALES + - (isMultiLocaleBuild ? "es,en-us,en" : // Expected, from es-ES's intl.properties. - "en-us,en"); // Expected, from en-US (the default). - - mAsserter.is(state.acceptLanguages, EXPECTED, "We have the right es-ES+fr Accept-Languages for this build."); - - // And back to en-US. - final Locale en_US = Locales.parseLocaleCode("en-US"); - BrowserLocaleManager.storeAndNotifyOSLocale(prefs, en_US); - BrowserLocaleManager.getInstance().resetToSystemLocale(getActivity()); - - state.fetch(); - - mAsserter.is(state.osLocale, "en-US", "We're in en-US."); - mAsserter.is(state.acceptLanguages, "en-us,en", "We have the default processed en-US Accept-Languages."); - } -} \ No newline at end of file diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPanCorrectness.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPanCorrectness.java deleted file mode 100644 index e7d402607..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPanCorrectness.java +++ /dev/null @@ -1,49 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.PaintedSurface; - -/** - * A basic panning correctness test. - * - Loads a page and verifies it draws - * - drags page upwards by 100 pixels and verifies it draws - * - drags page leftwards by 100 pixels and verifies it draws - */ -public class testPanCorrectness extends PixelTest { - public void testPanCorrectness() { - String url = getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL); - - MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop()); - - blockForGeckoReady(); - - // load page and check we're at 0,0 - loadAndVerifyBoxes(url); - - // drag page upwards by 100 pixels - Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint(); - meh.dragSync(10, 150, 10, 50); - PaintedSurface painted = waitForPaint(paintExpecter); - paintExpecter.unregisterListener(); - try { - checkScrollWithBoxes(painted, 0, 100); - } finally { - painted.close(); - } - - // drag page leftwards by 100 pixels - paintExpecter = mActions.expectPaint(); - meh.dragSync(150, 10, 50, 10); - painted = waitForPaint(paintExpecter); - paintExpecter.unregisterListener(); - try { - checkScrollWithBoxes(painted, 100, 100); - } finally { - painted.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordEncrypt.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordEncrypt.java deleted file mode 100644 index 65a4eaba6..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordEncrypt.java +++ /dev/null @@ -1,125 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.File; - -import org.json.JSONObject; -import org.mozilla.gecko.NSSBridge; -import org.mozilla.gecko.db.BrowserContract; - -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.database.Cursor; -import android.net.Uri; - -public class testPasswordEncrypt extends BaseTest { - public void testPasswordEncrypt() { - Context context = (Context)getActivity(); - ContentResolver cr = context.getContentResolver(); - mAsserter.isnot(cr, null, "Found a content resolver"); - ContentValues cvs = new ContentValues(); - - blockForGeckoReady(); - - File db = new File(mProfile, "signons.sqlite"); - String dbPath = db.getPath(); - - Uri passwordUri; - cvs.put("hostname", "http://www.example.com"); - cvs.put("encryptedUsername", "username"); - cvs.put("encryptedPassword", "password"); - - // Attempt to insert into the db - passwordUri = BrowserContract.Passwords.CONTENT_URI; - Uri.Builder builder = passwordUri.buildUpon(); - passwordUri = builder.appendQueryParameter("profilePath", mProfile).build(); - - Uri uri = cr.insert(passwordUri, cvs); - Uri expectedUri = passwordUri.buildUpon().appendPath("1").build(); - mAsserter.is(uri.toString(), expectedUri.toString(), "Insert returned correct uri"); - - Cursor list = mActions.querySql(dbPath, "SELECT encryptedUsername FROM moz_logins"); - list.moveToFirst(); - String decryptedU = null; - try { - decryptedU = NSSBridge.decrypt(context, mProfile, list.getString(0)); - } catch (Exception e) { - mAsserter.ok(false, "NSSBridge.decrypt through Exception " + e, ""); // TODO: What is diag? - } - mAsserter.is(decryptedU, "username", "Username was encrypted correctly when inserting"); - - list = mActions.querySql(dbPath, "SELECT encryptedPassword, encType FROM moz_logins"); - list.moveToFirst(); - String decryptedP = null; - try { - decryptedP = NSSBridge.decrypt(context, mProfile, list.getString(0)); - } catch (Exception e) { - mAsserter.ok(false, "NSSBridge.decrypt through Exception " + e, ""); // TODO: What is diag? - } - mAsserter.is(decryptedP, "password", "Password was encrypted correctly when inserting"); - mAsserter.is(list.getInt(1), 1, "Password has correct encryption type"); - - cvs.put("encryptedUsername", "username2"); - cvs.put("encryptedPassword", "password2"); - cr.update(passwordUri, cvs, null, null); - - list = mActions.querySql(dbPath, "SELECT encryptedUsername FROM moz_logins"); - list.moveToFirst(); - try { - decryptedU = NSSBridge.decrypt(context, mProfile, list.getString(0)); - } catch (Exception e) { - mAsserter.ok(false, "NSSBridge.decrypt through Exception " + e, ""); // TODO: What is diag? - } - mAsserter.is(decryptedU, "username2", "Username was encrypted when updating"); - - list = mActions.querySql(dbPath, "SELECT encryptedPassword FROM moz_logins"); - list.moveToFirst(); - try { - decryptedP = NSSBridge.decrypt(context, mProfile, list.getString(0)); - } catch (Exception e) { - mAsserter.ok(false, "NSSBridge.decrypt through Exception " + e, ""); // TODO: What is diag? - } - mAsserter.is(decryptedP, "password2", "Password was encrypted when updating"); - - // Trying to store a password while master password is enabled should throw, - // but because Android can't send Exceptions across processes - // it just results in a null uri/cursor being returned. - toggleMasterPassword("password"); - try { - uri = cr.insert(passwordUri, cvs); - // TODO: restore this assertion -- see bug 764901 - // mAsserter.is(uri, null, "Storing a password while MP was set should fail"); - - Cursor c = cr.query(passwordUri, null, null, null, null); - // TODO: restore this assertion -- see bug 764901 - // mAsserter.is(c, null, "Querying passwords while MP was set should fail"); - } catch (Exception ex) { - // Password provider currently can not throw across process - // so we should not catch this exception here - mAsserter.ok(false, "Caught exception", ex.toString()); - } - toggleMasterPassword("password"); - } - - private void toggleMasterPassword(String passwd) { - setPreferenceAndWaitForChange("privacy.masterpassword.enabled", passwd); - } - - @Override - public void tearDown() throws Exception { - // remove the entire signons.sqlite file - File profile = new File(mProfile); - File db = new File(profile, "signons.sqlite"); - if (db.delete()) { - mAsserter.dumpLog("tearDown deleted "+db.toString()); - } else { - mAsserter.dumpLog("tearDown did not delete "+db.toString()); - } - - super.tearDown(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordProvider.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordProvider.java deleted file mode 100644 index 8a2cc357e..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPasswordProvider.java +++ /dev/null @@ -1,104 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.io.File; - -import org.mozilla.gecko.db.BrowserContract; -import org.mozilla.gecko.db.BrowserContract.GeckoDisabledHosts; -import org.mozilla.gecko.db.BrowserContract.Passwords; - -import android.content.ContentResolver; -import android.content.ContentValues; -import android.content.Context; -import android.database.Cursor; -import android.net.Uri; - -/** - * A basic password contentprovider test. - * - inserts a password when the database is not yet set up - * - inserts a password - * - updates a password - * - deletes a password - * - inserts a disabled host - * - queries for disabled host - */ -public class testPasswordProvider extends BaseTest { - private static final String DB_NAME = "signons.sqlite"; - - public void testPasswordProvider() { - Context context = (Context)getActivity(); - ContentResolver cr = context.getContentResolver(); - ContentValues[] cvs = new ContentValues[1]; - cvs[0] = new ContentValues(); - - blockForGeckoReady(); - - cvs[0].put("hostname", "http://www.example.com"); - cvs[0].put("httpRealm", "http://www.example.com"); - cvs[0].put("formSubmitURL", "http://www.example.com"); - cvs[0].put("usernameField", "usernameField"); - cvs[0].put("passwordField", "passwordField"); - cvs[0].put("encryptedUsername", "username"); - cvs[0].put("encryptedPassword", "password"); - cvs[0].put("encType", "1"); - - // Attempt to insert into the db - Uri passwordUri = Passwords.CONTENT_URI; - Uri.Builder builder = passwordUri.buildUpon(); - passwordUri = builder.appendQueryParameter("profilePath", mProfile).build(); - - Uri uri = cr.insert(passwordUri, cvs[0]); - Uri expectedUri = passwordUri.buildUpon().appendPath("1").build(); - mAsserter.is(uri.toString(), expectedUri.toString(), "Insert returned correct uri"); - Cursor c = cr.query(passwordUri, null, null, null, null); - SqliteCompare(c, cvs); - - cvs[0].put("usernameField", "usernameField2"); - cvs[0].put("passwordField", "passwordField2"); - - int numUpdated = cr.update(passwordUri, cvs[0], null, null); - mAsserter.is(1, numUpdated, "Correct number updated"); - c = cr.query(passwordUri, null, null, null, null); - SqliteCompare(c, cvs); - - int numDeleted = cr.delete(passwordUri, null, null); - mAsserter.is(1, numDeleted, "Correct number deleted"); - cvs = new ContentValues[0]; - c = cr.query(passwordUri, null, null, null, null); - SqliteCompare(c, cvs); - - ContentValues values = new ContentValues(); - values.put("hostname", "http://www.example.com"); - - // Attempt to insert into the db. - Uri disabledHostUri = GeckoDisabledHosts.CONTENT_URI; - builder = disabledHostUri.buildUpon(); - disabledHostUri = builder.appendQueryParameter("profilePath", mProfile).build(); - - uri = cr.insert(disabledHostUri, values); - expectedUri = disabledHostUri.buildUpon().appendPath("1").build(); - mAsserter.is(uri.toString(), expectedUri.toString(), "Insert returned correct uri"); - Cursor cursor = cr.query(disabledHostUri, null, null, null, null); - assertNotNull(cursor); - assertEquals(1, cursor.getCount()); - cursor.moveToFirst(); - CursorMatches(cursor, values); - } - - @Override - public void tearDown() throws Exception { - // remove the entire signons.sqlite file - File profile = new File(mProfile); - File db = new File(profile, "signons.sqlite"); - if (db.delete()) { - mAsserter.dumpLog("tearDown deleted "+db.toString()); - } else { - mAsserter.dumpLog("tearDown did not delete "+db.toString()); - } - - super.tearDown(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPermissions.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPermissions.java deleted file mode 100644 index e4d997895..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPermissions.java +++ /dev/null @@ -1,72 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.util.ArrayList; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.PaintedSurface; - -import android.widget.CheckBox; - -public class testPermissions extends PixelTest { - public void testPermissions() { - blockForGeckoReady(); - - geolocationTest(); - } - - private void geolocationTest() { - Actions.RepeatedEventExpecter paintExpecter; - - // Test geolocation notification - loadAndPaint(getAbsoluteUrl(mStringHelper.ROBOCOP_GEOLOCATION_URL)); - waitForText("wants your location"); - - // Uncheck the "Don't ask again for this site" checkbox - ArrayList checkBoxes = mSolo.getCurrentViews(CheckBox.class); - mAsserter.ok(checkBoxes.size() == 1, "checkbox count", "only one checkbox visible"); - mAsserter.ok(mSolo.isCheckBoxChecked(0), "checkbox checked", "checkbox is checked"); - mSolo.clickOnCheckBox(0); - mAsserter.ok(!mSolo.isCheckBoxChecked(0), "checkbox not checked", "checkbox is not checked"); - - // Test "Share" button functionality with unchecked checkbox - paintExpecter = mActions.expectPaint(); - mSolo.clickOnText("Share"); - PaintedSurface painted = waitForPaint(paintExpecter); - paintExpecter.unregisterListener(); - try { - mAsserter.ispixel(painted.getPixelAt(10, 10), 0, 0x80, 0, "checking page background is green"); - } finally { - painted.close(); - } - - // Re-trigger geolocation notification - reloadAndPaint(); - waitForText("wants your location"); - - // Make sure the checkbox is checked this time - mAsserter.ok(mSolo.isCheckBoxChecked(0), "checkbox checked", "checkbox is checked"); - - // Test "Share" button functionality with checked checkbox - paintExpecter = mActions.expectPaint(); - mSolo.clickOnText("Share"); - painted = waitForPaint(paintExpecter); - paintExpecter.unregisterListener(); - try { - mAsserter.ispixel(painted.getPixelAt(10, 10), 0, 0x80, 0, "checking page background is green"); - } finally { - painted.close(); - } - - // When we reload the page, location should be automatically shared - painted = reloadAndGetPainted(); - try { - mAsserter.ispixel(painted.getPixelAt(10, 10), 0, 0x80, 0, "checking page background is green"); - } finally { - painted.close(); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPictureLinkContextMenu.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPictureLinkContextMenu.java deleted file mode 100644 index 1461fd9be..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPictureLinkContextMenu.java +++ /dev/null @@ -1,52 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -public class testPictureLinkContextMenu extends ContentContextMenuTest { - - // Test website strings - private static String PICTURE_PAGE_URL; - private static String BLANK_PAGE_URL; - private static String PICTURE_URL; - private static final String tabs [] = { "Image", "Link" }; - private static final String photoMenuItems [] = { "Copy Image Location", "Share Image", "View Image", "Set Image As", "Save Image" }; - private static final String imageTitle = "^Image$"; - - public void testPictureLinkContextMenu() { - final String PICTURE_PAGE_TITLE = mStringHelper.ROBOCOP_PICTURE_LINK_TITLE; - final String linkMenuItems [] = mStringHelper.CONTEXT_MENU_ITEMS_IN_NORMAL_TAB; - - blockForGeckoReady(); - - PICTURE_PAGE_URL=getAbsoluteUrl(mStringHelper.ROBOCOP_PICTURE_LINK_URL); - BLANK_PAGE_URL=getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - PICTURE_URL=getAbsoluteUrl(mStringHelper.ROBOCOP_PICTURE_URL); - loadAndPaint(PICTURE_PAGE_URL); - verifyUrlInContentDescription(PICTURE_PAGE_URL); - - switchTabs(imageTitle); - verifyContextMenuItems(photoMenuItems); - verifyTabs(tabs); - switchTabs(imageTitle); - verifyCopyOption(photoMenuItems[0], "Firefox.jpg"); // Test the "Copy Image Location" option - switchTabs(imageTitle); - verifyShareOption(photoMenuItems[1], PICTURE_PAGE_TITLE); // Test the "Share Image" option - switchTabs(imageTitle); - verifyViewImageOption(photoMenuItems[2], PICTURE_URL, PICTURE_PAGE_TITLE); // Test the "View Image" option - - verifyContextMenuItems(linkMenuItems); - openTabFromContextMenu(linkMenuItems[0],2); // Test the "Open in New Tab" option - expecting 2 tabs: the original and the new one - openTabFromContextMenu(linkMenuItems[1],2); // Test the "Open in Private Tab" option - expecting only 2 tabs in normal mode - verifyCopyOption(linkMenuItems[2], BLANK_PAGE_URL); // Test the "Copy Link" option - verifyShareOption(linkMenuItems[3], PICTURE_PAGE_TITLE); // Test the "Share Link" option - verifyBookmarkLinkOption(linkMenuItems[4],BLANK_PAGE_URL); // Test the "Bookmark Link" option - } - - @Override - public void tearDown() throws Exception { - mDatabaseHelper.deleteBookmark(BLANK_PAGE_URL); - super.tearDown(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrefsObserver.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrefsObserver.java deleted file mode 100644 index f63358d57..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrefsObserver.java +++ /dev/null @@ -1,81 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; - -/** - * Basic test to check bounce-back from overscroll. - * - Load the page and verify it draws - * - Drag page downwards by 100 pixels into overscroll, verify it snaps back. - * - Drag page rightwards by 100 pixels into overscroll, verify it snaps back. - */ -public class testPrefsObserver extends BaseTest { - private static final String PREF_TEST_PREF = "robocop.tests.dummy"; - - private Actions.PrefWaiter prefWaiter; - private boolean prefValue; - - public void setPref(boolean value) { - mAsserter.dumpLog("Setting pref"); - mActions.setPref(PREF_TEST_PREF, value, /* flush */ false); - } - - public void waitAndCheckPref(boolean value) { - mAsserter.dumpLog("Waiting to check pref"); - - mAsserter.isnot(prefWaiter, null, "Check pref waiter is not null"); - prefWaiter.waitForFinish(); - - mAsserter.is(prefValue, value, "Check correct pref value"); - } - - public void verifyDisconnect() { - mAsserter.dumpLog("Checking pref observer is removed"); - - final boolean newValue = !prefValue; - setPreferenceAndWaitForChange(PREF_TEST_PREF, newValue); - mAsserter.isnot(prefValue, newValue, "Check pref value did not change"); - } - - public void observePref() { - mAsserter.dumpLog("Setting up pref observer"); - - // Setup the pref observer - mAsserter.is(prefWaiter, null, "Check pref waiter is null"); - prefWaiter = mActions.addPrefsObserver( - new String[] { PREF_TEST_PREF }, new Actions.PrefHandlerBase() { - @Override // Actions.PrefHandlerBase - public void prefValue(String pref, boolean value) { - mAsserter.is(pref, PREF_TEST_PREF, "Check correct pref name"); - prefValue = value; - } - }); - } - - public void removePrefObserver() { - mAsserter.dumpLog("Removing pref observer"); - - mActions.removePrefsObserver(prefWaiter); - } - - public void testPrefsObserver() { - blockForGeckoReady(); - - setPref(false); - observePref(); - waitAndCheckPref(false); - - setPref(true); - waitAndCheckPref(true); - - removePrefObserver(); - verifyDisconnect(); - - // Removing again should be a no-op. - removePrefObserver(); - } -} - diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrivateBrowsing.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrivateBrowsing.java deleted file mode 100644 index 461e95aa7..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPrivateBrowsing.java +++ /dev/null @@ -1,89 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.util.ArrayList; - -import org.json.JSONException; -import org.json.JSONObject; -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.Tabs; - -/** - * The test loads a new private tab and loads a page with a big link on it - * Opens the link in a new private tab and checks that it is private - * Adds a new normal tab and loads a 3rd URL - * Checks that the bigLinkUrl loaded in the normal tab is present in the browsing history but the 2 urls opened in private tabs are not - */ -public class testPrivateBrowsing extends ContentContextMenuTest { - - public void testPrivateBrowsing() { - String bigLinkUrl = getAbsoluteUrl(mStringHelper.ROBOCOP_BIG_LINK_URL); - String blank1Url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - String blank2Url = getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - Tabs tabs = Tabs.getInstance(); - - blockForGeckoReady(); - - Actions.EventExpecter tabExpecter = mActions.expectGeckoEvent("Tab:Added"); - Actions.EventExpecter contentExpecter = mActions.expectGeckoEvent("Content:PageShow"); - tabs.loadUrl(bigLinkUrl, Tabs.LOADURL_NEW_TAB | Tabs.LOADURL_PRIVATE); - tabExpecter.blockForEvent(); - tabExpecter.unregisterListener(); - contentExpecter.blockForEvent(); - contentExpecter.unregisterListener(); - verifyTabCount(1); - - // May intermittently get context menu for normal tab without additional wait - mSolo.sleep(5000); - - // Open the link context menu and verify the options - verifyContextMenuItems(mStringHelper.CONTEXT_MENU_ITEMS_IN_PRIVATE_TAB); - - // Check that "Open Link in New Tab" is not in the menu - mAsserter.ok(!mSolo.searchText(mStringHelper.CONTEXT_MENU_ITEMS_IN_NORMAL_TAB[0]), "Checking that 'Open Link in New Tab' is not displayed in the context menu", "'Open Link in New Tab' is not displayed in the context menu"); - - // Open the link in a new private tab and check that it is private - tabExpecter = mActions.expectGeckoEvent("Tab:Added"); - contentExpecter = mActions.expectGeckoEvent("Content:PageShow"); - mSolo.clickOnText(mStringHelper.CONTEXT_MENU_ITEMS_IN_PRIVATE_TAB[0]); - String eventData = tabExpecter.blockForEventData(); - tabExpecter.unregisterListener(); - contentExpecter.blockForEvent(); - contentExpecter.unregisterListener(); - mAsserter.ok(isTabPrivate(eventData), "Checking if the new tab opened from the context menu was a private tab", "The tab was a private tab"); - verifyTabCount(2); - - // Open a normal tab to check later that it was registered in the Firefox Browser History - tabExpecter = mActions.expectGeckoEvent("Tab:Added"); - contentExpecter = mActions.expectGeckoEvent("Content:PageShow"); - tabs.loadUrl(blank2Url, Tabs.LOADURL_NEW_TAB); - tabExpecter.blockForEvent(); - tabExpecter.unregisterListener(); - contentExpecter.blockForEvent(); - contentExpecter.unregisterListener(); - verifyTabCount(2); - - // wait for history updates to complete - mSolo.sleep(3000); - - // Get the history list and check that the links open in private browsing are not saved - final ArrayList firefoxHistory = mDatabaseHelper.getBrowserDBUrls(DatabaseHelper.BrowserDataType.HISTORY); - - mAsserter.ok(!firefoxHistory.contains(bigLinkUrl), "Check that the link opened in the first private tab was not saved", bigLinkUrl + " was not added to history"); - mAsserter.ok(!firefoxHistory.contains(blank1Url), "Check that the link opened in the private tab from the context menu was not saved", blank1Url + " was not added to history"); - mAsserter.ok(firefoxHistory.contains(blank2Url), "Check that the link opened in the normal tab was saved", blank2Url + " was added to history"); - } - - private boolean isTabPrivate(String eventData) { - try { - JSONObject data = new JSONObject(eventData); - return data.getBoolean("isPrivate"); - } catch (JSONException e) { - mAsserter.ok(false, "Error parsing the event data", e.toString()); - return false; - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPromptGridInput.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPromptGridInput.java deleted file mode 100644 index f645fe3be..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testPromptGridInput.java +++ /dev/null @@ -1,47 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -public class testPromptGridInput extends BaseTest { - protected int index = 1; - public void testPromptGridInput() { - blockForGeckoReady(); - - test(1); - - testGridItem("Icon 1"); - testGridItem("Icon 2"); - testGridItem("Icon 3"); - testGridItem("Icon 4"); - testGridItem("Icon 5"); - testGridItem("Icon 6"); - testGridItem("Icon 7"); - testGridItem("Icon 8"); - testGridItem("Icon 9"); - testGridItem("Icon 10"); - testGridItem("Icon 11"); - - mSolo.clickOnText("Icon 11"); - mSolo.clickOnText("OK"); - - mAsserter.ok(waitForText("PASS"), "test passed", "PASS"); - mSolo.goBack(); - } - - public void testGridItem(String title) { - // Force the list to scroll if necessary - mSolo.waitForText(title, 1, 500, true); - mAsserter.ok(waitForText(title), "Found grid item", title); - } - - public void test(final int num) { - // Load about:blank between each test to ensure we reset state - loadUrl(mStringHelper.ABOUT_BLANK_URL); - mAsserter.ok(waitForText(mStringHelper.ABOUT_BLANK_URL), "Loaded blank page", - mStringHelper.ABOUT_BLANK_URL); - - loadUrl("chrome://roboextender/content/robocop_prompt_gridinput.html#test" + num); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReaderCacheMigration.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReaderCacheMigration.java deleted file mode 100644 index 6dbc70de5..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReaderCacheMigration.java +++ /dev/null @@ -1,62 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.GeckoProfile; -import org.mozilla.gecko.db.BrowserDatabaseHelper; - -import java.io.File; -import java.io.IOException; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -/** - * Tests that our readercache-migration works correctly. - * - * Our main concern is ensuring that the hashed path for a given url is the same in Java - * as it was in JS, or else our (Java-based) migration will lose track of valid cached items. - */ -public class testReaderCacheMigration extends JavascriptBridgeTest { - - private final String[] TEST_DOMAINS = new String[] { - "", - "http://mozilla.org", - "https://bugzilla.mozilla.org/show_bug.cgi?id=1234315#c41", - "http://www.llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch.com/" - }; - - private static final String TEST_JS = "testReaderCacheMigration.js"; - - /** - * We compute the path-name in Java, and pass this through to JS, which conducts the actual - * equality check. Our JavascriptBridge doesn't seem to support return values, so we need - * to instead pass the computed path-name in at least one direction. - */ - private void checkPathMatches(final String pageURL, final File cacheDir) { - final String hashedName = BrowserDatabaseHelper.getReaderCacheFileNameForURL(pageURL); - - final File cacheFile = new File(cacheDir, hashedName); - - try { - // We have to use the canonical path to match what the JS side will use. We could - // instead just match on the file name, and not the path, but this helps - // ensure that we've not broken any of the path finding either. - getJS().syncCall("check_hashed_path_matches", pageURL, cacheFile.getCanonicalPath()); - } catch (IOException e) { - fAssertTrue("Unable to getCanonicalPath(), this should never happen", false); - } - - } - - public void testReaderCacheMigration() { - blockForReadyAndLoadJS(TEST_JS); - - final File cacheDir = new File(GeckoProfile.get(getActivity()).getDir(), "readercache"); - - for (final String URL : TEST_DOMAINS) { - checkPathMatches(URL, cacheDir); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReaderModeTitle.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReaderModeTitle.java deleted file mode 100644 index 31e012070..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReaderModeTitle.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.tests.helpers.GeckoHelper; -import org.mozilla.gecko.tests.helpers.NavigationHelper; - -/** - * This tests ensures that the toolbar in reader mode displays the original page url. - */ -public class testReaderModeTitle extends UITest { - public void testReaderModeTitle() { - GeckoHelper.blockForReady(); - - NavigationHelper.enterAndLoadUrl(mStringHelper.ROBOCOP_READER_MODE_BASIC_ARTICLE); - - mToolbar.pressReaderModeButton(); - - mToolbar.assertTitle(mStringHelper.ROBOCOP_READER_MODE_BASIC_ARTICLE); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReadingListCache.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReadingListCache.java deleted file mode 100644 index 2006bbbfc..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReadingListCache.java +++ /dev/null @@ -1,12 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - - -public class testReadingListCache extends JavascriptTest { - public testReadingListCache() { - super("testReadingListCache.js"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReadingListToBookmarksMigration.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReadingListToBookmarksMigration.java deleted file mode 100644 index dc181defc..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testReadingListToBookmarksMigration.java +++ /dev/null @@ -1,217 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import android.database.Cursor; -import android.database.sqlite.SQLiteDatabase; -import android.net.Uri; -import android.util.Log; - -import org.mozilla.gecko.GeckoProfile; -import org.mozilla.gecko.GeckoProfileDirectories; -import org.mozilla.gecko.db.*; -import org.mozilla.gecko.reader.SavedReaderViewHelper; - -import java.io.BufferedInputStream; -import java.io.BufferedOutputStream; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.ArrayList; -import java.util.HashSet; -import java.util.Set; - -import static org.mozilla.gecko.db.BrowserContract.*; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertEquals; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertNotNull; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -// TODO: Move to junit 3 tests, once those run in automation. There is no ui testing to do so it's a better fit. - -/** - * This test runs the 30 to 31 database upgrade, which moves reading-list INPUT_FILES from a separate - * reading-list folder into mobile bookmarks. - * - * It is based on testBrowserDatabaseHelperUpgrades. We load a v30 db containing two reading list - * INPUT_FILES, and test that these have successfully been converted into bookmarks. - */ -public class testReadingListToBookmarksMigration extends UITest { - private ArrayList tempFiles; - - // These names are generated by hashing the URLs, see INPUT_URLS below, and - // BrowserDatabaseHelper.getReaderCacheFileNameForURL() - private static final ArrayList INPUT_FILES = new ArrayList() {{ - add("DWUP3U4ERC6TKJVSYXKJLHHEFY.json"); - add("KWNV7PXD3JFOJBQJVFXI3CQKNE.json"); - }}; - - // same ordering as in INPUT_FILES, although we don't rely on ordering in this test - private static final ArrayList INPUT_URLS = new ArrayList() {{ - add("http://www.bbc.com/news/election-us-2016-35962179"); - add("http://www.bbc.com/news/world-europe-35962670"); - }}; - - @Override - public void setUp() throws Exception { - super.setUp(); - // TODO: We already install & remove the profile directory each run so it'd be safer for clean-up to store - // this there. That being said, temporary files are still stored in the application directory so these temporary - // files will get cleaned up when the application is uninstalled or when data is cleared. - tempFiles = new ArrayList<>(); - } - - @Override - public void tearDown() throws Exception { - super.tearDown(); - for (final File file : tempFiles) { - file.delete(); - } - } - - private void walkRLPreMigration(SQLiteDatabase db) { - Set urls = new HashSet<>(INPUT_URLS); - - final Cursor c = db.rawQuery("SELECT * FROM " + ReadingListItems.TABLE_NAME, null); - - fAssertNotNull("Cursor cannot be null", c); - try { - final boolean movedToFirst = c.moveToFirst(); - fAssertTrue("Cursor must have data", movedToFirst); - - int urlIndex = c.getColumnIndexOrThrow(ReadingListItems.URL); - do { - final String url = c.getString(urlIndex); - - boolean removed = urls.remove(url); - fAssertTrue("Unexpected reading-list URL in database", removed); - } while (c.moveToNext()); - } finally { - c.close(); - } - - fAssertTrue("All urls should have been removed from set", urls.isEmpty()); - } - - private void walkRLPostMigration(SQLiteDatabase db) { - Set urls = new HashSet<>(INPUT_URLS); - - final Cursor c = db.rawQuery("SELECT * FROM " + - Bookmarks.VIEW_WITH_ANNOTATIONS - + " WHERE " + BrowserContract.UrlAnnotations.KEY + " = ?", - new String[] { - BrowserContract.UrlAnnotations.Key.READER_VIEW.getDbValue() - }); - - fAssertNotNull("Cursor cannot be null", c); - try { - final boolean movedToFirst = c.moveToFirst(); - fAssertTrue("Cursor must have data", movedToFirst); - - int urlIndex = c.getColumnIndexOrThrow(Bookmarks.URL); - do { - final String url = c.getString(urlIndex); - - boolean removed = urls.remove(url); - fAssertTrue("Unexpected reading-list URL in database", removed); - } while (c.moveToNext()); - } finally { - c.close(); - } - - fAssertTrue("All urls should have been removed from set", urls.isEmpty()); - } - - /** - * @throws IOException if the database or input files cannot be copied. - */ - public void testReadingListToBookmarksMigration() throws IOException { - final String tempDbPath = copyAssets(); - final SQLiteDatabase db = SQLiteDatabase.openDatabase(tempDbPath, null, 0); - - try { - // This initialises the helper, but does not open the DB. - BrowserDatabaseHelper dbHelper = new BrowserDatabaseHelper(getActivity(), tempDbPath); - - walkRLPreMigration(db); - - // Run just one upgrade - we don't know what future upgrades might do, whereas with one - // upgrade we can guarantee a given DB state. - dbHelper.onUpgrade(db, 30, 31); - - // SavedReaderViewHelper writes annotations directly to the GeckoProfile DB (as opposed - // to our local DB copy). We aren't able to read this here (and the data isn't written - // to our own db), hence we can't test the DB content yet. -// walkRLPostMigration(db); - - SavedReaderViewHelper rvh = SavedReaderViewHelper.getSavedReaderViewHelper(getActivity()); - - fAssertEquals("All input files should have been migrated", INPUT_FILES.size(), rvh.size()); - for (String url : INPUT_URLS) { - boolean isCached = rvh.isURLCached(url); - fAssertTrue("URL no longer in cache after migration", isCached); - } - } finally { - db.close(); - } - } - - private void copyAssetToFile(String inputPath, File destination) throws IOException { - final InputStream inputStream = openFileFromAssets(inputPath); - final OutputStream os = new BufferedOutputStream(new FileOutputStream(destination)); - try { - final byte[] buffer = new byte[1024]; - int len; - while ((len = inputStream.read(buffer)) > 0) { - os.write(buffer, 0, len); - } - os.flush(); - } finally { - os.close(); - inputStream.close(); - } - } - - /** - * Copies assets into the desired locations. We need to copy our DB into a temporary file, - * and readercache items into the profile directory. - * - * @throws IOException if reading the existing files or writing the temporary files fails - */ - private String copyAssets() throws IOException { - final File profileDir = GeckoProfile.get(getActivity()).getDir(); - final File cacheDir = new File(profileDir, "readercache"); - cacheDir.mkdir(); - - for (String name : INPUT_FILES) { - final String path = "readercache" + File.separator + name; - final File destination = new File(cacheDir, name); - tempFiles.add(destination); - - Log.d(LOGTAG, "Moving readerview cache file to " + destination.getPath()); - copyAssetToFile(path, destination); - } - - final File dbDestination = File.createTempFile("temporaryDB_", "db"); - tempFiles.add(dbDestination); - - Log.d(LOGTAG, "Moving DB from assets to " + dbDestination.getPath()); - copyAssetToFile("browser.db", dbDestination); - - return dbDestination.getPath(); - } - - private InputStream openFileFromAssets(final String name) throws IOException { - final String assetPath = String.format("reading_list_bookmarks_migration" + File.separator + name); - Log.d(LOGTAG, "Opening file from assets: " + assetPath); - try { - return new BufferedInputStream(getInstrumentation().getContext().getAssets().open(assetPath)); - } catch (final FileNotFoundException e) { - throw new IllegalStateException("Declared input files must be provided", e); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testRestrictions.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testRestrictions.java deleted file mode 100644 index 8977aa177..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testRestrictions.java +++ /dev/null @@ -1,39 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertFalse; -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fAssertTrue; - -import org.mozilla.gecko.restrictions.Restrictable; -import org.mozilla.gecko.restrictions.Restrictions; -import org.mozilla.gecko.tests.helpers.GeckoHelper; - -public class testRestrictions extends UITest { - public void testRestrictions() { - GeckoHelper.blockForReady(); - - // No restrictions should be enforced when using a normal profile - for (Restrictable restrictable : Restrictable.values()) { - if (restrictable == Restrictable.BLOCK_LIST) { - assertFeatureDisabled(restrictable); - } else { - assertFeatureEnabled(restrictable); - } - } - } - - private void assertFeatureEnabled(Restrictable restrictable) { - fAssertTrue(String.format("Restrictable feature %s is enabled", restrictable.name), - Restrictions.isAllowed(getActivity(), restrictable) - ); - } - - private void assertFeatureDisabled(Restrictable restrictable) { - fAssertFalse(String.format("Restrictable feature %s is disabled", restrictable.name), - Restrictions.isAllowed(getActivity(), restrictable) - ); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testRuntimePermissionsAPI.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testRuntimePermissionsAPI.java deleted file mode 100644 index df192fc43..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testRuntimePermissionsAPI.java +++ /dev/null @@ -1,48 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.EventDispatcher; -import org.mozilla.gecko.util.EventCallback; -import org.mozilla.gecko.util.NativeEventListener; -import org.mozilla.gecko.util.NativeJSObject; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fFail; - -public class testRuntimePermissionsAPI extends JavascriptTest implements NativeEventListener { - public testRuntimePermissionsAPI() { - super("testRuntimePermissionsAPI.js"); - } - - @Override - public void setUp() throws Exception { - super.setUp(); - - EventDispatcher.getInstance().registerGeckoThreadListener(this, "RuntimePermissions:Prompt"); - } - - @Override - public void tearDown() throws Exception { - super.tearDown(); - - EventDispatcher.getInstance().unregisterGeckoThreadListener(this, "RuntimePermissions:Prompt"); - } - - @Override - public void handleMessage(String event, NativeJSObject message, EventCallback callback) { - mAsserter.is(event, "RuntimePermissions:Prompt", "Received RuntimePermissions:Prompt event"); - - try { - String[] permissions = message.getStringArray("permissions"); - mAsserter.is(3, permissions.length, "Received three permissions"); - - mAsserter.is("android.permission.CAMERA", permissions[0], "Received CAMERA permission"); - mAsserter.is("android.permission.WRITE_EXTERNAL_STORAGE", permissions[1], "Received WRITE_EXTERNAL_STORAGE permission"); - mAsserter.is("android.permission.RECORD_AUDIO", permissions[2], "Received RECORD_AUDIO permission"); - } catch (Exception e) { - fFail("Event does not contain expected data: " + e.getMessage()); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchHistoryProvider.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchHistoryProvider.java deleted file mode 100644 index 3c22703bc..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchHistoryProvider.java +++ /dev/null @@ -1,379 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import java.util.concurrent.Callable; - -import org.mozilla.gecko.db.BrowserContract; -import org.mozilla.gecko.db.BrowserContract.SearchHistory; -import org.mozilla.gecko.db.SearchHistoryProvider; - -import android.content.ContentProvider; -import android.content.ContentValues; -import android.database.Cursor; -import android.net.Uri; - -public class testSearchHistoryProvider extends ContentProviderTest { - - // Translations of "United Kingdom" in several different languages - private static final String[] testStrings = { - "An Ríocht Aontaithe", // Irish - "Angli", // Albanian - "Britanniarum Regnum", // Latin - "Britio", // Esperanto - "Büyük Britanya", // Turkish - "Egyesült Királyság", // Hungarian - "Erresuma Batua", // Basque - "Inggris Raya", // Indonesian - "Ir-Renju Unit", // Maltese - "Iso-Britannia", // Finnish - "Jungtinė Karalystė", // Lithuanian - "Lielbritānija", // Latvian - "Regatul Unit", // Romanian - "Regne Unit", // Catalan, Valencian - "Regno Unito", // Italian - "Royaume-Uni", // French - "Spojené království", // Czech - "Spojené kráľovstvo", // Slovak - "Storbritannia", // Norwegian - "Storbritannien", // Danish - "Suurbritannia", // Estonian - "Ujedinjeno Kraljevstvo", // Bosnian - "United Alaeze", // Igbo - "United Kingdom", // English - "Vereinigtes Königreich", // German - "Verenigd Koninkrijk", // Dutch - "Verenigde Koninkryk", // Afrikaans - "Vương quốc Anh", // Vietnamese - "Wayòm Ini", // Haitian, Haitian Creole - "Y Deyrnas Unedig", // Welsh - "Združeno kraljestvo", // Slovene - "Zjednoczone Królestwo", // Polish - "Ηνωμένο Βασίλειο", // Greek (modern) - "Великобритания", // Russian - "Нэгдсэн Вант Улс", // Mongolian - "Обединетото Кралство", // Macedonian - "Уједињено Краљевство", // Serbian - "Միացյալ Թագավորություն", // Armenian - "בריטניה", // Hebrew (modern) - "פֿאַראייניקטע מלכות", // Yiddish - "المملكة المتحدة", // Arabic - "برطانیہ", // Urdu - "پادشاهی متحده", // Persian (Farsi) - "यूनाइटेड किंगडम", // Hindi - "संयुक्त राज्य", // Nepali - "যুক্তরাজ্য", // Bengali, Bangla - "યુનાઇટેડ કિંગડમ", // Gujarati - "ஐக்கிய ராஜ்யம்", // Tamil - "สหราชอาณาจักร", // Thai - "ສະ​ຫະ​ປະ​ຊາ​ຊະ​ອາ​ນາ​ຈັກ", // Lao - "გაერთიანებული სამეფო", // Georgian - "イギリス", // Japanese - "联合王国" // Chinese - }; - - - private static final String DB_NAME = "searchhistory.db"; - - /** - * Boilerplate alert. - *

          - * Make sure this method is present and that it returns a new - * instance of your class. - */ - private static final Callable sProviderFactory = - new Callable() { - @Override - public ContentProvider call() { - return new SearchHistoryProvider(); - } - }; - - @Override - public void setUp() throws Exception { - super.setUp(sProviderFactory, BrowserContract.SEARCH_HISTORY_AUTHORITY, DB_NAME); - mTests.add(new TestInsert()); - mTests.add(new TestUnicodeQuery()); - mTests.add(new TestTimestamp()); - mTests.add(new TestLimit()); - mTests.add(new TestDelete()); - mTests.add(new TestIncrement()); - } - - public void testSearchHistory() throws Exception { - for (Runnable test : mTests) { - String testName = test.getClass().getSimpleName(); - setTestName(testName); - mAsserter.dumpLog( - "testBrowserProvider: Database empty - Starting " + testName + "."); - // Clear the db - mProvider.delete(SearchHistory.CONTENT_URI, null, null); - test.run(); - } - } - - /** - * Verify that we can pass a LIMIT clause using a query parameter. - */ - private class TestLimit extends TestCase { - @Override - public void test() throws Exception { - ContentValues cv; - for (int i = 0; i < testStrings.length; i++) { - cv = new ContentValues(); - cv.put(SearchHistory.QUERY, testStrings[i]); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - } - - final int limit = 5; - - // Test 1: Handle proper input. - - Uri uri = SearchHistory.CONTENT_URI - .buildUpon() - .appendQueryParameter(BrowserContract.PARAM_LIMIT, String.valueOf(limit)) - .build(); - - Cursor c = mProvider.query(uri, null, null, null, null); - try { - mAsserter.is(c.getCount(), limit, - String.format("Should have %d results", limit)); - } finally { - c.close(); - } - - // Test 2: Empty input yields all results. - - uri = SearchHistory.CONTENT_URI - .buildUpon() - .appendQueryParameter(BrowserContract.PARAM_LIMIT, "") - .build(); - - c = mProvider.query(uri, null, null, null, null); - try { - mAsserter.is(c.getCount(), testStrings.length, "Should have all results"); - } finally { - c.close(); - } - - // Test 3: Illegal params. - - String[] illegalParams = new String[] {"a", "-1"}; - boolean success = true; - - for (String param : illegalParams) { - success = true; - - uri = SearchHistory.CONTENT_URI - .buildUpon() - .appendQueryParameter(BrowserContract.PARAM_LIMIT, param) - .build(); - - try { - c = mProvider.query(uri, null, null, null, null); - success = false; - } catch(IllegalArgumentException e) { - // noop. - } finally { - if (c != null) { - c.close(); - } - } - - mAsserter.ok(success, "LIMIT", param + " should have been an invalid argument"); - } - - } - } - - /** - * Verify that we can insert values into the DB, including unicode. - */ - private class TestInsert extends TestCase { - @Override - public void test() throws Exception { - ContentValues cv; - for (int i = 0; i < testStrings.length; i++) { - cv = new ContentValues(); - cv.put(SearchHistory.QUERY, testStrings[i]); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - } - - final Cursor c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null); - try { - mAsserter.is(c.getCount(), testStrings.length, - "Should have one row for each insert"); - } finally { - c.close(); - } - } - } - - /** - * Verify that we can insert values into the DB, including unicode. - */ - private class TestUnicodeQuery extends TestCase { - @Override - public void test() throws Exception { - final String selection = SearchHistory.QUERY + " = ?"; - - for (int i = 0; i < testStrings.length; i++) { - final ContentValues cv = new ContentValues(); - cv.put(SearchHistory.QUERY, testStrings[i]); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - - final Cursor c = mProvider.query(SearchHistory.CONTENT_URI, null, selection, - new String[]{ testStrings[i] }, null); - try { - mAsserter.is(c.getCount(), 1, - "Should have one row for insert of " + testStrings[i]); - } finally { - c.close(); - } - } - } - } - - /** - * Verify that timestamps are updated on insert. - */ - private class TestTimestamp extends TestCase { - @Override - public void test() throws Exception { - String insertedTerm = "Courtside Seats"; - long insertStart; - long insertFinish; - long t1Db; - long t2Db; - - ContentValues cv = new ContentValues(); - cv.put(SearchHistory.QUERY, insertedTerm); - - // First check that the DB has a value that is close to the - // system time. - insertStart = System.currentTimeMillis(); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - insertFinish = System.currentTimeMillis(); - - final Cursor c1 = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null); - try { - c1.moveToFirst(); - t1Db = c1.getLong(c1.getColumnIndex(SearchHistory.DATE_LAST_VISITED)); - } finally { - c1.close(); - } - - mAsserter.dumpLog("First insert:"); - mAsserter.dumpLog(" insertStart " + insertStart); - mAsserter.dumpLog(" insertFinish " + insertFinish); - mAsserter.dumpLog(" t1Db " + t1Db); - mAsserter.ok(t1Db >= insertStart, "DATE_LAST_VISITED", - "Date last visited should be set on insert."); - mAsserter.ok(t1Db <= insertFinish, "DATE_LAST_VISITED", - "Date last visited should be set on insert."); - - cv = new ContentValues(); - cv.put(SearchHistory.QUERY, insertedTerm); - - insertStart = System.currentTimeMillis(); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - insertFinish = System.currentTimeMillis(); - - final Cursor c2 = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null); - try { - c2.moveToFirst(); - t2Db = c2.getLong(c2.getColumnIndex(SearchHistory.DATE_LAST_VISITED)); - } finally { - c2.close(); - } - - mAsserter.dumpLog("Second insert:"); - mAsserter.dumpLog(" insertStart " + insertStart); - mAsserter.dumpLog(" insertFinish " + insertFinish); - mAsserter.dumpLog(" t2Db " + t2Db); - - mAsserter.ok(t2Db >= insertStart, "DATE_LAST_VISITED", - "Date last visited should be set on insert."); - mAsserter.ok(t2Db <= insertFinish, "DATE_LAST_VISITED", - "Date last visited should be set on insert."); - mAsserter.ok(t2Db >= t1Db, "DATE_LAST_VISITED", - "Date last visited should be updated on key increment."); - } - } - - /** - * Verify that sending a delete command empties the database. - */ - private class TestDelete extends TestCase { - @Override - public void test() throws Exception { - String insertedTerm = "Courtside Seats"; - - ContentValues cv = new ContentValues(); - cv.put(SearchHistory.QUERY, insertedTerm); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - - final Cursor c1 = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null); - try { - mAsserter.is(c1.getCount(), 1, "Should have one value"); - mProvider.delete(SearchHistory.CONTENT_URI, null, null); - } finally { - c1.close(); - } - - final Cursor c2 = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null); - try { - mAsserter.is(c2.getCount(), 0, "Should be empty"); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - } finally { - c2.close(); - } - - final Cursor c3 = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null); - try { - mAsserter.is(c3.getCount(), 1, "Should have one value"); - } finally { - c3.close(); - } - } - } - - - /** - * Ensure that we only increment when the case matches. - */ - private class TestIncrement extends TestCase { - @Override - public void test() throws Exception { - ContentValues cv = new ContentValues(); - cv.put(SearchHistory.QUERY, "omaha"); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - - cv = new ContentValues(); - cv.put(SearchHistory.QUERY, "omaha"); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - - Cursor c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null); - try { - c.moveToFirst(); - mAsserter.is(c.getCount(), 1, "Should have one result"); - mAsserter.is(c.getInt(c.getColumnIndex(SearchHistory.VISITS)), 2, - "Counter should be 2"); - } finally { - c.close(); - } - - cv = new ContentValues(); - cv.put(SearchHistory.QUERY, "Omaha"); - mProvider.insert(SearchHistory.CONTENT_URI, cv); - c = mProvider.query(SearchHistory.CONTENT_URI, null, null, null, null); - try { - mAsserter.is(c.getCount(), 2, "Should have two results"); - } finally { - c.close(); - } - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchSuggestions.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchSuggestions.java deleted file mode 100644 index 6f82e5c51..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSearchSuggestions.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.mozilla.gecko.tests; - -import java.util.ArrayList; -import java.util.HashMap; - -import org.mozilla.gecko.R; -import org.mozilla.gecko.SuggestClient; -import org.mozilla.gecko.home.BrowserSearch; - -import android.content.Context; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import com.robotium.solo.Condition; - -/** - * Test for search suggestions. - * Sends queries from AwesomeBar input and verifies that suggestions match - * expected values. - */ -public class testSearchSuggestions extends BaseTest { - private static final int SUGGESTION_MAX = 3; - private static final int SUGGESTION_TIMEOUT = 15000; - - private static final String TEST_QUERY = "foo barz"; - private static final String SUGGESTION_TEMPLATE = "/robocop/robocop_suggestions.sjs?query=__searchTerms__"; - - public void testSearchSuggestions() { - // Mock the search system. - // The BrowserSearch UI only shows up once a non-empty - // search term is entered, but we swizzle in a new factory beforehand. - mockSuggestClientFactory(); - - blockForGeckoReady(); - - // Map of expected values. See robocop_suggestions.sjs. - final HashMap> suggestMap = new HashMap>(); - buildSuggestMap(suggestMap); - - focusUrlBar(); - - // At this point we rely on our swizzling having worked -- which relies - // on us not having previously run a search. - // The test will fail later if there's already a BrowserSearch object with a - // suggest client set, so fail here. - BrowserSearch browserSearch = (BrowserSearch) getBrowserSearch(); - mAsserter.ok(browserSearch == null || - browserSearch.mSuggestClient == null, - "There is no existing search client.", ""); - - // Now test the incremental suggestions. - for (int i = 0; i < TEST_QUERY.length(); i++) { - mActions.sendKeys(TEST_QUERY.substring(i, i+1)); - - final String query = TEST_QUERY.substring(0, i+1); - mSolo.waitForView(R.id.suggestion_text); - boolean success = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - // Get the first suggestion row. - ViewGroup suggestionGroup = (ViewGroup) getActivity().findViewById(R.id.suggestion_layout); - if (suggestionGroup == null) { - mAsserter.dumpLog("Fail: suggestionGroup is null."); - return false; - } - - final ArrayList expected = suggestMap.get(query); - for (int i = 0; i < expected.size(); i++) { - View queryChild = suggestionGroup.getChildAt(i); - if (queryChild == null || queryChild.getVisibility() == View.GONE) { - mAsserter.dumpLog("Fail: queryChild is null or GONE."); - return false; - } - - String suggestion = ((TextView) queryChild.findViewById(R.id.suggestion_text)).getText().toString(); - if (!suggestion.equals(expected.get(i))) { - mAsserter.dumpLog("Suggestion '" + suggestion + "' not equal to expected '" + expected.get(i) + "'."); - return false; - } - } - - return true; - } - }, SUGGESTION_TIMEOUT); - - mAsserter.is(success, true, "Results for query '" + query + "' matched expected suggestions"); - } - } - - private void buildSuggestMap(HashMap> suggestMap) { - // these values assume SUGGESTION_MAX = 3 - suggestMap.put("f", new ArrayList() {{ add("f"); add("facebook"); add("fandango"); add("frys"); }}); - suggestMap.put("fo", new ArrayList() {{ add("fo"); add("forever 21"); add("food network"); add("fox news"); }}); - suggestMap.put("foo", new ArrayList() {{ add("foo"); add("food network"); add("foothill college"); add("foot locker"); }}); - suggestMap.put("foo ", new ArrayList() {{ add("foo "); add("foo fighters"); add("foo bar"); add("foo bat"); }}); - suggestMap.put("foo b", new ArrayList() {{ add("foo b"); add("foo bar"); add("foo bat"); add("foo bay"); }}); - suggestMap.put("foo ba", new ArrayList() {{ add("foo ba"); add("foo bar"); add("foo bat"); add("foo bay"); }}); - suggestMap.put("foo bar", new ArrayList() {{ add("foo bar"); }}); - suggestMap.put("foo barz", new ArrayList() {{ add("foo barz"); }}); - } - - private void mockSuggestClientFactory() { - BrowserSearch.sSuggestClientFactory = new BrowserSearch.SuggestClientFactory() { - @Override - public SuggestClient getSuggestClient(Context context, String template, int timeout, int max) { - final String suggestTemplate = getAbsoluteRawUrl(SUGGESTION_TEMPLATE); - - // This one uses our template, and also doesn't check for network accessibility. - return new SuggestClient(context, suggestTemplate, SUGGESTION_TIMEOUT, Integer.MAX_VALUE, false); - } - }; - } -} - diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionHistory.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionHistory.java deleted file mode 100644 index 50d173461..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionHistory.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.tests.helpers.GeckoHelper; -import org.mozilla.gecko.tests.helpers.NavigationHelper; - -/** - * Tests that navigating through session history (ex: forward, back) sets the correct UI state. - */ -public class testSessionHistory extends UITest { - public void testSessionHistory() { - GeckoHelper.blockForReady(); - - String url = mStringHelper.ROBOCOP_BLANK_PAGE_01_URL; - NavigationHelper.enterAndLoadUrl(url); - mToolbar.assertTitle(url); - - url = mStringHelper.ROBOCOP_BLANK_PAGE_02_URL; - NavigationHelper.enterAndLoadUrl(url); - mToolbar.assertTitle(url); - - url = mStringHelper.ROBOCOP_BLANK_PAGE_03_URL; - NavigationHelper.enterAndLoadUrl(url); - mToolbar.assertTitle(url); - - NavigationHelper.goBack(); - mToolbar.assertTitle(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - - NavigationHelper.goBack(); - mToolbar.assertTitle(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL); - - NavigationHelper.goForward(); - mToolbar.assertTitle(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - - NavigationHelper.reload(); - mToolbar.assertTitle(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionOOMRestore.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionOOMRestore.java deleted file mode 100644 index 5646311b1..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionOOMRestore.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.mozilla.gecko.tests; - -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; -import android.os.Bundle; - -/** - * Tests session OOM restore behavior. - * - * Loads a session and tests that it is restored correctly. - */ -public class testSessionOOMRestore extends SessionTest { - private Session mSession; - private static final String PREFS_NAME = "GeckoApp"; - private static final String PREFS_ALLOW_STATE_BUNDLE = "allowStateBundle"; - - @Override - public void setActivityIntent(Intent intent) { - PageInfo home = new PageInfo(StringHelper.STATIC_ABOUT_HOME_URL); - PageInfo page1 = new PageInfo("page1"); - PageInfo page2 = new PageInfo("page2"); - PageInfo page3 = new PageInfo("page3"); - PageInfo page4 = new PageInfo("page4"); - PageInfo page5 = new PageInfo("page5"); - PageInfo page6 = new PageInfo("page6"); - - SessionTab tab1 = new SessionTab(0, home, page1, page2); - SessionTab tab2 = new SessionTab(1, home, page3, page4); - SessionTab tab3 = new SessionTab(2, home, page5, page6); - - mSession = new Session(1, tab1, tab2, tab3); - - String sessionString = buildSessionJSON(mSession); - writeProfileFile("sessionstore.js", sessionString); - - // This feature is pref-protected to prevent other apps from injecting - // a state bundle, so enable it here. - SharedPreferences prefs = getInstrumentation().getTargetContext() - .getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE); - prefs.edit().putBoolean(PREFS_ALLOW_STATE_BUNDLE, true).commit(); - - Bundle bundle = new Bundle(); - bundle.putString("privateSession", null); - intent.putExtra("stateBundle", bundle); - - super.setActivityIntent(intent); - } - - public void testSessionOOMRestore() throws Exception { - blockForGeckoReady(); - verifySessionTabs(mSession); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionOOMSave.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionOOMSave.java deleted file mode 100644 index f5e5ee099..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSessionOOMSave.java +++ /dev/null @@ -1,87 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; - -import com.robotium.solo.Condition; - -/** - * Tests session OOM save behavior. - * - * Builds a session and tests that the saved state is correct. - */ -public class testSessionOOMSave extends SessionTest { - private final static int SESSION_TIMEOUT = 25000; - - public void testSessionOOMSave() { - Actions.EventExpecter pageShowExpecter = mActions.expectGeckoEvent("Content:PageShow"); - pageShowExpecter.blockForEvent(); - pageShowExpecter.unregisterListener(); - - PageInfo home = new PageInfo(mStringHelper.ABOUT_HOME_URL); - PageInfo page1 = new PageInfo("page1"); - PageInfo page2 = new PageInfo("page2"); - PageInfo page3 = new PageInfo("page3"); - PageInfo page4 = new PageInfo("page4"); - PageInfo page5 = new PageInfo("page5"); - PageInfo page6 = new PageInfo("page6"); - - SessionTab tab1 = new SessionTab(0, home, page1, page2); - SessionTab tab2 = new SessionTab(1, home, page3, page4); - SessionTab tab3 = new SessionTab(2, home, page5, page6); - - final Session session = new Session(1, tab1, tab2, tab3); - - // Load the tabs into the browser - loadSessionTabs(session); - - // Verify sessionstore.js written by Gecko. The session write is - // delayed for certain interactions (such as changing the selected - // tab), so the file is repeatedly read until it matches the expected - // output. Because of the delay, this part of the test takes ~9 seconds - // to pass. - VerifyJSONCondition verifyJSONCondition = new VerifyJSONCondition(session); - boolean success = waitForCondition(verifyJSONCondition, SESSION_TIMEOUT); - if (success) { - mAsserter.ok(true, "verified session JSON", null); - } else { - mAsserter.ok(false, "failed to verify session JSON", - getStackTraceString(verifyJSONCondition.getLastException())); - } - } - - private class VerifyJSONCondition implements Condition { - private AssertException mLastException; - private final NonFatalAsserter mAsserter = new NonFatalAsserter(); - private final Session mSession; - - public VerifyJSONCondition(Session session) { - mSession = session; - } - - @Override - public boolean isSatisfied() { - try { - String sessionString = readProfileFile("sessionstore.js"); - if (sessionString == null) { - mLastException = new AssertException("Could not read sessionstore.js"); - return false; - } - - verifySessionJSON(mSession, sessionString, mAsserter); - } catch (AssertException e) { - mLastException = e; - return false; - } - return true; - } - - /** - * Gets the last AssertException thrown by verifySessionJSON(). - * - * This is useful to get the stack trace if the test fails. - */ - public AssertException getLastException() { - return mLastException; - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testShareLink.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testShareLink.java deleted file mode 100644 index 0df786136..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testShareLink.java +++ /dev/null @@ -1,265 +0,0 @@ -package org.mozilla.gecko.tests; - -import java.util.ArrayList; -import java.util.List; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.home.HomePager; - -import android.app.Activity; -import android.content.Intent; -import android.content.pm.PackageManager; -import android.content.pm.ResolveInfo; -import android.os.Build; -import android.view.View; -import android.view.ViewGroup; -import android.widget.AbsListView; -import android.widget.GridView; -import android.widget.ListView; -import android.widget.TextView; - -import com.robotium.solo.Condition; - -/** - * This test covers the opening and content of the Share Link pop-up list - * The test opens the Share menu from the app menu, the URL bar, a link context menu and the Awesomescreen tabs - */ -public class testShareLink extends AboutHomeTest { - String url; - String urlTitle = mStringHelper.ROBOCOP_BIG_LINK_TITLE; - - public void testShareLink() { - url = getAbsoluteUrl(mStringHelper.ROBOCOP_BIG_LINK_URL); - ArrayList shareOptions; - blockForGeckoReady(); - - // FIXME: This is a temporary hack workaround for a permissions problem. - openAboutHomeTab(AboutHomeTabs.HISTORY); - - inputAndLoadUrl(url); - verifyUrlBarTitle(url); // Waiting for page title to ensure the page is loaded - - selectMenuItem(mStringHelper.SHARE_LABEL); - if (Build.VERSION.SDK_INT >= 14) { - // Check for our own sync in the submenu. - waitForText("Sync$"); - } else { - waitForText("Share via"); - } - - // Get list of current available share activities and verify them - shareOptions = getShareOptions(); - ArrayList displayedOptions = getShareOptionsList(); - for (String option:shareOptions) { - // Verify if the option is present in the list of displayed share options - mAsserter.ok(optionDisplayed(option, displayedOptions), "Share option found", option); - } - - // Test share from the urlbar context menu - mSolo.goBack(); // Close the share menu - mSolo.clickLongOnText(urlTitle); - verifySharePopup(shareOptions,"urlbar"); - - // The link has a 60px height, so let's try to hit the middle - float top = mDriver.getGeckoTop() + 30 * mDevice.density; - float left = mDriver.getGeckoLeft() + mDriver.getGeckoWidth() / 2; - mSolo.clickLongOnScreen(left, top); - verifySharePopup("Share Link",shareOptions,"Link"); - - // Test the share popup in the Bookmarks page - openAboutHomeTab(AboutHomeTabs.BOOKMARKS); - - final ListView bookmarksList = findListViewWithTag(HomePager.LIST_TAG_BOOKMARKS); - mAsserter.is(waitForNonEmptyListToLoad(bookmarksList), true, "list is properly loaded"); - - int headerViewsCount = bookmarksList.getHeaderViewsCount(); - View bookmarksItem = bookmarksList.getChildAt(headerViewsCount); - if (bookmarksItem == null) { - mAsserter.dumpLog("no child at index " + headerViewsCount + "; waiting for one..."); - Condition listWaitCondition = new Condition() { - @Override - public boolean isSatisfied() { - if (bookmarksList.getChildAt(bookmarksList.getHeaderViewsCount()) == null) - return false; - return true; - } - }; - waitForCondition(listWaitCondition, MAX_WAIT_MS); - headerViewsCount = bookmarksList.getHeaderViewsCount(); - bookmarksItem = bookmarksList.getChildAt(headerViewsCount); - } - - mSolo.clickLongOnView(bookmarksItem); - verifySharePopup(shareOptions,"bookmarks"); - - // Prepopulate top sites with history items to overflow tiles. - // We are trying to move away from using reflection and doing more black-box testing. - inputAndLoadUrl(getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_01_URL)); - inputAndLoadUrl(getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_02_URL)); - inputAndLoadUrl(getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_03_URL)); - inputAndLoadUrl(getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_04_URL)); - if (mDevice.type.equals("tablet")) { - // Tablets have more tile spaces to fill. - inputAndLoadUrl(getAbsoluteUrl(mStringHelper.ROBOCOP_BLANK_PAGE_05_URL)); - inputAndLoadUrl(getAbsoluteUrl(mStringHelper.ROBOCOP_BOXES_URL)); - inputAndLoadUrl(getAbsoluteUrl(mStringHelper.ROBOCOP_SEARCH_URL)); - inputAndLoadUrl(getAbsoluteUrl(mStringHelper.ROBOCOP_TEXT_PAGE_URL)); - } - - // Test the share popup in Top Sites. - openAboutHomeTab(AboutHomeTabs.TOP_SITES); - - // Scroll down a bit so that the top sites list has more items on screen. - int width = mDriver.getGeckoWidth(); - int height = mDriver.getGeckoHeight(); - mActions.drag(width / 2, width / 2, height - 10, height / 2); - - ListView topSitesList = findListViewWithTag(HomePager.LIST_TAG_TOP_SITES); - mAsserter.is(waitForNonEmptyListToLoad(topSitesList), true, "list is properly loaded"); - View mostVisitedItem = topSitesList.getChildAt(topSitesList.getHeaderViewsCount()); - mSolo.clickLongOnView(mostVisitedItem); - verifySharePopup(shareOptions,"top_sites"); - - // Test the share popup in the history tab - openAboutHomeTab(AboutHomeTabs.HISTORY); - - ListView mostRecentList = findListViewWithTag(HomePager.LIST_TAG_HISTORY); - mAsserter.is(waitForNonEmptyListToLoad(mostRecentList), true, "list is properly loaded"); - - // Getting second child after header views because the first is the "Today" label - View mostRecentItem = mostRecentList.getChildAt(mostRecentList.getHeaderViewsCount() + 1); - mSolo.clickLongOnView(mostRecentItem); - verifySharePopup(shareOptions,"most recent"); - } - - public void verifySharePopup(ArrayList shareOptions, String openedFrom) { - verifySharePopup("Share", shareOptions, openedFrom); - } - - public void verifySharePopup(String shareItemText, ArrayList shareOptions, String openedFrom) { - waitForText(shareItemText); - mSolo.clickOnText(shareItemText); - waitForText("Share via"); - ArrayList displayedOptions = getSharePopupOption(); - for (String option:shareOptions) { - // Verify if the option is present in the list of displayed share options - mAsserter.ok(optionDisplayed(option, displayedOptions), "Share option for " + openedFrom + (openedFrom.equals("urlbar") ? "" : " item") + " found", option); - } - mSolo.goBack(); - /** - * Adding a wait for the page title to make sure the Awesomebar will be dismissed - * Because of Bug 712370 the Awesomescreen will be dismissed when the Share Menu is closed - * so there is no need for handling this different depending on where the share menu was invoked from - * TODO: Look more into why the delay is needed here now and it was working before - */ - waitForText(urlTitle); - } - - // Create a SEND intent and get the possible activities offered - public ArrayList getShareOptions() { - ArrayList shareOptions = new ArrayList<>(); - Activity currentActivity = getActivity(); - final Intent shareIntent = new Intent(Intent.ACTION_SEND); - shareIntent.putExtra(Intent.EXTRA_TEXT, url); - shareIntent.putExtra(Intent.EXTRA_SUBJECT, "Robocop Blank 01"); - shareIntent.setType("text/plain"); - PackageManager pm = currentActivity.getPackageManager(); - List activities = pm.queryIntentActivities(shareIntent, 0); - for (ResolveInfo activity : activities) { - shareOptions.add(activity.loadLabel(pm).toString()); - } - return shareOptions; - } - - // Traverse the group of views, adding strings from TextViews to the list. - private void getGroupTextViews(ViewGroup group, ArrayList list) { - for (int i = 0; i < group.getChildCount(); i++) { - View child = group.getChildAt(i); - if (child instanceof AbsListView) { - getGroupTextViews((AbsListView)child, list); - } else if (child instanceof ViewGroup) { - getGroupTextViews((ViewGroup)child, list); - } else if (child instanceof TextView) { - String viewText = ((TextView)child).getText().toString(); - if (viewText != null && viewText.length() > 0) { - list.add(viewText); - } - } - } - } - - // Traverse the group of views, adding strings from TextViews to the list. - // This override is for AbsListView, which has adapters. If adapters are - // available, it is better to use them so that child views that are not - // yet displayed can be examined. - private void getGroupTextViews(AbsListView group, ArrayList list) { - for (int i = 0; i < group.getAdapter().getCount(); i++) { - View child = group.getAdapter().getView(i, null, group); - if (child instanceof AbsListView) { - getGroupTextViews((AbsListView)child, list); - } else if (child instanceof ViewGroup) { - getGroupTextViews((ViewGroup)child, list); - } else if (child instanceof TextView) { - String viewText = ((TextView)child).getText().toString(); - if (viewText != null && viewText.length() > 0) { - list.add(viewText); - } - } - } - } - - public ArrayList getSharePopupOption() { - ArrayList displayedOptions = new ArrayList<>(); - AbsListView shareMenu = getDisplayedShareList(); - getGroupTextViews(shareMenu, displayedOptions); - return displayedOptions; - } - - public ArrayList getShareSubMenuOption() { - ArrayList displayedOptions = new ArrayList<>(); - AbsListView shareMenu = getDisplayedShareList(); - getGroupTextViews(shareMenu, displayedOptions); - return displayedOptions; - } - - public ArrayList getShareOptionsList() { - if (Build.VERSION.SDK_INT >= 14) { - return getShareSubMenuOption(); - } else { - return getSharePopupOption(); - } - } - - private boolean optionDisplayed(String shareOption, ArrayList displayedOptions) { - for (String displayedOption: displayedOptions) { - if (shareOption.equals(displayedOption)) { - return true; - } - } - return false; - } - - private AbsListView mViewGroup; - - private AbsListView getDisplayedShareList() { - mViewGroup = null; - boolean success = waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - ArrayList views = mSolo.getCurrentViews(); - for (View view : views) { - // List may be displayed in different view formats. - // On JB, GridView is common; on ICS-, ListView is common. - if (view instanceof ListView || - view instanceof GridView) { - mViewGroup = (AbsListView)view; - return true; - } - } - return false; - } - }, MAX_WAIT_MS); - mAsserter.ok(success,"Got the displayed share options?", "Got the share options view"); - return mViewGroup; - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSnackbarAPI.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSnackbarAPI.java deleted file mode 100644 index 893f98a51..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testSnackbarAPI.java +++ /dev/null @@ -1,52 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fFail; - -import org.mozilla.gecko.EventDispatcher; -import org.mozilla.gecko.util.EventCallback; -import org.mozilla.gecko.util.NativeEventListener; -import org.mozilla.gecko.util.NativeJSObject; - -public class testSnackbarAPI extends JavascriptTest implements NativeEventListener { - // Snackbar.LENGTH_INDEFINITE: To avoid tests depending on the android design support library - private static final int SNACKBAR_LENGTH_INDEFINITE = -2; - - public testSnackbarAPI() { - super("testSnackbarAPI.js"); - } - - @Override - public void handleMessage(String event, NativeJSObject message, EventCallback callback) { - mAsserter.is(event, "Snackbar:Show", "Received Snackbar:Show event"); - - try { - mAsserter.is(message.getString("message"), "This is a Snackbar", "Snackbar message"); - mAsserter.is(message.getInt("duration"), SNACKBAR_LENGTH_INDEFINITE, "Snackbar duration"); - - NativeJSObject action = message.getObject("action"); - - mAsserter.is(action.getString("label"), "Click me", "Snackbar action label"); - - } catch (Exception e) { - fFail("Event does not contain expected data: " + e.getMessage()); - } - } - - @Override - public void setUp() throws Exception { - super.setUp(); - - EventDispatcher.getInstance().registerGeckoThreadListener(this, "Snackbar:Show"); - } - - @Override - public void tearDown() throws Exception { - super.tearDown(); - - EventDispatcher.getInstance().unregisterGeckoThreadListener(this, "Snackbar:Show"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStateWhileLoading.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStateWhileLoading.java deleted file mode 100644 index 7f7b47450..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStateWhileLoading.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.tests.helpers.DeviceHelper; -import org.mozilla.gecko.tests.helpers.GeckoClickHelper; -import org.mozilla.gecko.tests.helpers.GeckoHelper; -import org.mozilla.gecko.tests.helpers.NavigationHelper; -import org.mozilla.gecko.tests.helpers.WaitHelper; - -/** - * This test ensures the back/forward state is correct when switching to loading pages - * to prevent regressions like Bug 1124190. - */ -public class testStateWhileLoading extends UITest { - public void testStateWhileLoading() { - if (!DeviceHelper.isTablet()) { - // This test case only covers tablets currently. - return; - } - - GeckoHelper.blockForReady(); - - NavigationHelper.enterAndLoadUrl(mStringHelper.ROBOCOP_LINK_TO_SLOW_LOADING); - - GeckoClickHelper.openCentralizedLinkInNewTab(); - - WaitHelper.waitForPageLoad(new Runnable() { - @Override - public void run() { - mTabStrip.switchToTab(1); - - // Assert that the state of the back button is correct - // after switching to the new (still loading) tab. - mToolbar.assertBackButtonIsNotEnabled(); - } - }); - - // Assert that the state of the back button is still correct after the page has loaded. - mToolbar.assertBackButtonIsNotEnabled(); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStumblerSetting.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStumblerSetting.java deleted file mode 100644 index ac551b97f..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testStumblerSetting.java +++ /dev/null @@ -1,90 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * * License, v. 2.0. If a copy of the MPL was not distributed with this - * * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.AppConstants; -import org.mozilla.gecko.preferences.GeckoPreferences; -import org.mozilla.mozstumbler.service.AppGlobals; -import android.content.BroadcastReceiver; -import android.content.Context; -import android.content.Intent; -import android.content.IntentFilter; - -import com.robotium.solo.Condition; - -/* - * This test enables (checkbox checked) the Fennec setting to contribute to MLS, then waits for - * a response Intent from the stumbler service to confirm it has started. Then, it disables the - * service in the setting, and waits for confirmation that the servie has stopped. - */ -public class testStumblerSetting extends BaseTest { - boolean mIsEnabled; - - public void testStumblerSetting() { - if (!AppConstants.MOZ_STUMBLER_BUILD_TIME_ENABLED) { - mAsserter.info("Checking stumbler build config.", "Skipping test as Stumbler is not enabled in this build."); - return; - } - - blockForGeckoReady(); - - selectMenuItem(mStringHelper.SETTINGS_LABEL); - mAsserter.ok(mSolo.waitForText(mStringHelper.SETTINGS_LABEL), - "The Settings menu did not load", mStringHelper.SETTINGS_LABEL); - - String section = "^" + mStringHelper.MOZILLA_SECTION_LABEL + "$"; - waitForEnabledText(section); - mSolo.clickOnText(section); - - String itemTitle = "^" + mStringHelper.LOCATION_SERVICES_LABEL + "$"; - boolean foundText = waitForPreferencesText(itemTitle); - mAsserter.ok(foundText, "Waiting for settings item " + itemTitle + " in section " + section, - "The " + itemTitle + " option is present in section " + section); - - BroadcastReceiver enabledDisabledReceiver = new BroadcastReceiver() { - @Override - public void onReceive(Context context, Intent intent) { - if (intent.getAction().equals(AppGlobals.ACTION_TEST_SETTING_ENABLED)) { - mIsEnabled = true; - } else { - mIsEnabled = false; - } - } - }; - - Context context = getInstrumentation().getTargetContext(); - IntentFilter intentFilter = new IntentFilter(AppGlobals.ACTION_TEST_SETTING_ENABLED); - intentFilter.addAction(AppGlobals.ACTION_TEST_SETTING_DISABLED); - context.registerReceiver(enabledDisabledReceiver, intentFilter); - - boolean checked = mSolo.isCheckBoxChecked(itemTitle); - try { - mAsserter.ok(!checked, "Checking stumbler setting is unchecked.", "Unchecked as expected."); - - waitForEnabledText(itemTitle); - mSolo.clickOnText(itemTitle); - - mSolo.waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return mIsEnabled; - } - }, 15000); - - mAsserter.ok(mIsEnabled, "Checking if stumbler became enabled.", "Stumbler is enabled."); - mSolo.clickOnText(itemTitle); - - mSolo.waitForCondition(new Condition() { - @Override - public boolean isSatisfied() { - return !mIsEnabled; - } - }, 15000); - - mAsserter.ok(!mIsEnabled, "Checking if stumbler became disabled.", "Stumbler is disabled."); - } finally { - context.unregisterReceiver(enabledDisabledReceiver); - } - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testThumbnails.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testThumbnails.java deleted file mode 100644 index 6cb42f37c..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testThumbnails.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.db.BrowserDB; - -import android.content.ContentResolver; -import android.graphics.Color; - -import com.robotium.solo.Condition; - -/** - * Test for thumbnail updates. - * - loads 2 pages, each of which yield an HTTP 200 - * - verifies thumbnails are updated for both pages - * - loads pages again; first page yields HTTP 200, second yields HTTP 404 - * - verifies thumbnail is updated for HTTP 200, but not HTTP 404 - * - finally, test that BrowserDB.removeThumbnails drops the thumbnails - */ -public class testThumbnails extends BaseTest { - public void testThumbnails() { - final String site1Url = getAbsoluteUrl("/robocop/robocop_404.sjs?type=changeColor"); - final String site2Url = getAbsoluteUrl("/robocop/robocop_404.sjs?type=do404"); - final String site1Title = "changeColor"; - final String site2Title = "do404"; - - // the session snapshot runnable is run 500ms after document stop. a - // 3000ms delay gives us 2.5 seconds to take the screenshot, which - // should be plenty of time, even on slow devices - final int thumbnailDelay = 3000; - - blockForGeckoReady(); - - // load sites; both will return HTTP 200 with a green background - inputAndLoadUrl(site1Url); - mSolo.sleep(thumbnailDelay); - inputAndLoadUrl(site2Url); - mSolo.sleep(thumbnailDelay); - inputAndLoadUrl(mStringHelper.ABOUT_HOME_URL); - waitForCondition(new ThumbnailTest(site1Title, Color.GREEN), 5000); - mAsserter.is(getTopSiteThumbnailColor(site1Title), Color.GREEN, "Top site thumbnail updated for HTTP 200"); - waitForCondition(new ThumbnailTest(site2Title, Color.GREEN), 5000); - mAsserter.is(getTopSiteThumbnailColor(site2Title), Color.GREEN, "Top site thumbnail updated for HTTP 200"); - - // load sites again; both will have red background, and do404 will return HTTP 404 - inputAndLoadUrl(site1Url); - mSolo.sleep(thumbnailDelay); - inputAndLoadUrl(site2Url); - mSolo.sleep(thumbnailDelay); - inputAndLoadUrl(mStringHelper.ABOUT_HOME_URL); - waitForCondition(new ThumbnailTest(site1Title, Color.RED), 5000); - mAsserter.is(getTopSiteThumbnailColor(site1Title), Color.RED, "Top site thumbnail updated for HTTP 200"); - waitForCondition(new ThumbnailTest(site2Title, Color.GREEN), 5000); - mAsserter.is(getTopSiteThumbnailColor(site2Title), Color.GREEN, "Top site thumbnail not updated for HTTP 404"); - - // test dropping thumbnails - final ContentResolver resolver = getActivity().getContentResolver(); - final DatabaseHelper helper = new DatabaseHelper(getActivity(), mAsserter); - final BrowserDB db = helper.getProfileDB(); - - // check that the thumbnail is non-null - byte[] thumbnailData = db.getThumbnailForUrl(resolver, site1Url); - mAsserter.ok(thumbnailData != null && thumbnailData.length > 0, "Checking for thumbnail data", "No thumbnail data found"); - // drop thumbnails - db.removeThumbnails(resolver); - // check that the thumbnail is now null - thumbnailData = db.getThumbnailForUrl(resolver, site1Url); - mAsserter.ok(thumbnailData == null || thumbnailData.length == 0, "Checking for thumbnail data", "Thumbnail data found"); - } - - private class ThumbnailTest implements Condition { - private final String mTitle; - private final int mColor; - - public ThumbnailTest(String title, int color) { - mTitle = title; - mColor = color; - } - - @Override - public boolean isSatisfied() { - return getTopSiteThumbnailColor(mTitle) == mColor; - } - } - - private int getTopSiteThumbnailColor(String title) { - // This test is not currently run, so this just needs to compile. - return -1; -// ViewGroup topSites = (ViewGroup) getActivity().findViewById(mTopSitesId); -// if (topSites != null) { -// final int childCount = topSites.getChildCount(); -// for (int i = 0; i < childCount; i++) { -// View child = topSites.getChildAt(i); -// if (child != null) { -// TextView titleView = (TextView) child.findViewById(R.id.title); -// if (titleView != null) { -// if (titleView.getText().equals(title)) { -// ImageView thumbnailView = (ImageView) child.findViewById(R.id.thumbnail); -// if (thumbnailView != null) { -// Bitmap thumbnail = ((BitmapDrawable) thumbnailView.getDrawable()).getBitmap(); -// return thumbnail.getPixel(0, 0); -// } else { -// mAsserter.dumpLog("getTopSiteThumbnailColor: unable to find mThumbnailId: "+R.id.thumbnail); -// } -// } -// } else { -// mAsserter.dumpLog("getTopSiteThumbnailColor: unable to find R.id.title: "+R.id.title); -// } -// } else { -// mAsserter.dumpLog("getTopSiteThumbnailColor: skipped null child at index "+i); -// } -// } -// } else { -// mAsserter.dumpLog("getTopSiteThumbnailColor: unable to find mTopSitesId: " + mTopSitesId); -// } -// return -1; - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testTrackingProtection.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testTrackingProtection.java deleted file mode 100644 index c27ff0094..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testTrackingProtection.java +++ /dev/null @@ -1,65 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.fFail; - -import org.mozilla.gecko.EventDispatcher; -import org.mozilla.gecko.GeckoApp; -import org.mozilla.gecko.GeckoAppShell; -import org.mozilla.gecko.util.GeckoEventListener; - -import org.json.JSONException; -import org.json.JSONObject; - -public class testTrackingProtection extends JavascriptTest implements GeckoEventListener { - private String mLastTracking; - - public testTrackingProtection() { - super("testTrackingProtection.js"); - } - - @Override - public void handleMessage(String event, final JSONObject message) { - if (event.equals("Content:SecurityChange")) { - try { - JSONObject identity = message.getJSONObject("identity"); - JSONObject mode = identity.getJSONObject("mode"); - mLastTracking = mode.getString("tracking"); - mAsserter.dumpLog("Security change (tracking): " + mLastTracking); - } catch (Exception e) { - fFail("Can't extract tracking state from JSON"); - } - } - - if (event.equals("Test:Expected")) { - try { - String expected = message.getString("expected"); - mAsserter.is(mLastTracking, expected, "Tracking matched expectation"); - mAsserter.dumpLog("Testing (tracking): " + mLastTracking + " = " + expected); - } catch (Exception e) { - fFail("Can't extract expected state from JSON"); - } - } - } - - @Override - public void setUp() throws Exception { - super.setUp(); - - EventDispatcher.getInstance().registerGeckoThreadListener(this, - "Content:SecurityChange", - "Test:Expected"); - } - - @Override - public void tearDown() throws Exception { - super.tearDown(); - - EventDispatcher.getInstance().unregisterGeckoThreadListener(this, - "Content:SecurityChange", - "Test:Expected"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testUITelemetry.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testUITelemetry.java deleted file mode 100644 index 30d7c169c..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testUITelemetry.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.AppConstants; -import org.mozilla.gecko.PrefsHelper; -import org.mozilla.gecko.Telemetry; -import org.mozilla.gecko.TelemetryContract.Event; -import org.mozilla.gecko.TelemetryContract.Method; -import org.mozilla.gecko.TelemetryContract.Reason; -import org.mozilla.gecko.TelemetryContract.Session; - -import android.util.Log; - -public class testUITelemetry extends JavascriptTest { - public testUITelemetry() { - super("testUITelemetry.js"); - } - - @Override - public void testJavascript() throws Exception { - blockForGeckoReady(); - - // We can't run these tests unless telemetry is turned on -- - // the events will be dropped on the floor. - Log.i("GeckoTest", "Enabling telemetry."); - PrefsHelper.setPref(AppConstants.TELEMETRY_PREF_NAME, true); - - Log.i("GeckoTest", "Adding telemetry events."); - try { - Telemetry.sendUIEvent(Event._TEST1, Method._TEST1); - Telemetry.startUISession(Session._TEST_STARTED_TWICE); - Telemetry.sendUIEvent(Event._TEST2, Method._TEST1); - - // We can only start one session per name, so this call should be ignored. - Telemetry.startUISession(Session._TEST_STARTED_TWICE); - - Telemetry.sendUIEvent(Event._TEST2, Method._TEST2); - Telemetry.startUISession(Session._TEST_STOPPED_TWICE); - Telemetry.sendUIEvent(Event._TEST3, Method._TEST1, "foobarextras"); - Telemetry.stopUISession(Session._TEST_STARTED_TWICE, Reason._TEST1); - Telemetry.sendUIEvent(Event._TEST4, Method._TEST1, "barextras"); - Telemetry.stopUISession(Session._TEST_STOPPED_TWICE, Reason._TEST2); - - // This session is already stopped, so this call should be ignored. - Telemetry.stopUISession(Session._TEST_STOPPED_TWICE, Reason._TEST_IGNORED); - - // Method defaults to Method.NONE - Telemetry.sendUIEvent(Event._TEST1); - } catch (Exception e) { - Log.e("GeckoTest", "Oops.", e); - } - - Log.i("GeckoTest", "Running remaining JS test code."); - super.testJavascript(); - } -} - diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testUnifiedTelemetryClientId.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testUnifiedTelemetryClientId.java deleted file mode 100644 index aaaded4c8..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testUnifiedTelemetryClientId.java +++ /dev/null @@ -1,265 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -package org.mozilla.gecko.tests; - -import static org.mozilla.gecko.tests.helpers.AssertionHelper.*; - -import android.util.Log; -import org.json.JSONException; -import org.json.JSONObject; -import org.mozilla.gecko.GeckoProfile; - -import java.io.File; -import java.io.IOException; -import java.util.UUID; - -public class testUnifiedTelemetryClientId extends JavascriptBridgeTest { - private static final String TEST_JS = "testUnifiedTelemetryClientId.js"; - - private static final String CLIENT_ID_PATH = "datareporting/state.json"; - private static final String FHR_DIR_PATH = "healthreport/"; - private static final String FHR_CLIENT_ID_PATH = FHR_DIR_PATH + "state.json"; - - private GeckoProfile profile; - private File profileDir; - private File[] filesToDeleteOnReset; - - public void setUp() throws Exception { - super.setUp(); - profile = getTestProfile(); - profileDir = profile.getDir(); // Assumes getDir is tested. - filesToDeleteOnReset = new File[] { - getClientIdFile(), - getFHRClientIdFile(), - getFHRClientIdParentDir(), - }; - } - - public void tearDown() throws Exception { - // Don't clear cache because who knows what state Gecko is in. - deleteClientIDFiles(); - super.tearDown(); - } - - private void deleteClientIDFiles() { - Log.d(LOGTAG, "deleteClientIDFiles: begin"); - - for (final File file : filesToDeleteOnReset) { - file.delete(); // can't check return value because the file may not exist before deletion. - fAssertFalse("Deleted file in reset does not exist", file.exists()); // sanity check. - } - - Log.d(LOGTAG, "deleteClientIDFiles: end"); - } - - public void testUnifiedTelemetryClientId() throws Exception { - blockForReadyAndLoadJS(TEST_JS); - fAssertTrue("Profile directory exists", profileDir.exists()); - - // Important note: we cannot stop Gecko from running while we run this test and - // Gecko is capable of creating client ID files while we run this test. However, - // ClientID.jsm will not touch modify the client ID files on disk if its client - // ID cache is filled. As such, we prevent it from touching the disk by intentionally - // priming the cache & deleting the files it added now, and resetting the cache at the - // latest possible moment before we attempt to test the client ID file. - // - // This is fragile because it relies on the ClientID cache's implementation, however, - // some alternatives (e.g. changing file system permissions, file locking) are worse - // because they can fire error handling code, which is not currently under test. - // - // First, we delete the test files - we don't want the cache prime to fail which could happen if - // these files are around & corrupted from a previous test/install. Then we prime the cache, - // and delete the files the cache priming added, so the tests are ready to add their own version - // of these files. - deleteClientIDFiles(); - primeJsClientIdCache(); - deleteClientIDFiles(); - - // TODO: If these tests weren't so expensive to run in automation, - // this should be two separate tests to avoid storing state between tests. - testJavaCreatesClientId(); // leaves cache filled. - deleteClientIDFiles(); - testJsCreatesClientId(); // leaves cache filled. - deleteClientIDFiles(); - testJavaMigratesFromHealthReport(); // leaves cache filled. - deleteClientIDFiles(); - testJsMigratesFromHealthReport(); // leaves cache filled. - - getJS().syncCall("endTest"); - } - - /** - * Scenario: Java creates client ID: - * * Fennec starts on fresh profile - * * Java code creates the client ID in datareporting/state.json - * * Js accesses client ID from the same file - * * Assert the client IDs are the same - */ - private void testJavaCreatesClientId() throws Exception { - Log.d(LOGTAG, "testJavaCreatesClientId: start"); - - fAssertFalse("Client id file does not exist yet", getClientIdFile().exists()); - - final String clientIdFromJava = getClientIdFromJava(); - resetJSCache(); - final String clientIdFromJS = getClientIdFromJS(); - // allow for the case where gecko updates the client ID after the first get - final String clientIdFromJavaAgain = getClientIdFromJava(); - fAssertTrue("Client ID from Java equals ID from JS", - clientIdFromJava.equals(clientIdFromJS) || - clientIdFromJavaAgain.equals(clientIdFromJS)); - - final String clientIdFromJSCache = getClientIdFromJS(); - resetJSCache(); - final String clientIdFromJSFileAgain = getClientIdFromJS(); - fAssertEquals("Same client ID retrieved from JS cache", clientIdFromJavaAgain, clientIdFromJSCache); - fAssertEquals("Same client ID retrieved from JS file", clientIdFromJavaAgain, clientIdFromJSFileAgain); - } - - /** - * Scenario: JS creates client ID - * * Fennec starts on a fresh profile - * * Js creates the client ID in datareporting/state.json - * * Java access the client ID from the same file - * * Assert the client IDs are the same - */ - private void testJsCreatesClientId() throws Exception { - Log.d(LOGTAG, "testJsCreatesClientId: start"); - - fAssertFalse("Client id file does not exist yet", getClientIdFile().exists()); - - resetJSCache(); - final String clientIdFromJS = getClientIdFromJS(); - final String clientIdFromJava = getClientIdFromJava(); - fAssertEquals("Client ID from JS equals ID from Java", clientIdFromJS, clientIdFromJava); - - final String clientIdFromJSCache = getClientIdFromJS(); - final String clientIdFromJavaAgain = getClientIdFromJava(); - resetJSCache(); - final String clientIdFromJSFileAgain = getClientIdFromJS(); - fAssertEquals("Same client ID retrieved from JS cache", clientIdFromJS, clientIdFromJSCache); - fAssertEquals("Same client ID retrieved from JS file", clientIdFromJS, clientIdFromJSFileAgain); - fAssertEquals("Same client ID retrieved from Java", clientIdFromJS, clientIdFromJavaAgain); - } - - /** - * Scenario: Java migrates client ID from FHR client ID file. - * * FHR file already exists. - * * Fennec starts on fresh profile - * * Java code merges client ID to datareporting/state.json from healthreport/state.json - * * Js accesses client ID from the same file - * * Assert the client IDs are the same - */ - private void testJavaMigratesFromHealthReport() throws Exception { - Log.d(LOGTAG, "testJavaMigratesFromHealthReport: start"); - - fAssertFalse("Client id file does not exist yet", getClientIdFile().exists()); - fAssertFalse("Health report file does not exist yet", getFHRClientIdFile().exists()); - - final String expectedClientId = UUID.randomUUID().toString(); - createFHRClientIdFile(expectedClientId); - - final String clientIdFromJava = getClientIdFromJava(); - fAssertEquals("Health report client ID merged by Java", expectedClientId, clientIdFromJava); - resetJSCache(); - final String clientIdFromJS = getClientIdFromJS(); - fAssertEquals("Merged client ID read by JS", expectedClientId, clientIdFromJS); - - final String clientIdFromJavaAgain = getClientIdFromJava(); - final String clientIdFromJSCache = getClientIdFromJS(); - resetJSCache(); - final String clientIdFromJSFileAgain = getClientIdFromJS(); - fAssertEquals("Same client ID retrieved from Java", expectedClientId, clientIdFromJavaAgain); - fAssertEquals("Same client ID retrieved from JS cache", expectedClientId, clientIdFromJSCache); - fAssertEquals("Same client ID retrieved from JS file", expectedClientId, clientIdFromJSFileAgain); - } - - /** - * Scenario: JS merges client ID from FHR client ID file. - * * FHR file already exists. - * * Fennec starts on a fresh profile - * * Js merges the client ID to datareporting/state.json from healthreport/state.json - * * Java access the client ID from the same file - * * Assert the client IDs are the same - */ - private void testJsMigratesFromHealthReport() throws Exception { - Log.d(LOGTAG, "testJsMigratesFromHealthReport: start"); - - fAssertFalse("Client id file does not exist yet", getClientIdFile().exists()); - fAssertFalse("Health report file does not exist yet", getFHRClientIdFile().exists()); - - final String expectedClientId = UUID.randomUUID().toString(); - createFHRClientIdFile(expectedClientId); - - resetJSCache(); - final String clientIdFromJS = getClientIdFromJS(); - fAssertEquals("Health report client ID merged by JS", expectedClientId, clientIdFromJS); - final String clientIdFromJava = getClientIdFromJava(); - fAssertEquals("Merged client ID read by Java", expectedClientId, clientIdFromJava); - - final String clientIdFromJavaAgain = getClientIdFromJava(); - final String clientIdFromJSCache = getClientIdFromJS(); - resetJSCache(); - final String clientIdFromJSFileAgain = getClientIdFromJS(); - fAssertEquals("Same client ID retrieved from Java", expectedClientId, clientIdFromJavaAgain); - fAssertEquals("Same client ID retrieved from JS cache", expectedClientId, clientIdFromJSCache); - fAssertEquals("Same client ID retrieved from JS file", expectedClientId, clientIdFromJSFileAgain); - } - - private String getClientIdFromJava() throws IOException { - // This assumes implementation details: it assumes the client ID - // file is created when Java attempts to retrieve it if it does not exist. - final String clientId = profile.getClientId(); - fAssertNotNull("Returned client ID is not null", clientId); - fAssertTrue("Client ID file exists after getClientId call", getClientIdFile().exists()); - return clientId; - } - - private String getClientIdFromJS() { - return getBlockingFromJsString("clientId"); - } - - /** - * Must be called after Gecko is loaded. - */ - private void primeJsClientIdCache() { - // Not the cleanest way, but it works. - getClientIdFromJS(); - } - - /** - * Resets the client ID cache in ClientID.jsm. This method *must* be called after - * Gecko is loaded or else this method will hang. - * - * Note: we do this for very specific reasons - see the comment in the test method - * ({@link #testUnifiedTelemetryClientId()}) for more. - */ - private void resetJSCache() { - // HACK: the backing JS method is a promise with no return value. Rather than writing a method - // to handle this (for time reasons), I call the get String method and don't access the return value. - getBlockingFromJsString("reset"); - } - - private File getClientIdFile() { - return new File(profileDir, CLIENT_ID_PATH); - } - - private File getFHRClientIdParentDir() { - return new File(profileDir, FHR_DIR_PATH); - } - - private File getFHRClientIdFile() { - return new File(profileDir, FHR_CLIENT_ID_PATH); - } - - private void createFHRClientIdFile(final String clientId) throws JSONException { - fAssertTrue("FHR directory created", getFHRClientIdParentDir().mkdirs()); - - final JSONObject obj = new JSONObject(); - obj.put("clientID", clientId); - profile.writeFile(FHR_CLIENT_ID_PATH, obj.toString()); - fAssertTrue("FHR client ID file exists after writing", getFHRClientIdFile().exists()); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVideoControls.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVideoControls.java deleted file mode 100644 index 5164815c4..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVideoControls.java +++ /dev/null @@ -1,9 +0,0 @@ -package org.mozilla.gecko.tests; - - - -public class testVideoControls extends JavascriptTest { - public testVideoControls() { - super("testVideoControls.js"); - } -} diff --git a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVkbOverlap.java b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVkbOverlap.java deleted file mode 100644 index f5a54a0e9..000000000 --- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testVkbOverlap.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.mozilla.gecko.tests; - -import org.mozilla.gecko.Actions; -import org.mozilla.gecko.PaintedSurface; - -import android.net.Uri; - -/** - * A test to ensure that when an input field is focused, it is not obscured by the VKB. - * - Loads a page with an input field past the bottom of the visible area. - * - scrolls down to make the input field visible at the bottom of the screen. - * - taps on the input field to bring up the VKB - * - verifies that the input field is still visible. - */ -public class testVkbOverlap extends PixelTest { - private static final int CURSOR_BLINK_PERIOD = 500; - private static final int LESS_THAN_CURSOR_BLINK_PERIOD = CURSOR_BLINK_PERIOD - 50; - private static final int PAGE_SETTLE_TIME = 5000; - - public void testVkbOverlap() { - blockForGeckoReady(); - testSetup("initial-scale=1.0, user-scalable=no", false); - testSetup("initial-scale=1.0", false); - testSetup("", "phone".equals(mDevice.type)); - } - - private void testSetup(String viewport, boolean shouldZoom) { - loadAndPaint(getAbsoluteUrl("/robocop/test_viewport.sjs?metadata=" + Uri.encode(viewport))); - - // scroll to the bottom of the page and let it settle - Actions.RepeatedEventExpecter paintExpecter = mActions.expectPaint(); - MotionEventHelper meh = new MotionEventHelper(getInstrumentation(), mDriver.getGeckoLeft(), mDriver.getGeckoTop()); - meh.dragSync(10, 150, 10, 50); - - // the input field has a green background, so let's count the number of green pixels - int greenPixelCount = 0; - - PaintedSurface painted = waitForPaint(paintExpecter); - paintExpecter.unregisterListener(); - try { - greenPixelCount = countGreenPixels(painted); - } finally { - painted.close(); - } - - mAsserter.ok(greenPixelCount > 0, "testInputVisible", "Found " + greenPixelCount + " green pixels after scrolling"); - - paintExpecter = mActions.expectPaint(); - // the input field should be in the bottom-left corner, so tap thereabouts - meh.tap(5, mDriver.getGeckoHeight() - 5); - - // After tapping in the input field, the page needs some time to do stuff, like draw and undraw the focus highlight - // on the input field, trigger the VKB, process any resulting events generated by the system, and scroll the page. So - // we give it a few seconds to do all that. We are sufficiently generous with our definition of "few seconds" to - // prevent intermittent test failures. - try { - Thread.sleep(PAGE_SETTLE_TIME); - } catch (InterruptedException ie) { - ie.printStackTrace(); - } - - // now that the focus is in the text field we will repaint every 500ms as the cursor blinks, so we need to use a smaller - // "no paints" threshold to consider the page painted - paintExpecter.blockUntilClear(LESS_THAN_CURSOR_BLINK_PERIOD); - paintExpecter.unregisterListener(); - painted = mDriver.getPaintedSurface(); - try { - // if the vkb scrolled into view as expected, then the number of green pixels now visible should be about the - // same as it was before, since the green pixels indicate the text input is in view. use a fudge factor of 0.9 to - // account for borders and such of the text input which might still be out of view. - int newCount = countGreenPixels(painted); - - // if zooming is allowed, the number of green pixels visible should have increased substantially - if (shouldZoom) { - mAsserter.ok(newCount > greenPixelCount * 1.5, "testVkbOverlap", "Found " + newCount + " green pixels after tapping; expected " + greenPixelCount); - } else { - mAsserter.ok((Math.abs(greenPixelCount - newCount) / greenPixelCount < 0.1), "testVkbOverlap", "Found " + newCount + " green pixels after tapping; expected " + greenPixelCount); - } - } finally { - painted.close(); - } - } - - private int countGreenPixels(PaintedSurface painted) { - int count = 0; - for (int y = painted.getHeight() - 1; y >= 0; y--) { - for (int x = painted.getWidth() - 1; x >= 0; x--) { - int pixel = painted.getPixelAt(x, y); - int r = (pixel >> 16) & 0xFF; - int g = (pixel >> 8) & 0xFF; - int b = (pixel & 0xFF); - if (g > (r + 0x30) && g > (b + 0x30)) { - // there's more green in this pixel than red or blue, so count it. - // the reason this is so hacky-looking is because even though green is supposed to - // be (r,g,b) = (0x00, 0x80, 0x00), the GL readback ends up coming back quite - // different. - count++; - } - // uncomment for debugging: - // if (pixel != -1) mAsserter.dumpLog("Pixel at " + x + ", " + y + ": " + Integer.toString(pixel, 16)); - } - } - return count; - } -} diff --git a/mobile/android/tests/browser/robocop/testAccessibleCarets.html b/mobile/android/tests/browser/robocop/testAccessibleCarets.html deleted file mode 100644 index 99ae949e4..000000000 --- a/mobile/android/tests/browser/robocop/testAccessibleCarets.html +++ /dev/null @@ -1,45 +0,0 @@ - - - ActionBar Handler and AccessibleCarets tests - - - - -

          Find my book
          -
          איפה האוטו שלי
          - -
          Open the door
          -
          תן לי מים
          - - - -


          - - - - -
          - -
          - -


          -
          3 45 678 90
          - - - diff --git a/mobile/android/tests/browser/robocop/testAccessibleCarets.js b/mobile/android/tests/browser/robocop/testAccessibleCarets.js deleted file mode 100644 index a71ed22ee..000000000 --- a/mobile/android/tests/browser/robocop/testAccessibleCarets.js +++ /dev/null @@ -1,323 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -"use strict"; - -var { classes: Cc, interfaces: Ci, utils: Cu } = Components; -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Messaging.jsm"); -Cu.import('resource://gre/modules/Geometry.jsm'); - -const ACCESSIBLECARET_PREF = "layout.accessiblecaret.enabled"; -const BASE_TEST_URL = "http://mochi.test:8888/tests/robocop/testAccessibleCarets.html"; -const DESIGNMODE_TEST_URL = "http://mochi.test:8888/tests/robocop/testAccessibleCarets2.html"; - -// Ensures Tabs are completely loaded, viewport and zoom constraints updated, etc. -const TAB_CHANGE_EVENT = "testAccessibleCarets:TabChange"; -const TAB_STOP_EVENT = "STOP"; - -const gChromeWin = Services.wm.getMostRecentWindow("navigator:browser"); - -/** - * Wait for and return, when an expected tab change event occurs. - * - * @param tabId, The id of the target tab we're observing. - * @param eventType, The event type we expect. - * @return {Promise} - * @resolves The tab change object, including the matched tab id and event. - */ -function do_promiseTabChangeEvent(tabId, eventType) { - return new Promise(resolve => { - let observer = (subject, topic, data) => { - let message = JSON.parse(data); - - if (message.event === eventType && message.tabId === tabId) { - Services.obs.removeObserver(observer, TAB_CHANGE_EVENT); - resolve(data); - } - } - - Services.obs.addObserver(observer, TAB_CHANGE_EVENT, false); - }); -} - -/** - * Selection methods vary if we have an input / textarea element, - * or if we have basic content. - */ -function isInputOrTextarea(element) { - return ((element instanceof Ci.nsIDOMHTMLInputElement) || - (element instanceof Ci.nsIDOMHTMLTextAreaElement)); -} - -/** - * Return the selection controller based on element. - */ -function elementSelection(element) { - return (isInputOrTextarea(element)) ? - element.editor.selection : - element.ownerDocument.defaultView.getSelection(); -} - -/** - * Select the requested character of a target element, w/o affecting focus. - */ -function selectElementChar(doc, element, char) { - if (isInputOrTextarea(element)) { - element.setSelectionRange(char, char + 1); - return; - } - - // Simple test cases designed firstChild == #text node. - let range = doc.createRange(); - range.setStart(element.firstChild, char); - range.setEnd(element.firstChild, char + 1); - - let selection = elementSelection(element); - selection.removeAllRanges(); - selection.addRange(range); -} - -/** - * Get longpress point. Determine the midpoint in the requested character of - * the content in the element. X will be midpoint from left to right. - * Y will be 1/3 of the height up from the bottom to account for both - * LTR and smaller RTL characters. ie: |X| vs. |א| - */ -function getCharPressPoint(doc, element, char, expected) { - // Select the first char in the element. - selectElementChar(doc, element, char); - - // Reality check selected char to expected. - let selection = elementSelection(element); - is(selection.toString(), expected, "Selected char should match expected char."); - - // Return a point where long press should select entire word. - let rect = selection.getRangeAt(0).getBoundingClientRect(); - let r = new Point(rect.left + (rect.width / 2), rect.bottom - (rect.height / 3)); - - return r; -} - -/** - * Long press an element (RTL/LTR) at its calculated first character - * position, and return the result. - * - * @param midPoint, The screen coord for the longpress. - * @return Selection state helper-result object. - */ -function getLongPressResult(browser, midPoint) { - let domWinUtils = browser.contentWindow. - QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils); - - // AccessibleCarets expect longtap between touchstart/end. - domWinUtils.sendTouchEventToWindow("touchstart", [0], [midPoint.x], [midPoint.y], - [1], [1], [0], [1], 1, 0); - domWinUtils.sendMouseEventToWindow("mouselongtap", midPoint.x, midPoint.y, - 0, 1, 0); - domWinUtils.sendTouchEventToWindow("touchend", [0], [midPoint.x], [midPoint.y], - [1], [1], [0], [1], 1, 0); - - let ActionBarHandler = gChromeWin.ActionBarHandler; - return { focusedElement: ActionBarHandler._targetElement, - text: ActionBarHandler._getSelectedText(), - selectionID: ActionBarHandler._selectionID, - }; -} - -/** - * Checks the Selection UI (ActionBar or FloatingToolbar) - * for the availability of an expected action. - * - * @param expectedActionID, The Selection UI action we expect to be available. - * @return Result boolean. - */ -function UIhasActionByID(expectedActionID) { - let actions = gChromeWin.ActionBarHandler._actionBarActions; - return actions.some(action => { - return action.id === expectedActionID; - }); -} - -/** - * Messages the ActionBarHandler to close the Selection UI. - */ -function closeSelectionUI() { - Services.obs.notifyObservers(null, "TextSelection:End", - JSON.stringify({selectionID: gChromeWin.ActionBarHandler._selectionID})); -} - -/** - * Main test method. - */ -add_task(function* testAccessibleCarets() { - // Wait to start loading our test page until after the initial browser tab is - // completely loaded. This allows each tab to complete its layer initialization, - // importantly, its viewport and zoomContraints info. - let BrowserApp = gChromeWin.BrowserApp; - yield do_promiseTabChangeEvent(BrowserApp.selectedTab.id, TAB_STOP_EVENT); - - // Ensure Gecko Selection and Touch carets are enabled. - Services.prefs.setBoolPref(ACCESSIBLECARET_PREF, true); - - // Load test page, wait for load completion, register cleanup. - let browser = BrowserApp.addTab(BASE_TEST_URL).browser; - let tab = BrowserApp.getTabForBrowser(browser); - yield do_promiseTabChangeEvent(tab.id, TAB_STOP_EVENT); - - do_register_cleanup(function cleanup() { - BrowserApp.closeTab(tab); - Services.prefs.clearUserPref(ACCESSIBLECARET_PREF); - }); - - // References to test document elements. - let doc = browser.contentDocument; - let ce_LTR_elem = doc.getElementById("LTRcontenteditable"); - let tc_LTR_elem = doc.getElementById("LTRtextContent"); - let i_LTR_elem = doc.getElementById("LTRinput"); - let ta_LTR_elem = doc.getElementById("LTRtextarea"); - - let ce_RTL_elem = doc.getElementById("RTLcontenteditable"); - let tc_RTL_elem = doc.getElementById("RTLtextContent"); - let i_RTL_elem = doc.getElementById("RTLinput"); - let ta_RTL_elem = doc.getElementById("RTLtextarea"); - - let ip_LTR_elem = doc.getElementById("LTRphone"); - let ip_RTL_elem = doc.getElementById("RTLphone"); - let bug1265750_elem = doc.getElementById("bug1265750"); - - // Locate longpress midpoints for test elements, ensure expactations. - let ce_LTR_midPoint = getCharPressPoint(doc, ce_LTR_elem, 0, "F"); - let tc_LTR_midPoint = getCharPressPoint(doc, tc_LTR_elem, 0, "O"); - let i_LTR_midPoint = getCharPressPoint(doc, i_LTR_elem, 0, "T"); - let ta_LTR_midPoint = getCharPressPoint(doc, ta_LTR_elem, 0, "W"); - - let ce_RTL_midPoint = getCharPressPoint(doc, ce_RTL_elem, 0, "א"); - let tc_RTL_midPoint = getCharPressPoint(doc, tc_RTL_elem, 0, "ת"); - let i_RTL_midPoint = getCharPressPoint(doc, i_RTL_elem, 0, "ל"); - let ta_RTL_midPoint = getCharPressPoint(doc, ta_RTL_elem, 0, "ה"); - - let ip_LTR_midPoint = getCharPressPoint(doc, ip_LTR_elem, 8, "2"); - let ip_RTL_midPoint = getCharPressPoint(doc, ip_RTL_elem, 9, "2"); - let bug1265750_midPoint = getCharPressPoint(doc, bug1265750_elem, 2, "7"); - - // Longpress various LTR content elements. Test focused element against - // expected, and selected text against expected. - let result = getLongPressResult(browser, ce_LTR_midPoint); - is(result.focusedElement, ce_LTR_elem, "Focused element should match expected."); - is(result.text, "Find", "Selected text should match expected text."); - - result = getLongPressResult(browser, tc_LTR_midPoint); - is(result.focusedElement, null, "No focused element is expected."); - is(result.text, "Open", "Selected text should match expected text."); - - result = getLongPressResult(browser, i_LTR_midPoint); - is(result.focusedElement, i_LTR_elem, "Focused element should match expected."); - is(result.text, "Type", "Selected text should match expected text."); - - result = getLongPressResult(browser, ta_LTR_midPoint); - is(result.focusedElement, ta_LTR_elem, "Focused element should match expected."); - is(result.text, "Words", "Selected text should match expected text."); - - result = getLongPressResult(browser, ip_LTR_midPoint); - is(result.focusedElement, ip_LTR_elem, "Focused element should match expected."); - is(result.text, "09876543210 .-.)(wp#*103410341", - "Selected phone number should match expected text."); - is(result.text.length, 30, - "Selected phone number length should match expected maximum."); - - result = getLongPressResult(browser, bug1265750_midPoint); - is(result.focusedElement, null, "Focused element should match expected."); - is(result.text, "3 45 678 90", - "Selected phone number should match expected text."); - - // Longpress various RTL content elements. Test focused element against - // expected, and selected text against expected. - result = getLongPressResult(browser, ce_RTL_midPoint); - is(result.focusedElement, ce_RTL_elem, "Focused element should match expected."); - is(result.text, "איפה", "Selected text should match expected text."); - - result = getLongPressResult(browser, tc_RTL_midPoint); - is(result.focusedElement, null, "No focused element is expected."); - is(result.text, "תן", "Selected text should match expected text."); - - result = getLongPressResult(browser, i_RTL_midPoint); - is(result.focusedElement, i_RTL_elem, "Focused element should match expected."); - is(result.text, "לרוץ", "Selected text should match expected text."); - - result = getLongPressResult(browser, ta_RTL_midPoint); - is(result.focusedElement, ta_RTL_elem, "Focused element should match expected."); - is(result.text, "הספר", "Selected text should match expected text."); - - result = getLongPressResult(browser, ip_RTL_midPoint); - is(result.focusedElement, ip_RTL_elem, "Focused element should match expected."); - is(result.text, "+972 3 7347514 ", - "Selected phone number should match expected text."); - - // Close Selection UI (ActionBar or FloatingToolbar) and complete test. - closeSelectionUI(); - ok(true, "Finished testAccessibleCarets tests."); -}); - -/** - * DesignMode test method. - */ -add_task(function* testAccessibleCarets_designMode() { - let BrowserApp = gChromeWin.BrowserApp; - - // Pre-populate the clipboard to ensure PASTE action available. - Cc["@mozilla.org/widget/clipboardhelper;1"]. - getService(Ci.nsIClipboardHelper).copyString("somethingMagical"); - - // Load test page, wait for load completion. - let browser = BrowserApp.addTab(DESIGNMODE_TEST_URL).browser; - let tab = BrowserApp.getTabForBrowser(browser, { selected: true }); - yield do_promiseTabChangeEvent(tab.id, TAB_STOP_EVENT); - - // References to test document elements, ActionBarHandler. - let doc = browser.contentDocument; - let tc_LTR_elem = doc.getElementById("LTRtextContent"); - let tc_RTL_elem = doc.getElementById("RTLtextContent"); - - // Locate longpress midpoints for test elements, ensure expactations. - let tc_LTR_midPoint = getCharPressPoint(doc, tc_LTR_elem, 5, "x"); - let tc_RTL_midPoint = getCharPressPoint(doc, tc_RTL_elem, 9, "ת"); - - let flavors = ["text/unicode"]; - let clipboardHasText = Services.clipboard.hasDataMatchingFlavors( - flavors, flavors.length, Ci.nsIClipboard.kGlobalClipboard); - is(clipboardHasText, true, "There should now be paste-able text in the clipboard."); - - // Toggle designMode on/off/on, check UI expectations. - ["on", "off"].forEach(designMode => { - doc.designMode = designMode; - - // Text content in a document, whether in designMode or not, never receives focus. - // Available ActionBar/FloatingToolbar UI actions should vary depending on mode. - - let result = getLongPressResult(browser, tc_LTR_midPoint); - is(result.focusedElement, null, "No focused element is expected."); - is(result.text, "existence", "Selected text should match expected text."); - is(UIhasActionByID("cut_action"), (designMode === "on"), - "CUT action UI Visibility should match designMode state."); - is(UIhasActionByID("paste_action"), (designMode === "on"), - "PASTE action UI Visibility should match designMode state."); - - result = getLongPressResult(browser, tc_RTL_midPoint); - is(result.focusedElement, null, "No focused element is expected."); - is(result.text, "אותו", "Selected text should match expected text."); - is(UIhasActionByID("cut_action"), (designMode === "on"), - "CUT action UI Visibility should match designMode state."); - is(UIhasActionByID("paste_action"), (designMode === "on"), - "PASTE action UI Visibility should match designMode state."); - }); - - // Close Selection UI (ActionBar or FloatingToolbar) and complete test. - closeSelectionUI(); - ok(true, "Finished testAccessibleCarets_designMode tests."); -}); - - -// Start all the test tasks. -run_next_test(); diff --git a/mobile/android/tests/browser/robocop/testAccessibleCarets2.html b/mobile/android/tests/browser/robocop/testAccessibleCarets2.html deleted file mode 100644 index fc1268462..000000000 --- a/mobile/android/tests/browser/robocop/testAccessibleCarets2.html +++ /dev/null @@ -1,23 +0,0 @@ - - - ActionBar Handler and AccessibleCarets tests for DesignMode - - - - -
          The existence of right-handed - neutrinos is theoretically well-motivated, as all other known fermions have - been observed with left and right chirality, and they can explain the - observed active neutrino masses in a natural way. -
          -


          - -
          זהו לא אותו הטקסט כפי למבחן שמאל לימין, - אבל מה לעזאזל? הסוקר שלי לעולם לא לתפוס אותי. אני רק תורם נחות מנסה להשתעשע קצת. -
          -


          - - - diff --git a/mobile/android/tests/browser/robocop/testBrowserDiscovery.js b/mobile/android/tests/browser/robocop/testBrowserDiscovery.js deleted file mode 100644 index 3b3421dc2..000000000 --- a/mobile/android/tests/browser/robocop/testBrowserDiscovery.js +++ /dev/null @@ -1,150 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -var { classes: Cc, interfaces: Ci, utils: Cu } = Components; - -Cu.import("resource://gre/modules/Services.jsm"); - -// We use a global variable to track the where the tests are happening -var browser; - -function setHandlerFunc(handler, test) { - browser.addEventListener("DOMLinkAdded", function linkAdded(event) { - browser.removeEventListener("DOMLinkAdded", linkAdded, false); - Services.tm.mainThread.dispatch(handler.bind(this, test), Ci.nsIThread.DISPATCH_NORMAL); - }, false); -} - -add_test(function setup_browser() { - let BrowserApp = Services.wm.getMostRecentWindow("navigator:browser").BrowserApp; - do_register_cleanup(function cleanup() { - BrowserApp.closeTab(BrowserApp.getTabForBrowser(browser)); - }); - - let url = "http://mochi.test:8888/tests/robocop/link_discovery.html"; - browser = BrowserApp.addTab(url, { selected: true, parentId: BrowserApp.selectedTab.id }).browser; - browser.addEventListener("load", function startTests(event) { - browser.removeEventListener("load", startTests, true); - Services.tm.mainThread.dispatch(run_next_test, Ci.nsIThread.DISPATCH_NORMAL); - }, true); -}); - -var searchDiscoveryTests = [ - { text: "rel search discovered" }, - { rel: "SEARCH", text: "rel is case insensitive" }, - { rel: "-search-", pass: false, text: "rel -search- not discovered" }, - { rel: "foo bar baz search quux", text: "rel may contain additional rels separated by spaces" }, - { href: "https://not.mozilla.com", text: "HTTPS ok" }, - { href: "ftp://not.mozilla.com", text: "FTP ok" }, - { href: "data:text/foo,foo", pass: false, text: "data URI not permitted" }, - { href: "javascript:alert(0)", pass: false, text: "JS URI not permitted" }, - { type: "APPLICATION/OPENSEARCHDESCRIPTION+XML", text: "type is case insensitve" }, - { type: " application/opensearchdescription+xml ", text: "type may contain extra whitespace" }, - { type: "application/opensearchdescription+xml; charset=utf-8", text: "type may have optional parameters (RFC2046)" }, - { type: "aapplication/opensearchdescription+xml", pass: false, text: "type should not be loosely matched" }, - { rel: "search search search", count: 1, text: "only one engine should be added" } -]; - -function execute_search_test(test) { - if (browser.engines) { - let matchCount = (!("count" in test) || browser.engines.length === test.count); - let matchTitle = (test.title == browser.engines[0].title); - ok(matchCount && matchTitle, test.text); - browser.engines = null; - } else { - ok(!test.pass, test.text); - } - run_next_test(); -} - -function prep_search_test(test) { - // Syncrhonously load the search service. - Services.search.getVisibleEngines(); - - setHandlerFunc(execute_search_test, test); - - let rel = test.rel || "search"; - let href = test.href || "http://so.not.here.mozilla.com/search.xml"; - let type = test.type || "application/opensearchdescription+xml"; - let title = test.title; - if (!("pass" in test)) { - test.pass = true; - } - - let head = browser.contentDocument.getElementById("linkparent"); - let link = browser.contentDocument.createElement("link"); - link.rel = rel; - link.href = href; - link.type = type; - link.title = title; - head.appendChild(link); -} - -var feedDiscoveryTests = [ - { text: "rel feed discovered" }, - { rel: "ALTERNATE", text: "rel is case insensitive" }, - { rel: "-alternate-", pass: false, text: "rel -alternate- not discovered" }, - { rel: "foo bar baz alternate quux", text: "rel may contain additional rels separated by spaces" }, - { href: "https://not.mozilla.com", text: "HTTPS ok" }, - { href: "ftp://not.mozilla.com", text: "FTP ok" }, - { href: "data:text/foo,foo", pass: false, text: "data URI not permitted" }, - { href: "javascript:alert(0)", pass: false, text: "JS URI not permitted" }, - { type: "application/rss+xml", text: "type can be RSS" }, - { type: "aPPliCAtion/RSS+xml", text: "type is case insensitve" }, - { type: " application/atom+xml ", text: "type may contain extra whitespace" }, - { type: "application/atom+xml; charset=utf-8", text: "type may have optional parameters (RFC2046)" }, - { type: "aapplication/atom+xml", pass: false, text: "type should not be loosely matched" }, - { rel: "alternate alternate alternate", count: 1, text: "only one feed should be added" } -]; - -function execute_feed_test(test) { - if (browser.feeds) { - let matchCount = (!("count" in test) || browser.feeds.length === test.count); - let matchTitle = (test.title == browser.feeds[0].title); - ok(matchCount && matchTitle, test.text); - browser.feeds = null; - } else { - ok(!test.pass, test.text); - } - run_next_test(); -} - -function prep_feed_test(test) { - setHandlerFunc(execute_feed_test, test); - - let rel = test.rel || "alternate"; - let href = test.href || "http://so.not.here.mozilla.com/feed.xml"; - let type = test.type || "application/atom+xml"; - let title = test.title; - if (!("pass" in test)) { - test.pass = true; - } - - let head = browser.contentDocument.getElementById("linkparent"); - let link = browser.contentDocument.createElement("link"); - link.rel = rel; - link.href = href; - link.type = type; - link.title = title; - head.appendChild(link); -} - -var searchTest; -while ((searchTest = searchDiscoveryTests.shift())) { - let title = searchTest.title || searchDiscoveryTests.length; - searchTest.title = title; - add_test(prep_search_test.bind(this, searchTest)); -} - -var feedTest; -while ((feedTest = feedDiscoveryTests.shift())) { - let title = feedTest.title || feedDiscoveryTests.length; - feedTest.title = title; - add_test(prep_feed_test.bind(this, feedTest)); -} - -run_next_test(); diff --git a/mobile/android/tests/browser/robocop/testEventDispatcher.js b/mobile/android/tests/browser/robocop/testEventDispatcher.js deleted file mode 100644 index f70d2fdae..000000000 --- a/mobile/android/tests/browser/robocop/testEventDispatcher.js +++ /dev/null @@ -1,44 +0,0 @@ -Components.utils.import("resource://gre/modules/Messaging.jsm"); - -var java = new JavaBridge(this); - -do_register_cleanup(() => { - java.disconnect(); -}); -do_test_pending(); - -function send_test_message(type) { - let innerObject = { - boolean: true, - booleanArray: [false, true], - int: 1, - intArray: [2, 3], - double: 0.5, - doubleArray: [1.5, 2.5], - null: null, - emptyString: "", - string: "foo", - stringArray: ["bar", "baz"], - } - - // Make a copy - let outerObject = JSON.parse(JSON.stringify(innerObject)); - - outerObject.type = type; - outerObject.object = innerObject; - outerObject.objectArray = [null, innerObject]; - - Messaging.sendRequest(outerObject); -} - -function send_message_for_response(type, response) { - Messaging.sendRequestForResult({ - type: type, - response: response, - }).then(result => do_check_eq(result, response), - error => do_check_eq(error, response)); -} - -function finish_test() { - do_test_finished(); -} diff --git a/mobile/android/tests/browser/robocop/testFilePicker.js b/mobile/android/tests/browser/robocop/testFilePicker.js deleted file mode 100644 index 69be415a5..000000000 --- a/mobile/android/tests/browser/robocop/testFilePicker.js +++ /dev/null @@ -1,73 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -const { classes: Cc, interfaces: Ci, utils: Cu } = Components; - -Cu.import("resource://gre/modules/Services.jsm"); - -add_test(function filepicker_open() { - let chromeWin = Services.wm.getMostRecentWindow("navigator:browser"); - - do_test_pending(); - - let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker); - fp.appendFilter("Martian files", "*.martian"); - fp.appendFilters(Ci.nsIFilePicker.filterAll); - fp.filterIndex = 0; - - let fpCallback = function(result) { - if (result == Ci.nsIFilePicker.returnOK || result == Ci.nsIFilePicker.returnReplace) { - do_print("File: " + fp.file.path); - is(fp.file.path, "/mnt/sdcard/my-favorite-martian.png", "Retrieve the right martian file!"); - - let files = fp.files; - while (files.hasMoreElements()) { - let file = files.getNext().QueryInterface(Ci.nsIFile); - do_print("File: " + file.path); - is(file.path, "/mnt/sdcard/my-favorite-martian.png", "Retrieve the right martian file from array!"); - } - - let file = fp.domFileOrDirectory; - do_print("DOMFile: " + file.mozFullPath); - is(file.mozFullPath, "/mnt/sdcard/my-favorite-martian.png", "Retrieve the right martian DOM File!"); - - let e = fp.domFileOrDirectoryEnumerator; - while (e.hasMoreElements()) { - let file = e.getNext(); - do_print("DOMFile: " + file.mozFullPath); - is(file.mozFullPath, "/mnt/sdcard/my-favorite-martian.png", "Retrieve the right martian file from domFileOrDirectoryEnumerator array!"); - } - - do_test_finished(); - - run_next_test(); - } - }; - - try { - fp.init(chromeWin, "Open", Ci.nsIFilePicker.modeOpen); - } catch(ex) { - ok(false, "Android should support FilePicker.modeOpen: " + ex); - } - fp.open(fpCallback); -}); - -add_test(function filepicker_save() { - let failed = false; - let fp = Cc["@mozilla.org/filepicker;1"].createInstance(Ci.nsIFilePicker); - try { - fp.init(null, "Save", Ci.nsIFilePicker.modeSave); - } catch(ex) { - failed = true; - } - ok(failed, "Android does not support FilePicker.modeSave"); - - run_next_test(); -}); - -run_next_test(); - diff --git a/mobile/android/tests/browser/robocop/testFindInPage.js b/mobile/android/tests/browser/robocop/testFindInPage.js deleted file mode 100644 index 485ae5e4e..000000000 --- a/mobile/android/tests/browser/robocop/testFindInPage.js +++ /dev/null @@ -1,89 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -var Cu = Components.utils; - -Cu.import("resource://gre/modules/Messaging.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); - -const TEST_URL = "http://mochi.test:8888/tests/robocop/robocop_text_page.html"; - -function promiseBrowserEvent(browser, eventType) { - return new Promise((resolve) => { - function handle(event) { - do_print("Received event " + eventType + " from browser"); - browser.removeEventListener(eventType, handle, true); - resolve(event); - } - - browser.addEventListener(eventType, handle, true); - do_print("Now waiting for " + eventType + " event from browser"); - }); -} - -function openTabWithUrl(url) { - do_print("Going to open " + url); - let browserApp = Services.wm.getMostRecentWindow("navigator:browser").BrowserApp; - let browser = browserApp.addTab(url, { selected: true, parentId: browserApp.selectedTab.id }).browser; - - return promiseBrowserEvent(browser, "load") - .then(() => { return browser; }); -} - -function findInPage(browser, text, nrOfMatches) { - let repaintPromise = promiseBrowserEvent(browser, "MozAfterPaint"); - do_print("Send findInPageMessage: " + text + " nth: " + nrOfMatches); - Messaging.sendRequest({ type: "Test:FindInPage", text: text, nrOfMatches: nrOfMatches }); - return repaintPromise; -} - -function closeFindInPage(browser) { - let repaintPromise = promiseBrowserEvent(browser, "MozAfterPaint"); - do_print("Send closeFindInPageMessage"); - Messaging.sendRequest({ type: "Test:CloseFindInPage" }); - return repaintPromise; -} - -function assertSelection(document, expectedSelection = false, expectedAnchorText = false) { - let sel = document.getSelection(); - if (!expectedSelection) { - do_print("Assert empty selection"); - do_check_eq(sel.toString(), ""); - } else { - do_print("Assert selection to be " + expectedSelection); - do_check_eq(sel.toString(), expectedSelection); - } - if (expectedAnchorText) { - do_print("Assert anchor text to be " + expectedAnchorText); - do_check_eq(sel.anchorNode.textContent, expectedAnchorText); - } -} - -add_task(function* testFindInPage() { - let browser = yield openTabWithUrl(TEST_URL); - let document = browser.contentDocument; - - yield findInPage(browser, "Robocoop", 1); - assertSelection(document); - - yield closeFindInPage(browser); - assertSelection(document); - - yield findInPage(browser, "Robocop", 1); - assertSelection(document, "Robocop", " Robocop 1 "); - - yield closeFindInPage(browser); - assertSelection(document); - - yield findInPage(browser, "Robocop", 3); - assertSelection(document, "Robocop", " Robocop 3 "); - - yield closeFindInPage(browser); - assertSelection(document); -}); - -run_next_test(); diff --git a/mobile/android/tests/browser/robocop/testGeckoRequest.js b/mobile/android/tests/browser/robocop/testGeckoRequest.js deleted file mode 100644 index cedaf825c..000000000 --- a/mobile/android/tests/browser/robocop/testGeckoRequest.js +++ /dev/null @@ -1,40 +0,0 @@ -Components.utils.import("resource://gre/modules/Messaging.jsm"); - -var java = new JavaBridge(this); - -do_register_cleanup(() => { - java.disconnect(); -}); -do_test_pending(); - -function add_request_listener(message) { - Messaging.addListener(function (data) { - return { result: data + "bar" }; - }, message); -} - -function add_exception_listener(message) { - Messaging.addListener(function (data) { - throw "error!"; - }, message); -} - -function add_second_request_listener(message) { - let exceptionCaught = false; - - try { - Messaging.addListener(() => {}, message); - } catch (e) { - exceptionCaught = true; - } - - do_check_true(exceptionCaught); -} - -function remove_request_listener(message) { - Messaging.removeListener(message); -} - -function finish_test() { - do_test_finished(); -} diff --git a/mobile/android/tests/browser/robocop/testHistoryService.js b/mobile/android/tests/browser/robocop/testHistoryService.js deleted file mode 100644 index 612928c4c..000000000 --- a/mobile/android/tests/browser/robocop/testHistoryService.js +++ /dev/null @@ -1,128 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -var { classes: Cc, interfaces: Ci, utils: Cu } = Components; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); - -// Make the timer global so it doesn't get GC'd -var gTimer = Cc["@mozilla.org/timer;1"].createInstance(Ci.nsITimer); - -function sleep(wait) { - return new Promise((resolve, reject) => { - do_print("sleep start"); - gTimer.initWithCallback({ - notify: function () { - do_print("sleep end"); - resolve(); - }, - }, wait, gTimer.TYPE_ONE_SHOT); - }); -} - -function promiseLoadEvent(browser, url, eventType="load") { - return new Promise((resolve, reject) => { - do_print("Wait browser event: " + eventType); - - function handle(event) { - // Since we'll be redirecting, don't make assumptions about the given URL and the loaded URL - if (event.target != browser.contentDocument || event.target.location.href == "about:blank") { - do_print("Skipping spurious '" + eventType + "' event" + " for " + event.target.location.href); - return; - } - - browser.removeEventListener(eventType, handle, true); - do_print("Browser event received: " + eventType); - resolve(event); - } - - browser.addEventListener(eventType, handle, true); - if (url) { - browser.loadURI(url); - } - }); -} - -// Wait 6 seconds for the pending visits to flush (which should happen in 3 seconds) -const PENDING_VISIT_WAIT = 6000; -// Longer wait required after first load -const PENDING_VISIT_WAIT_LONG = 20000; - -// Manage the saved history visits so we can compare in the tests -var gVisitURLs = []; -function visitObserver(subject, topic, data) { - let uri = subject.QueryInterface(Ci.nsIURI); - do_print("Observer: " + uri.spec); - gVisitURLs.push(uri.spec); -}; - -// Track the where the tests are happening -var gBrowser; - -add_test(function setup_browser() { - let chromeWin = Services.wm.getMostRecentWindow("navigator:browser"); - let BrowserApp = chromeWin.BrowserApp; - - do_register_cleanup(function cleanup() { - Services.obs.removeObserver(visitObserver, "link-visited"); - BrowserApp.closeTab(BrowserApp.getTabForBrowser(gBrowser)); - }); - - Services.obs.addObserver(visitObserver, "link-visited", false); - - // Load a blank page - let url = "about:blank"; - gBrowser = BrowserApp.addTab(url, { selected: true, parentId: BrowserApp.selectedTab.id }).browser; - gBrowser.addEventListener("load", function startTests(event) { - gBrowser.removeEventListener("load", startTests, true); - Services.tm.mainThread.dispatch(run_next_test, Ci.nsIThread.DISPATCH_NORMAL); - }, true); -}); - -add_task(function* () { - // Wait for any initial page loads to be saved to history - yield sleep(PENDING_VISIT_WAIT); - - // Load a simple HTML page with no redirects - gVisitURLs = []; - yield promiseLoadEvent(gBrowser, "http://example.org/tests/robocop/robocop_blank_01.html"); - yield sleep(PENDING_VISIT_WAIT_LONG); - - do_print("visit counts: " + gVisitURLs.length); - ok(gVisitURLs.length == 1, "Simple visit makes 1 history item"); - - do_print("visit URL: " + gVisitURLs[0]); - ok(gVisitURLs[0] == "http://example.org/tests/robocop/robocop_blank_01.html", "Simple visit makes final history item"); - - // Load a simple HTML page via a 301 temporary redirect - gVisitURLs = []; - yield promiseLoadEvent(gBrowser, "http://example.org/tests/robocop/simple_redirect.sjs?http://example.org/tests/robocop/robocop_blank_02.html"); - yield sleep(PENDING_VISIT_WAIT); - - do_print("visit counts: " + gVisitURLs.length); - ok(gVisitURLs.length == 1, "Simple 301 redirect makes 1 history item"); - - do_print("visit URL: " + gVisitURLs[0]); - ok(gVisitURLs[0] == "http://example.org/tests/robocop/robocop_blank_02.html", "Simple 301 redirect makes final history item"); - - // Load a simple HTML page via a JavaScript redirect - gVisitURLs = []; - yield promiseLoadEvent(gBrowser, "http://example.org/tests/robocop/javascript_redirect.sjs?http://example.org/tests/robocop/robocop_blank_03.html"); - yield sleep(PENDING_VISIT_WAIT); - - do_print("visit counts: " + gVisitURLs.length); - ok(gVisitURLs.length == 2, "JavaScript redirect makes 2 history items"); - - do_print("visit URL 1: " + gVisitURLs[0]); - ok(gVisitURLs[0] == "http://example.org/tests/robocop/javascript_redirect.sjs?http://example.org/tests/robocop/robocop_blank_03.html", "JavaScript redirect makes intermediate history item"); - - do_print("visit URL 2: " + gVisitURLs[1]); - ok(gVisitURLs[1] == "http://example.org/tests/robocop/robocop_blank_03.html", "JavaScript redirect makes final history item"); -}); - -run_next_test(); diff --git a/mobile/android/tests/browser/robocop/testJavascriptBridge.js b/mobile/android/tests/browser/robocop/testJavascriptBridge.js deleted file mode 100644 index 3bfd89f88..000000000 --- a/mobile/android/tests/browser/robocop/testJavascriptBridge.js +++ /dev/null @@ -1,52 +0,0 @@ -var java = new JavaBridge(this); -var javaResponded = false; - -do_register_cleanup(() => { - java.disconnect(); -}); -do_test_pending(); - -function check_js_int_arg(int1) { - // Sync call from Java - do_check_eq(int1, 1); - java.asyncCall("checkJavaIntArg", 2); -} - -function check_js_double_arg(double3) { - // Sync call from Java - do_check_eq(double3, 3.0); - java.asyncCall("checkJavaDoubleArg", 4.0); -} - -function check_js_boolean_arg(boolfalse) { - // Sync call from Java - do_check_eq(boolfalse, false); - java.asyncCall("checkJavaBooleanArg", true); -} - -function check_js_string_arg(stringfoo) { - do_check_eq(stringfoo, "foo"); - java.asyncCall("checkJavaStringArg", "bar"); -} - -function check_js_object_arg(obj) { - // Sync call from Java - do_check_eq(obj.caller, "java"); - java.asyncCall("checkJavaObjectArg", {caller: "js"}); -} - -function check_js_sync_call() { - // Sync call from Java - java.syncCall("doJSSyncCall"); - // respond_to_js_sync_call should have run by now because - // do_js_sync_call calls it from Java code - do_check_true(javaResponded); - - java.asyncCall("checkJSSyncCallReceived"); - // End of test - do_test_finished(); -} - -function respond_to_js_sync_call() { - javaResponded = true; -} diff --git a/mobile/android/tests/browser/robocop/testReaderCacheMigration.js b/mobile/android/tests/browser/robocop/testReaderCacheMigration.js deleted file mode 100644 index dbd5ae432..000000000 --- a/mobile/android/tests/browser/robocop/testReaderCacheMigration.js +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */ -/* vim:set ts=2 sw=2 sts=2 et: */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -Components.utils.import("resource://gre/modules/ReaderMode.jsm"); - -var java = new JavaBridge(this); - -do_register_cleanup(() => { - java.disconnect(); -}); -do_test_pending(); - -function check_hashed_path_matches(url, hashedPath) { - var jsHashedPath = ReaderMode._toHashedPath(url); - do_check_eq(hashedPath, jsHashedPath); -} - -function finish_test() { - do_test_finished(); -} \ No newline at end of file diff --git a/mobile/android/tests/browser/robocop/testReadingListCache.js b/mobile/android/tests/browser/robocop/testReadingListCache.js deleted file mode 100644 index d438dfb1e..000000000 --- a/mobile/android/tests/browser/robocop/testReadingListCache.js +++ /dev/null @@ -1,126 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -/*globals ReaderMode */ - -var { utils: Cu } = Components; - -Cu.import("resource://gre/modules/ReaderMode.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Task.jsm"); - -var Reader = Services.wm.getMostRecentWindow("navigator:browser").Reader; - -const URL_PREFIX = "http://mochi.test:8888/tests/robocop/reader_mode_pages/"; - -var TEST_PAGES = [ - { - url: URL_PREFIX + "basic_article.html", - expected: { - title: "Article title", - byline: "by Jane Doe", - excerpt: "This is the article description.", - } - }, - { - url: URL_PREFIX + "not_an_article.html", - expected: null - }, - { - url: URL_PREFIX + "developer.mozilla.org/en/XULRunner/Build_Instructions.html", - expected: { - title: "Building XULRunner", - byline: null, - excerpt: "XULRunner is built using basically the same process as Firefox or other applications. Please read and follow the general Build Documentation for instructions on how to get sources and set up build prerequisites.", - } - }, -]; - -add_task(function* test_article_not_found() { - let article = yield ReaderMode.getArticleFromCache(TEST_PAGES[0].url); - do_check_eq(article, null); -}); - -add_task(function* test_store_article() { - // Create an article object to store in the cache. - yield ReaderMode.storeArticleInCache({ - url: TEST_PAGES[0].url, - content: "Lorem ipsum", - title: TEST_PAGES[0].expected.title, - byline: TEST_PAGES[0].expected.byline, - excerpt: TEST_PAGES[0].expected.excerpt, - }); - - let article = yield ReaderMode.getArticleFromCache(TEST_PAGES[0].url); - checkArticle(article, TEST_PAGES[0]); -}); - -add_task(function* test_remove_article() { - yield ReaderMode.removeArticleFromCache(TEST_PAGES[0].url); - let article = yield ReaderMode.getArticleFromCache(TEST_PAGES[0].url); - do_check_eq(article, null); -}); - -add_task(function* test_parse_articles() { - for (let testcase of TEST_PAGES) { - let article = yield ReaderMode.downloadAndParseDocument(testcase.url); - checkArticle(article, testcase); - } -}); - -add_task(function* test_migrate_cache() { - // Store an article in the old indexedDB reader mode cache. - let cacheDB = yield new Promise((resolve, reject) => { - let win = Services.wm.getMostRecentWindow("navigator:browser"); - let request = win.indexedDB.open("about:reader", 1); - request.onerror = event => reject(request.error); - - // This will always happen because there is no pre-existing data store. - request.onupgradeneeded = event => { - let cacheDB = event.target.result; - cacheDB.createObjectStore("articles", { keyPath: "url" }); - }; - - request.onsuccess = event => resolve(event.target.result); - }); - - yield new Promise((resolve, reject) => { - let transaction = cacheDB.transaction(["articles"], "readwrite"); - let store = transaction.objectStore("articles"); - - let request = store.add({ - url: TEST_PAGES[0].url, - content: "Lorem ipsum", - title: TEST_PAGES[0].expected.title, - byline: TEST_PAGES[0].expected.byline, - excerpt: TEST_PAGES[0].expected.excerpt, - }); - request.onerror = event => reject(request.error); - request.onsuccess = event => resolve(); - }); - - // Migrate the cache. - yield Reader.migrateCache(); - - // Check to make sure the article made it into the new cache. - let article = yield ReaderMode.getArticleFromCache(TEST_PAGES[0].url); - checkArticle(article, TEST_PAGES[0]); -}); - -function checkArticle(article, testcase) { - if (testcase.expected == null) { - do_check_eq(article, null); - return; - } - - do_check_neq(article, null); - do_check_eq(!!article.content, true); // A bit of a hack to avoid spamming the test log. - do_check_eq(article.url, testcase.url); - do_check_eq(article.title, testcase.expected.title); - do_check_eq(article.byline, testcase.expected.byline); - do_check_eq(article.excerpt, testcase.expected.excerpt); -} - -run_next_test(); diff --git a/mobile/android/tests/browser/robocop/testRuntimePermissionsAPI.js b/mobile/android/tests/browser/robocop/testRuntimePermissionsAPI.js deleted file mode 100644 index d3f34b87d..000000000 --- a/mobile/android/tests/browser/robocop/testRuntimePermissionsAPI.js +++ /dev/null @@ -1,20 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -const { classes: Cc, interfaces: Ci, utils: Cu } = Components; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "RuntimePermissions", "resource://gre/modules/RuntimePermissions.jsm"); - -add_task(function* test_snackbar_api() { - RuntimePermissions.waitForPermissions([ - RuntimePermissions.CAMERA, - RuntimePermissions.RECORD_AUDIO, - RuntimePermissions.WRITE_EXTERNAL_STORAGE - ]); -}); - -run_next_test(); diff --git a/mobile/android/tests/browser/robocop/testSnackbarAPI.js b/mobile/android/tests/browser/robocop/testSnackbarAPI.js deleted file mode 100644 index 1031528df..000000000 --- a/mobile/android/tests/browser/robocop/testSnackbarAPI.js +++ /dev/null @@ -1,21 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -const { classes: Cc, interfaces: Ci, utils: Cu } = Components; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); - -XPCOMUtils.defineLazyModuleGetter(this, "Snackbars", "resource://gre/modules/Snackbars.jsm"); - -add_task(function* test_snackbar_api() { - Snackbars.show("This is a Snackbar", Snackbars.LENGTH_INDEFINITE, { - action: { - label: "Click me", - callback: function () {} - } - }); -}); - -run_next_test(); diff --git a/mobile/android/tests/browser/robocop/testTrackingProtection.js b/mobile/android/tests/browser/robocop/testTrackingProtection.js deleted file mode 100644 index d81efd6c6..000000000 --- a/mobile/android/tests/browser/robocop/testTrackingProtection.js +++ /dev/null @@ -1,166 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -var { classes: Cc, interfaces: Ci, utils: Cu } = Components; - -Cu.import("resource://gre/modules/XPCOMUtils.jsm"); -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/Messaging.jsm"); - -function promiseLoadEvent(browser, url, eventType="load", runBeforeLoad) { - return new Promise((resolve, reject) => { - do_print("Wait browser event: " + eventType); - - function handle(event) { - if (event.target != browser.contentDocument || event.target.location.href == "about:blank" || (url && event.target.location.href != url)) { - do_print("Skipping spurious '" + eventType + "' event" + " for " + event.target.location.href); - return; - } - - browser.removeEventListener(eventType, handle, true); - do_print("Browser event received: " + eventType); - resolve(event); - } - - browser.addEventListener(eventType, handle, true); - - if (runBeforeLoad) { - runBeforeLoad(); - } - if (url) { - browser.loadURI(url); - } - }); -} - -// Test that the Tracking Protection is active and has the correct state when -// tracking content is blocked (Bug 1063831) - -// Code is mostly stolen from: -// http://dxr.mozilla.org/mozilla-central/source/browser/base/content/test/general/browser_trackingUI.js - -var TABLE = "urlclassifier.trackingTable"; - -// Update tracking database -function doUpdate() { - // Add some URLs to the tracking database (to be blocked) - var testData = "tracking.example.com/"; - var testUpdate = - "n:1000\ni:test-track-simple\nad:1\n" + - "a:524:32:" + testData.length + "\n" + - testData; - - let dbService = Cc["@mozilla.org/url-classifier/dbservice;1"].getService(Ci.nsIUrlClassifierDBService); - - return new Promise((resolve, reject) => { - let listener = { - QueryInterface: function(iid) { - if (iid.equals(Ci.nsISupports) || iid.equals(Ci.nsIUrlClassifierUpdateObserver)) - return this; - - throw Cr.NS_ERROR_NO_INTERFACE; - }, - updateUrlRequested: function(url) { }, - streamFinished: function(status) { }, - updateError: function(errorCode) { - ok(false, "Couldn't update classifier."); - resolve(); - }, - updateSuccess: function(requestedTimeout) { - resolve(); - } - }; - - dbService.beginUpdate(listener, "test-track-simple", ""); - dbService.beginStream("", ""); - dbService.updateStream(testUpdate); - dbService.finishStream(); - dbService.finishUpdate(); - }); -} - -var BrowserApp = Services.wm.getMostRecentWindow("navigator:browser").BrowserApp; - -// Tests the tracking protection UI in private browsing. By default, tracking protection is -// enabled in private browsing ("privacy.trackingprotection.pbmode.enabled"). -add_task(function* test_tracking_pb() { - // Load a blank page - let browser = BrowserApp.addTab("about:blank", { selected: true, parentId: BrowserApp.selectedTab.id, isPrivate: true }).browser; - yield new Promise((resolve, reject) => { - browser.addEventListener("load", function startTests(event) { - browser.removeEventListener("load", startTests, true); - Services.tm.mainThread.dispatch(resolve, Ci.nsIThread.DISPATCH_NORMAL); - }, true); - }); - - // Populate and use 'test-track-simple' for tracking protection lookups - Services.prefs.setCharPref(TABLE, "test-track-simple"); - yield doUpdate(); - - // Point tab to a test page NOT containing tracking elements - yield promiseLoadEvent(browser, "http://tracking.example.org/tests/robocop/tracking_good.html"); - Messaging.sendRequest({ type: "Test:Expected", expected: "unknown" }); - - // Point tab to a test page containing tracking elements - yield promiseLoadEvent(browser, "http://tracking.example.org/tests/robocop/tracking_bad.html"); - Messaging.sendRequest({ type: "Test:Expected", expected: "tracking_content_blocked" }); - - // Simulate a click on the "Disable protection" button in the site identity popup. - // We need to wait for a "load" event because "Session:Reload" will cause a full page reload. - yield promiseLoadEvent(browser, undefined, undefined, () => { - Services.obs.notifyObservers(null, "Session:Reload", "{\"allowContent\":true,\"contentType\":\"tracking\"}"); - }); - Messaging.sendRequest({ type: "Test:Expected", expected: "tracking_content_loaded" }); - - // Simulate a click on the "Enable protection" button in the site identity popup. - yield promiseLoadEvent(browser, undefined, undefined, () => { - Services.obs.notifyObservers(null, "Session:Reload", "{\"allowContent\":false,\"contentType\":\"tracking\"}"); - }); - Messaging.sendRequest({ type: "Test:Expected", expected: "tracking_content_blocked" }); - - // Disable tracking protection to make sure we don't show the UI when the pref is disabled. - Services.prefs.setBoolPref("privacy.trackingprotection.pbmode.enabled", false); - - // Point tab to a test page containing tracking elements - yield promiseLoadEvent(browser, "http://tracking.example.org/tests/robocop/tracking_bad.html"); - Messaging.sendRequest({ type: "Test:Expected", expected: "unknown" }); - - // Point tab to a test page NOT containing tracking elements - yield promiseLoadEvent(browser, "http://tracking.example.org/tests/robocop/tracking_good.html"); - Messaging.sendRequest({ type: "Test:Expected", expected: "unknown" }); - - // Reset the pref before the next testcase - Services.prefs.clearUserPref("privacy.trackingprotection.pbmode.enabled"); -}); - -add_task(function* test_tracking_not_pb() { - // Load a blank page - let browser = BrowserApp.addTab("about:blank", { selected: true }).browser; - yield new Promise((resolve, reject) => { - browser.addEventListener("load", function startTests(event) { - browser.removeEventListener("load", startTests, true); - Services.tm.mainThread.dispatch(resolve, Ci.nsIThread.DISPATCH_NORMAL); - }, true); - }); - - // Point tab to a test page NOT containing tracking elements - yield promiseLoadEvent(browser, "http://tracking.example.org/tests/robocop/tracking_good.html"); - Messaging.sendRequest({ type: "Test:Expected", expected: "unknown" }); - - // Point tab to a test page containing tracking elements (tracking protection UI *should not* be shown) - yield promiseLoadEvent(browser, "http://tracking.example.org/tests/robocop/tracking_bad.html"); - Messaging.sendRequest({ type: "Test:Expected", expected: "unknown" }); - - // Enable tracking protection in normal tabs - Services.prefs.setBoolPref("privacy.trackingprotection.enabled", true); - - // Point tab to a test page containing tracking elements (tracking protection UI *should* be shown) - yield promiseLoadEvent(browser, "http://tracking.example.org/tests/robocop/tracking_bad.html"); - Messaging.sendRequest({ type: "Test:Expected", expected: "tracking_content_blocked" }); -}); - -run_next_test(); diff --git a/mobile/android/tests/browser/robocop/testUITelemetry.js b/mobile/android/tests/browser/robocop/testUITelemetry.js deleted file mode 100644 index 5edf06f19..000000000 --- a/mobile/android/tests/browser/robocop/testUITelemetry.js +++ /dev/null @@ -1,154 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -var Cc = Components.classes; -var Ci = Components.interfaces; -var Cu = Components.utils; - -Cu.import("resource://gre/modules/Services.jsm"); - -const EVENT_TEST1 = "_test_event_1.1"; -const EVENT_TEST2 = "_test_event_2.1"; -const EVENT_TEST3 = "_test_event_3.1"; -const EVENT_TEST4 = "_test_event_4.1"; - -const METHOD_TEST1 = "_test_method_1"; -const METHOD_TEST2 = "_test_method_2"; - -const METHOD_NONE = null; - -const REASON_TEST1 = "_test_reason_1"; -const REASON_TEST2 = "_test_reason_2"; - -const SESSION_STARTED_TWICE = "_test_session_started_twice.1"; -const SESSION_STOPPED_TWICE = "_test_session_stopped_twice.1"; - -function do_check_array_eq(a1, a2) { - do_check_eq(a1.length, a2.length); - for (let i = 0; i < a1.length; ++i) { - do_check_eq(a1[i], a2[i]); - } -} - -/** - * Asserts that the given measurements are equal. Assumes that measurements - * of type "event" have their sessions arrays sorted. - */ -function do_check_measurement_eq(m1, m2) { - do_check_eq(m1.type, m2.type); - - switch (m1.type) { - case "event": - do_check_eq(m1.action, m2.action); - do_check_eq(m1.method, m2.method); - do_check_array_eq(m1.sessions, m2.sessions); - do_check_eq(m1.extras, m2.extras); - break; - - case "session": - do_check_eq(m1.name, m2.name); - do_check_eq(m1.reason, m2.reason); - break; - - default: - do_throw("Unknown event type: " + m1.type); - } -} - -function getObserver() { - let bridge = Cc["@mozilla.org/android/bridge;1"] - .getService(Ci.nsIAndroidBridge); - let obsXPCOM = bridge.browserApp.getUITelemetryObserver(); - do_check_true(!!obsXPCOM); - return obsXPCOM.wrappedJSObject; -} - -/** - * The following event test will fail if telemetry isn't enabled. The Java-side - * part of this test should have turned it on; fail if it didn't work. - */ -add_test(function test_enabled() { - let obs = getObserver(); - do_check_true(!!obs); - do_check_true(obs.enabled); - run_next_test(); -}); - -add_test(function test_telemetry_events() { - let expected = expectedArraysToObjs([ - ["event", EVENT_TEST1, METHOD_TEST1, [], undefined], - ["event", EVENT_TEST2, METHOD_TEST1, [SESSION_STARTED_TWICE], undefined], - ["event", EVENT_TEST2, METHOD_TEST2, [SESSION_STARTED_TWICE], undefined], - ["event", EVENT_TEST3, METHOD_TEST1, [SESSION_STARTED_TWICE, SESSION_STOPPED_TWICE], "foobarextras"], - ["session", SESSION_STARTED_TWICE, REASON_TEST1], - ["event", EVENT_TEST4, METHOD_TEST1, [SESSION_STOPPED_TWICE], "barextras"], - ["session", SESSION_STOPPED_TWICE, REASON_TEST2], - ["event", EVENT_TEST1, METHOD_NONE, [], undefined], - ]); - - let clearMeasurements = false; - let obs = getObserver(); - let measurements = removeNonTestMeasurements(obs.getUIMeasurements(clearMeasurements)); - - measurements.forEach(function (m, i) { - if (m.type === "event") { - m.sessions = removeNonTestSessions(m.sessions); - m.sessions.sort(); // Mutates. - } - - do_check_measurement_eq(expected[i], m); - }); - - expected.forEach(function (m, i) { - do_check_measurement_eq(m, measurements[i]); - }); - - run_next_test(); -}); - -/** - * Converts the expected value arrays to objects, - * for less typing when initializing the expected arrays. - */ -function expectedArraysToObjs(expectedArrays) { - return expectedArrays.map(function (arr) { - let type = arr[0]; - if (type === "event") { - return { - type: type, - action: arr[1], - method: arr[2], - sessions: arr[3].sort(), // Sort, just in case it's not sorted by hand! - extras: arr[4], - }; - - } else if (type === "session") { - return { - type: type, - name: arr[1], - reason: arr[2], - }; - } - }); -} - -function removeNonTestMeasurements(measurements) { - return measurements.filter(function (measurement) { - if (measurement.type === "event") { - return measurement.action.startsWith("_test_event_"); - } else if (measurement.type === "session") { - return measurement.name.startsWith("_test_session_"); - } - return false; - }); -} - -function removeNonTestSessions(sessions) { - return sessions.filter(function (sessionName) { - return sessionName.startsWith("_test_session_"); - }); -} - -run_next_test(); diff --git a/mobile/android/tests/browser/robocop/testUnifiedTelemetryClientId.js b/mobile/android/tests/browser/robocop/testUnifiedTelemetryClientId.js deleted file mode 100644 index d574aaef1..000000000 --- a/mobile/android/tests/browser/robocop/testUnifiedTelemetryClientId.js +++ /dev/null @@ -1,50 +0,0 @@ -var { classes: Cc, interfaces: Ci, utils: Cu } = Components; - -Cu.import('resource://gre/modules/ClientID.jsm'); - -var java = new JavaBridge(this); -do_register_cleanup(() => { - java.disconnect(); -}); -do_test_pending(); - -var isClientIDSet; -var clientID; - -var isResetDone; - -function getAsyncClientId() { - isClientIDSet = false; - ClientID.getClientID().then(function (retClientID) { - // Ideally, we'd directly send the client ID back to Java but Java won't listen for - // js messages after we return from the containing function (bug 1253467). - // - // Note that my brief attempts to get synchronous Promise resolution (via Task.jsm) - // working failed - I have other things to focus on. - clientID = retClientID; - isClientIDSet = true; - }, function (fail) { - // Since Java doesn't listen to our messages (bug 1253467), I don't expect - // this throw to work correctly but we should timeout in Java. - do_throw('Could not retrieve client ID: ' + fail); - }); -} - -function pollGetAsyncClientId() { - java.asyncCall('blockingFromJsResponseString', isClientIDSet, clientID); -} - -function getAsyncReset() { - isResetDone = false; - ClientID._reset().then(function () { - isResetDone = true; - }); -} - -function pollGetAsyncReset() { - java.asyncCall('blockingFromJsResponseString', isResetDone, ''); -} - -function endTest() { - do_test_finished(); -} diff --git a/mobile/android/tests/browser/robocop/testVideoControls.js b/mobile/android/tests/browser/robocop/testVideoControls.js deleted file mode 100644 index e0a41b5b6..000000000 --- a/mobile/android/tests/browser/robocop/testVideoControls.js +++ /dev/null @@ -1,157 +0,0 @@ -// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. */ - -"use strict"; - -var { classes: Cc, interfaces: Ci, utils: Cu } = Components; - -Cu.import("resource://gre/modules/Services.jsm"); -Cu.import("resource://gre/modules/SimpleServiceDiscovery.jsm"); - -// The chrome window -var chromeWin; - -// Track the where the tests are happening -var browser; - -// The document of the video_controls web content -var contentDocument; - -// The