Best JavaScript code snippet using wpt
regress-302439.js
Source:regress-302439.js
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */2/* This Source Code Form is subject to the terms of the Mozilla Public3 * License, v. 2.0. If a copy of the MPL was not distributed with this4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */5//-----------------------------------------------------------------------------6var BUGNUMBER = 302439;7var summary = 'spandep fu should skip unused JSOP_TABLESWITCH jump table entries';8var actual = 'No Crash';9var expect = 'No Crash';10printBugNumber(BUGNUMBER);11printStatus (summary);12function productList(catID,famID) {13 clearBox(document.Support_Form.Product_ID);14 switch(parseInt(catID)) {15 case 1 : // Sound Blaster16 switch(parseInt(famID)) {17 case 434 : // Audigy 418 break;19 case 204 : // Audigy 220 break;21 case 205 : // Audigy22 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy Platinum eX', '45'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //23 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy Platinum', '4846'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //24 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy LS (SE)', '10365'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //25 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy Digital Entertainment', '5085'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //26 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy ES', '5086'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //27 break;28 case 206 : // Live!29 try { addBoxItem(document.Support_Form.Product_ID, 'Live! 24-bit External', '10702'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //30 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Live! MP3+ 5.1', '573'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //31 try { addBoxItem(document.Support_Form.Product_ID, 'Live! 5.1', '50'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //32 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Digital Entertainment 5.1 (SE)', '4855'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //33 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Platinum 5.1', '572'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //34 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Live! 5.1 Digital (Dell)', '1853'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //35 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Platinum', '3203'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //36 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Live! Value', '4856'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //37 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Live!', '4857'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //38 break;39 case 207 : // Others40 try { addBoxItem(document.Support_Form.Product_ID, 'Extigy', '585'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //41 try { addBoxItem(document.Support_Form.Product_ID, 'Ensoniq AudioPCI', '420'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //42 try { addBoxItem(document.Support_Form.Product_ID, 'PCI4.1 Digital', '681'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //43 try { addBoxItem(document.Support_Form.Product_ID, 'Vibra128 4D', '9032'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //44 try { addBoxItem(document.Support_Form.Product_ID, 'Digital Music', '154'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //45 try { addBoxItem(document.Support_Form.Product_ID, 'Vibra 128', '4851'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //46 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster 32', '1844'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //47 try { addBoxItem(document.Support_Form.Product_ID, 'SB AWE64 Digital', '1821'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //48 try { addBoxItem(document.Support_Form.Product_ID, 'SB PCI 5.1', '1828'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //49 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster\u00AE', '1841'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //50 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster\u00AE 16', '1842'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //51 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster 16 Wave Effects', '1843'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //52 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster AWE32', '1848'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //53 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster AWE64', '1849'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //54 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster AWE64 Gold', '1850'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //55 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Microchannels', '1861'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //56 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster PCI 128', '1864'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //57 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster PCI 64', '1865'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //58 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Pro', '1866'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //59 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Audio PCI', '1559'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //60 break;61 case 16 : // Accessories62 try { addBoxItem(document.Support_Form.Product_ID, 'Live!Drive II', '9278'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //63 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster MIDI Adapter', '251'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //64 try { addBoxItem(document.Support_Form.Product_ID, 'Mini to Standard MIDI Adapter', '252'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //65 break;66 }67 break;68 case 210 : // Portable Media Players69 switch(parseInt(famID)) {70 case 211 : // Zen71 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Portable Media Center', '9882'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //72 break;73 case 212 : // Accessories74 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC Docking Station', '10756'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //75 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC Li-ion Polymer Battery', '10679'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //76 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC FM Wired Remote', '10663'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //77 break;78 }79 break;80 case 213 : // MP3 Players81 switch(parseInt(famID)) {82 case 214 : // Zen83 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Touch', '10274'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //84 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Micro', '10795'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //85 try { addBoxItem(document.Support_Form.Product_ID, 'Zen', '11519'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //86 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Xtra', '9288'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //87 try { addBoxItem(document.Support_Form.Product_ID, 'Zen NX', '4836'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //88 try { addBoxItem(document.Support_Form.Product_ID, 'Zen USB 2.0', '9019'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //89 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Zen', '117'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //90 break;91 case 215 : // MuVo92 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Micro N200', '10737'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //93 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo\u00B2 X-Trainer', '5080'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //94 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Slim', '10052'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //95 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Sport C100', '10794'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //96 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo V200', '10732'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //97 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo TX FM', '9771'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //98 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo USB 2.0', '10919'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //99 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo', '110'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //100 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo NX', '4884'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //101 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo\u00B2', '4908'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //102 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo TX', '9672'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //103 break;104 case 216 : // Digital MP3 Player105 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Xtra', '9288'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //106 try { addBoxItem(document.Support_Form.Product_ID, 'Rhomba NX', '10302'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //107 try { addBoxItem(document.Support_Form.Product_ID, 'MP3 Player FX120', '11010'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //108 try { addBoxItem(document.Support_Form.Product_ID, 'DXT 200', '4996'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //109 try { addBoxItem(document.Support_Form.Product_ID, 'Zen USB 2.0', '9019'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //110 try { addBoxItem(document.Support_Form.Product_ID, 'Jukebox 3', '296'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //111 try { addBoxItem(document.Support_Form.Product_ID, 'Creative CD-MP3 Slim 600', '1582'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //112 try { addBoxItem(document.Support_Form.Product_ID, 'Zen NX', '4836'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //113 try { addBoxItem(document.Support_Form.Product_ID, 'MP3 Player', '4983'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //114 try { addBoxItem(document.Support_Form.Product_ID, 'MP3 Player 2', '4984'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //115 try { addBoxItem(document.Support_Form.Product_ID, 'MP3 Player MX', '4985'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //116 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Zen', '117'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //117 try { addBoxItem(document.Support_Form.Product_ID, 'JukeBox 2', '239'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //118 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD JukeBox', '241'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //119 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD JukeBox C', '242'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //120 try { addBoxItem(document.Support_Form.Product_ID, 'Jukebox 10GB', '261'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //121 try { addBoxItem(document.Support_Form.Product_ID, 'Creative CD-MP3 M100', '264'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //122 break;123 case 217 : // Accessories124 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Micro Battery', '11215'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //125 try { addBoxItem(document.Support_Form.Product_ID, 'Universal Travel Adapter for Zen Micro', '11711'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //126 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Stik-On', '12982'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //127 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Universal Travel Adapter', '12979'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //128 try { addBoxItem(document.Support_Form.Product_ID, 'Leather Case', '11511'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //129 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Leather Case', '12978'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //130 try { addBoxItem(document.Support_Form.Product_ID, 'Home Kit - Jukebox 3', '497'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //131 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox 3 Leather Case', '498'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //132 try { addBoxItem(document.Support_Form.Product_ID, 'Faceplates - Jukebox 3', '499'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //133 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Armband', '511'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //134 try { addBoxItem(document.Support_Form.Product_ID, 'NOMAD II MG Wired Remote', '515'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //135 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Accessory Kit', '533'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //136 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Battery Charger Kit', '538'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //137 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Battery Pack', '539'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //138 try { addBoxItem(document.Support_Form.Product_ID, 'NOMAD II MG Travel Cable', '560'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //139 try { addBoxItem(document.Support_Form.Product_ID, 'Leather Case - Jukebox 2', '562'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //140 try { addBoxItem(document.Support_Form.Product_ID, 'Battery - Jukebox 2', '563'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //141 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Battery Modules', '999'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //142 try { addBoxItem(document.Support_Form.Product_ID, 'PlayDock PD200', '31'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //143 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound', '80'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //144 try { addBoxItem(document.Support_Form.Product_ID, 'Li-Ion Battery - Jukebox 3', '86'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //145 try { addBoxItem(document.Support_Form.Product_ID, 'FM Wired Remote - Jukebox 3/Jukebox Zen/MuVo\u00B2', '115'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //146 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Power Adapter', '125'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //147 try { addBoxItem(document.Support_Form.Product_ID, 'Cassette Adapter Kit', '401'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //148 try { addBoxItem(document.Support_Form.Product_ID, 'Car Kit - Jukebox 3/Jukebox 2/Jukebox Zen/MuVo\u00B2', '496'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //149 try { addBoxItem(document.Support_Form.Product_ID, 'Battery Pack', '4997'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //150 try { addBoxItem(document.Support_Form.Product_ID, 'Battery Modules - MuVo NX / TX / TX FM', '9217'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //151 try { addBoxItem(document.Support_Form.Product_ID, 'Armband - MuVo NX / TX / TX FM', '10126'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //152 break;153 }154 break;155 case 4 : // Speaker Systems156 switch(parseInt(famID)) {157 case 113 : // 7.1 Systems158 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T7700', '5076'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //159 break;160 case 24 : // 6.1 Systems161 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 6.1 6600', '465'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //162 break;163 case 25 : // 5.1 Systems164 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 5.1 5100', '1704'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //165 try { addBoxItem(document.Support_Form.Product_ID, 'PCWorks LX520', '9412'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //166 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue 5600', '10736'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //167 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T5900', '10323'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //168 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire P5800', '10596'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //169 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Theater 5.1 DTT2200', '428'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //170 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5.1 5700 Digital', '439'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //171 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 5.1 Digital 5500', '990'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //172 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5.1 5200', '55'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //173 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 5.1 5300', '238'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //174 try { addBoxItem(document.Support_Form.Product_ID, 'MegaWorks THX 5.1 550', '240'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //175 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Theater 5.1 DTT3500 Digital', '290'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //176 try { addBoxItem(document.Support_Form.Product_ID, 'PlayWorks DTT2500 Digital', '291'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //177 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 5.1 5600', '1705'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //178 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T5400', '5077'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //179 try { addBoxItem(document.Support_Form.Product_ID, 'PlayWorks PS2000 Digital', '427'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //180 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Theater 5.1', '1628'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //181 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Theater 5.1 DTT2500 Digital', '1629'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //182 try { addBoxItem(document.Support_Form.Product_ID, 'Cambridge SoundWorks MegaWorks 510D', '478'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //183 break;184 case 26 : // 4.1 Systems185 try { addBoxItem(document.Support_Form.Product_ID, 'FPS1600', '47'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //186 try { addBoxItem(document.Support_Form.Product_ID, 'FPS2000 Digital', '297'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //187 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 4.1 4400', '446'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //188 try { addBoxItem(document.Support_Form.Product_ID, 'FPS1800', '424'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //189 try { addBoxItem(document.Support_Form.Product_ID, 'PC-Works FourPointSurround FPS1000', '378'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //190 try { addBoxItem(document.Support_Form.Product_ID, 'FPS1500', '388'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //191 break;192 case 27 : // 2.1 Systems193 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue 3600', '10735'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //194 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T3000', '10329'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //195 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue 3400', '10733'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //196 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire G380', '9276'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //197 try { addBoxItem(document.Support_Form.Product_ID, 'Creative I-Trigue 3200', '10327'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //198 try { addBoxItem(document.Support_Form.Product_ID, 'PCWorks LX220', '9407'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //199 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 2.1 Slim 2600', '434'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //200 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 2.1 2500', '461'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //201 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue L3500', '4912'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //202 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue L3450', '4913'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //203 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire T2900', '9025'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //204 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire P380', '9026'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //205 try { addBoxItem(document.Support_Form.Product_ID, 'SoundWorks SW320', '48'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //206 try { addBoxItem(document.Support_Form.Product_ID, 'MegaWorks THX 2.1 250D', '124'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //207 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue 2.1 3300', '139'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //208 try { addBoxItem(document.Support_Form.Product_ID, 'Creative SBS 2.1 350 Speakers', '281'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //209 try { addBoxItem(document.Support_Form.Product_ID, 'SBS 370', '283'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //210 try { addBoxItem(document.Support_Form.Product_ID, 'PCWorks', '284'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //211 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire Slim 500', '289'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //212 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Inspire 2.1 2400', '298'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //213 try { addBoxItem(document.Support_Form.Product_ID, 'SoundWorks Digital', '299'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //214 try { addBoxItem(document.Support_Form.Product_ID, 'SoundWorks SW310', '304'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //215 try { addBoxItem(document.Support_Form.Product_ID, 'I-Trigue i3350', '279'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //216 break;217 case 28 : // 2.0 Systems218 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire Monitor M85-D', '4910'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //219 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 2.0 1300', '4918'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //220 try { addBoxItem(document.Support_Form.Product_ID, 'SBS 230 Speakers', '4905'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //221 try { addBoxItem(document.Support_Form.Product_ID, 'SBS52', '1'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //222 try { addBoxItem(document.Support_Form.Product_ID, 'SBS16', '2'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //223 try { addBoxItem(document.Support_Form.Product_ID, 'Cambridge SBS20', '3'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //224 try { addBoxItem(document.Support_Form.Product_ID, 'SBS50', '1834'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //225 try { addBoxItem(document.Support_Form.Product_ID, 'SBS10', '1831'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //226 try { addBoxItem(document.Support_Form.Product_ID, 'Creative SBS15', '4906'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //227 break;228 case 29 : // Portable Systems229 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound 200', '10164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //230 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound MP3', '1874'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //231 try { addBoxItem(document.Support_Form.Product_ID, 'PlayDock PD200', '31'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //232 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound', '80'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //233 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound i-300', '9022'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //234 try { addBoxItem(document.Support_Form.Product_ID, 'Creative TravelSound MP3 Titanium', '991'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //235 break;236 case 136 : // Decoders237 try { addBoxItem(document.Support_Form.Product_ID, 'Decoder DDTS-100', '9468'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //238 break;239 case 30 : // Accessories240 try { addBoxItem(document.Support_Form.Product_ID, 'MT-1100 Speaker Stands', '166'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //241 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1700', '11164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //242 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1300', '4936'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //243 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HN-505', '4938'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //244 try { addBoxItem(document.Support_Form.Product_ID, 'Backphones HQ-65', '4916'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //245 try { addBoxItem(document.Support_Form.Product_ID, 'Backphones HQ-60', '4937'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //246 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-880', '11156'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //247 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-480', '11708'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //248 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HE-100', '11023'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //249 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HS-300', '4939'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //250 try { addBoxItem(document.Support_Form.Product_ID, 'MT-1200 Speaker Stands', '9515'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //251 try { addBoxItem(document.Support_Form.Product_ID, 'SurroundStation', '32'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //252 try { addBoxItem(document.Support_Form.Product_ID, 'Creative HQ-2000 Headphones', '4'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //253 try { addBoxItem(document.Support_Form.Product_ID, 'MT-500 Speaker Tripods', '399'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //254 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 2600 Spkr Grilles', '636'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //255 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5300 Spkr Grilles', '637'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //256 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5700 Spkr Grilles', '664'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //257 try { addBoxItem(document.Support_Form.Product_ID, 'Creative HQ-1000 Headphones', '4988'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //258 break;259 }260 break;261 case 218 : // Web Cameras262 switch(parseInt(famID)) {263 case 219 : // WebCam264 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live! Ultra for Notebooks', '11491'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //265 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live! Ultra', '10451'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //266 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live! Pro', '10450'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //267 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live!', '10412'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //268 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Instant', '10410'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //269 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam NX Ultra', '9340'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //270 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam NX Pro', '628'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //271 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam NX', '627'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //272 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam PRO eX', '243'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //273 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam PRO', '616'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //274 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Go Plus', '15'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //275 try { addBoxItem(document.Support_Form.Product_ID, 'Webcam Go ES', '1898'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //276 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Go Mini', '1900'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //277 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Go', '17'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //278 try { addBoxItem(document.Support_Form.Product_ID, 'Video Blaster WebCam Plus', '16'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //279 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Notebook', '629'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //280 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Mobile', '4890'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //281 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam 5', '1896'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //282 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Vista Pro', '11053'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //283 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Vista Plus', '11043'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //284 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam', '65'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //285 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam II', '4900'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //286 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam 3', '1908'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //287 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Vista', '1907'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //288 break;289 case 220 : // PC-CAM290 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 900', '10119'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //291 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 930 Slim', '11431'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //292 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 920 Slim', '10823'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //293 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 880', '308'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //294 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 750', '4878'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //295 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 850', '4879'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //296 try { addBoxItem(document.Support_Form.Product_ID, 'Creative PC-CAM 300', '49'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //297 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 350', '106'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //298 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 550', '107'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //299 try { addBoxItem(document.Support_Form.Product_ID, 'CardCam Value', '116'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //300 try { addBoxItem(document.Support_Form.Product_ID, 'PC-CAM 600', '260'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //301 break;302 }303 break;304 case 437 : // Headphones & Headsets305 switch(parseInt(famID)) {306 case 438 : // Headphones307 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1700', '11164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //308 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1300', '4936'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //309 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones CB2530', '11644'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //310 break;311 case 439 : // Noise-Cancelling Headphones312 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HN-505', '4938'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //313 break;314 case 440 : // Backphones315 try { addBoxItem(document.Support_Form.Product_ID, 'Backphones HQ-65', '4916'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //316 try { addBoxItem(document.Support_Form.Product_ID, 'Backphones HQ-60', '4937'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //317 break;318 case 441 : // Earphones319 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-880', '11156'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //320 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-630', '11397'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //321 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-480', '11708'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //322 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-380', '11229'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //323 break;324 case 442 : // Headsets325 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HE-100', '11023'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //326 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HS-300', '4939'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //327 break;328 }329 break;330 case 9 : // Storage Devices331 switch(parseInt(famID)) {332 case 259 : // DVD±RW Drive333 try { addBoxItem(document.Support_Form.Product_ID, 'DVD±RW Dual 8X', '9599'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //334 try { addBoxItem(document.Support_Form.Product_ID, 'DVD±RW Dual 8x8', '10305'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //335 try { addBoxItem(document.Support_Form.Product_ID, 'DVD+RW Dual External 8x8', '10583'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //336 break;337 case 47 : // Combo Drive338 try { addBoxItem(document.Support_Form.Product_ID, 'Combo Drive 52.32.52x/16x', '11712'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //339 try { addBoxItem(document.Support_Form.Product_ID, 'Combo Drive 40-12-40/16', '4998'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //340 try { addBoxItem(document.Support_Form.Product_ID, 'Combo Drive NS', '9454'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //341 break;342 case 46 : // CD-RW Drive343 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW External 52-32-52x', '9481'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //344 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW Blaster 12-10-32', '8'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //345 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW 52.24.52', '1590'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //346 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW Blaster 24-10-40 External', '4944'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //347 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW External 52-24-52x', '9027'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //348 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW 52-32-52x', '9453'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //349 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW Blaster 48-12-48 External', '9020'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //350 try { addBoxItem(document.Support_Form.Product_ID, 'CD-RW Blaster 48-12-48', '4941'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //351 break;352 case 45 : // PC-DVD Drive353 try { addBoxItem(document.Support_Form.Product_ID, 'PC-DVD Encore 12x', '6'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //354 try { addBoxItem(document.Support_Form.Product_ID, 'PC-DVD ROM 12x', '1486'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //355 try { addBoxItem(document.Support_Form.Product_ID, 'PC-DVD DVD-ROM 16x', '1490'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //356 try { addBoxItem(document.Support_Form.Product_ID, 'PC-DVD MPEG-1 Decoder Board', '1801'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //357 break;358 case 44 : // CD-ROM Drive359 try { addBoxItem(document.Support_Form.Product_ID, 'CD-ROM Blaster Digital iR52X', '3562'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //360 try { addBoxItem(document.Support_Form.Product_ID, 'CD-ROM Blaster 52X', '11'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //361 try { addBoxItem(document.Support_Form.Product_ID, '12x CD-ROM Drives', '1485'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //362 try { addBoxItem(document.Support_Form.Product_ID, '16x CD-ROM Drives', '1489'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //363 try { addBoxItem(document.Support_Form.Product_ID, '48x CD-ROM Drives', '1548'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //364 try { addBoxItem(document.Support_Form.Product_ID, '1x & 2x CD-ROM Drives', '1493'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //365 try { addBoxItem(document.Support_Form.Product_ID, '24x CD-ROM Drives', '1495'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //366 try { addBoxItem(document.Support_Form.Product_ID, '2x & 3x CD-ROM (SCSI)', '1496'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //367 try { addBoxItem(document.Support_Form.Product_ID, '32x CD-ROM Drives', '1498'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //368 try { addBoxItem(document.Support_Form.Product_ID, '36x CD-ROM Drives', '1499'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //369 try { addBoxItem(document.Support_Form.Product_ID, '40x CD-Rom Drives', '1547'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //370 try { addBoxItem(document.Support_Form.Product_ID, '4x CD-ROM Drives', '1549'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //371 try { addBoxItem(document.Support_Form.Product_ID, '6x CD-ROM Drives', '1552'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //372 try { addBoxItem(document.Support_Form.Product_ID, '8x CD-ROM Drives', '1554'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //373 break;374 case 49 : // Portable Harddisk375 try { addBoxItem(document.Support_Form.Product_ID, 'Storage Blaster Portable Harddisk', '8996'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //376 break;377 case 265 : // Portable Storage378 try { addBoxItem(document.Support_Form.Product_ID, 'ThumbDrive', '10681'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //379 break;380 }381 break;382 case 12 : // PC Barebone383 switch(parseInt(famID)) {384 case 54 : // SLiX PC385 try { addBoxItem(document.Support_Form.Product_ID, 'SLiX PC MPC61Y0', '11766'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //386 break;387 }388 break;389 case 11 : // Monitors390 switch(parseInt(famID)) {391 case 53 : // LCD392 try { addBoxItem(document.Support_Form.Product_ID, '17" TFT LCD Monitor With DVI', '9980'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //393 break;394 }395 break;396 case 60 : // Video397 switch(parseInt(famID)) {398 case 96 : // Video Editing399 try { addBoxItem(document.Support_Form.Product_ID, 'Video Blaster MovieMaker', '13'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //400 break;401 }402 break;403 case 13 : // Accessories404 switch(parseInt(famID)) {405 case 55 : // Sound Blaster406 try { addBoxItem(document.Support_Form.Product_ID, 'Optical Digital I/O Card II', '30'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //407 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster MIDI Adapter', '251'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //408 try { addBoxItem(document.Support_Form.Product_ID, 'Mini to Standard MIDI Adapter', '252'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //409 try { addBoxItem(document.Support_Form.Product_ID, 'Live!Drive II', '9278'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //410 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Audigy Internal Drive', '88'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //411 try { addBoxItem(document.Support_Form.Product_ID, 'Sound Blaster Audigy External Drive', '89'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //412 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Drive IR', '26'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //413 try { addBoxItem(document.Support_Form.Product_ID, 'Live! Drive I', '27'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //414 try { addBoxItem(document.Support_Form.Product_ID, 'Remote Controller SBLive', '1816'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //415 break;416 case 449 : // Zen Micro417 try { addBoxItem(document.Support_Form.Product_ID, 'Universal Travel Adapter for Zen Micro', '11711'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //418 try { addBoxItem(document.Support_Form.Product_ID, 'Leather Case', '11511'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //419 break;420 case 483 : // Zen Neeon421 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Stik-On', '12982'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //422 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Leather Case', '12978'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //423 try { addBoxItem(document.Support_Form.Product_ID, 'Zen Neeon Universal Travel Adapter', '12979'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //424 break;425 case 264 : // Portable Media Center426 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC Docking Station', '10756'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //427 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC Li-ion Polymer Battery', '10679'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //428 try { addBoxItem(document.Support_Form.Product_ID, 'Zen PMC FM Wired Remote', '10663'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //429 break;430 case 57 : // MP3 Players431 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD JukeBox 3 Car Kit', '4894'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //432 try { addBoxItem(document.Support_Form.Product_ID, 'Home Kit - Jukebox 3', '497'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //433 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox 3 Leather Case', '498'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //434 try { addBoxItem(document.Support_Form.Product_ID, 'Faceplates - Jukebox 3', '499'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //435 try { addBoxItem(document.Support_Form.Product_ID, 'MuVo Armband', '511'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //436 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Accessory Kit', '533'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //437 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Battery Charger Kit', '538'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //438 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Battery Pack', '539'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //439 try { addBoxItem(document.Support_Form.Product_ID, 'Leather Case - Jukebox 2', '562'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //440 try { addBoxItem(document.Support_Form.Product_ID, 'Battery - Jukebox 2', '563'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //441 try { addBoxItem(document.Support_Form.Product_ID, 'Li-Ion Battery - Jukebox 3', '86'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //442 try { addBoxItem(document.Support_Form.Product_ID, 'FM Wired Remote - Jukebox 3/Jukebox Zen/MuVo\u00B2', '115'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //443 try { addBoxItem(document.Support_Form.Product_ID, 'Creative NOMAD Jukebox Power Adapter', '125'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //444 try { addBoxItem(document.Support_Form.Product_ID, 'Cassette Adapter Kit', '401'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //445 try { addBoxItem(document.Support_Form.Product_ID, 'Car Kit - Jukebox 3/Jukebox 2/Jukebox Zen/MuVo\u00B2', '496'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //446 try { addBoxItem(document.Support_Form.Product_ID, 'Battery Modules - MuVo NX / TX / TX FM', '9217'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //447 try { addBoxItem(document.Support_Form.Product_ID, 'Armband - MuVo NX / TX / TX FM', '10126'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //448 break;449 case 58 : // Speaker Systems450 try { addBoxItem(document.Support_Form.Product_ID, 'MT-1100 Speaker Stands', '166'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //451 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones HQ-1700', '11164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //452 try { addBoxItem(document.Support_Form.Product_ID, 'Earphones EP-880', '11156'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //453 try { addBoxItem(document.Support_Form.Product_ID, 'Headset HE-100', '11023'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //454 try { addBoxItem(document.Support_Form.Product_ID, 'MT-500 Speaker Tripods', '399'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //455 try { addBoxItem(document.Support_Form.Product_ID, 'Speaker Extension Cables', '415'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //456 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5300 Spkr Grilles', '637'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //457 try { addBoxItem(document.Support_Form.Product_ID, 'Inspire 5700 Spkr Grilles', '664'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //458 break;459 case 256 : // Wireless460 try { addBoxItem(document.Support_Form.Product_ID, 'Wireless Headset for Bluetooth', '10287'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //461 try { addBoxItem(document.Support_Form.Product_ID, 'Headset CB2455', '11394'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //462 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones CB2530', '11644'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //463 break;464 case 59 : // Storage465 try { addBoxItem(document.Support_Form.Product_ID, 'S-Video Cable Coupler', '250'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //466 try { addBoxItem(document.Support_Form.Product_ID, 'IDE Cable Set', '255'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //467 try { addBoxItem(document.Support_Form.Product_ID, 'Dxr2 Decoder Board', '1648'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //468 try { addBoxItem(document.Support_Form.Product_ID, 'Dxr3 Decoder Card', '12'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //469 break;470 }471 break;472 case 118 : // Digital Cameras473 switch(parseInt(famID)) {474 case 117 : // Digital Still Cameras475 try { addBoxItem(document.Support_Form.Product_ID, 'DC-CAM 4200ZS', '10822'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //476 try { addBoxItem(document.Support_Form.Product_ID, 'DC-CAM 3200Z', '9762'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //477 try { addBoxItem(document.Support_Form.Product_ID, 'DC-CAM 3000Z', '9028'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //478 try { addBoxItem(document.Support_Form.Product_ID, 'CardCam', '120'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //479 try { addBoxItem(document.Support_Form.Product_ID, 'CardCam Value', '116'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //480 break;481 case 309 : // Digital Video Cameras482 try { addBoxItem(document.Support_Form.Product_ID, 'DiVi CAM 316', '11175'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //483 break;484 }485 break;486 case 10 : // Mice & Keyboards487 switch(parseInt(famID)) {488 case 223 : // Wired Mice489 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse 5500', '11387'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //490 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse 3500', '11388'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //491 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Classic', '4919'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //492 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Optical Lite', '4920'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //493 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Optical 3000', '4924'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //494 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Optical Mouse', '262'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //495 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Notebook Optical', '9147'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //496 break;497 case 224 : // Wireless Mice498 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint Travel', '11165'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //499 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint Travel Mini', '11166'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //500 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint 5500', '11178'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //501 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint 3500', '11386'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //502 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical 5000', '9145'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //503 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical', '263'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //504 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical 3000', '4923'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //505 break;506 case 227 : // Wireless Mice & Keyboards507 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 9000 Pro', '11493'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //508 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 8000', '10104'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //509 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 6000', '5039'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //510 break;511 case 228 : // Wired PC & MIDI Keyboards512 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys DM', '9389'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //513 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys DM Value', '9600'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //514 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys', '504'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //515 break;516 case 52 : // Gaming Devices517 try { addBoxItem(document.Support_Form.Product_ID, 'Avant Force NX', '9394'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //518 try { addBoxItem(document.Support_Form.Product_ID, 'Cobra Force 3D', '9396'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //519 try { addBoxItem(document.Support_Form.Product_ID, 'Gamepad I', '1658'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //520 break;521 }522 break;523 case 8 : // Musical Keyboards524 switch(parseInt(famID)) {525 case 234 : // PC & MIDI Keyboards526 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys DM', '9389'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //527 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys DM Value', '9600'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //528 try { addBoxItem(document.Support_Form.Product_ID, 'Prodikeys', '504'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //529 break;530 case 231 : // MIDI Keyboards531 try { addBoxItem(document.Support_Form.Product_ID, 'Creative Blasterkeys', '40'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //532 break;533 }534 break;535 case 237 : // Creative Professional536 switch(parseInt(famID)) {537 case 239 : // Digital Audio Systems538 try { addBoxItem(document.Support_Form.Product_ID, 'E-MU 1820M', '10496'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //539 try { addBoxItem(document.Support_Form.Product_ID, 'E-MU 1212M', '10500'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //540 try { addBoxItem(document.Support_Form.Product_ID, 'E-MU 1820', '10494'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //541 try { addBoxItem(document.Support_Form.Product_ID, 'E-MU 0404', '10498'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //542 break;543 case 240 : // Desktop Sampling Systems544 try { addBoxItem(document.Support_Form.Product_ID, 'Emulator X', '10502'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //545 try { addBoxItem(document.Support_Form.Product_ID, 'Emulator X Studio', '10504'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //546 try { addBoxItem(document.Support_Form.Product_ID, 'Proteus X', '11074'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //547 break;548 case 421 : // Desktop Sound Modules549 try { addBoxItem(document.Support_Form.Product_ID, 'Proteus X', '11074'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //550 break;551 case 258 : // Accessories and Upgrades552 try { addBoxItem(document.Support_Form.Product_ID, 'Proteus X Software Upgrade', '11073'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //553 try { addBoxItem(document.Support_Form.Product_ID, 'Emulator X OS Upgrade', '10225'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //554 try { addBoxItem(document.Support_Form.Product_ID, 'Mo\'Phatt X', '11329'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //555 try { addBoxItem(document.Support_Form.Product_ID, 'Planet Earth X', '11330'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //556 try { addBoxItem(document.Support_Form.Product_ID, 'Virtuoso X', '11332'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //557 try { addBoxItem(document.Support_Form.Product_ID, 'Vintage X Pro Collection', '11072'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //558 try { addBoxItem(document.Support_Form.Product_ID, 'Street Kits', '11331'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //559 try { addBoxItem(document.Support_Form.Product_ID, 'AudioDock M', '10229'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //560 try { addBoxItem(document.Support_Form.Product_ID, 'Audio Dock', '10230'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //561 try { addBoxItem(document.Support_Form.Product_ID, 'Beat Shop 2', '10404'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //562 try { addBoxItem(document.Support_Form.Product_ID, 'EDI Cable', '10227'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //563 try { addBoxItem(document.Support_Form.Product_ID, 'Sync Daughter Card', '10576'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //564 break;565 }566 break;567 case 243 : // Wireless568 switch(parseInt(famID)) {569 case 246 : // Mice & Keyboards570 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint 5500', '11178'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //571 try { addBoxItem(document.Support_Form.Product_ID, 'FreePoint 3500', '11386'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //572 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical 5000', '9145'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //573 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 8000', '10104'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //574 try { addBoxItem(document.Support_Form.Product_ID, 'Desktop Wireless 6000', '5039'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //575 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical', '263'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //576 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless Optical 3000', '4923'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //577 break;578 case 248 : // Accessories579 try { addBoxItem(document.Support_Form.Product_ID, 'Headset CB2460', '11238'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //580 try { addBoxItem(document.Support_Form.Product_ID, 'Headset CB2455', '11394'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //581 try { addBoxItem(document.Support_Form.Product_ID, 'Wireless Headset for Bluetooth', '10287'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //582 try { addBoxItem(document.Support_Form.Product_ID, 'Headphones CB2530', '11644'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //583 break;584 }585 break;586 case 244 : // Notebook Products587 switch(parseInt(famID)) {588 case 250 : // PCMCIA Sound Blaster589 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy 2 ZS Notebook', '10769'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //590 break;591 case 249 : // USB Sound Blaster592 try { addBoxItem(document.Support_Form.Product_ID, 'Audigy 2 NX', '9103'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //593 try { addBoxItem(document.Support_Form.Product_ID, 'Live! 24-bit External', '10702'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //594 try { addBoxItem(document.Support_Form.Product_ID, 'Digital Music LX', '10246'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //595 try { addBoxItem(document.Support_Form.Product_ID, 'Digital Music', '154'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //596 try { addBoxItem(document.Support_Form.Product_ID, 'Extigy', '585'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //597 break;598 case 251 : // Portable Speaker Systems599 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound 200', '10164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //600 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound i-300', '9022'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //601 try { addBoxItem(document.Support_Form.Product_ID, 'TravelSound MP3', '1874'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //602 break;603 case 252 : // Mice & Keyboards604 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Wireless NoteBook Optical', '10188'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //605 try { addBoxItem(document.Support_Form.Product_ID, 'Mouse Notebook Optical', '9147'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //606 break;607 case 253 : // Web Cameras608 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Live! Ultra for Notebooks', '11491'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //609 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Notebook', '629'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //610 try { addBoxItem(document.Support_Form.Product_ID, 'WebCam Mobile', '4890'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //611 break;612 }613 break;614 case 6 : // Graphics615 switch(parseInt(famID)) {616 case 37 : // ATI Radeon 9000 series617 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster RX9250', '11489'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //618 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster RX9250 Xtreme', '11490'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //619 break;620 case 230 : // 3D Labs621 try { addBoxItem(document.Support_Form.Product_ID, 'Graphics Blaster Picture Perfect', '164'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //622 break;623 case 99 : // NVIDIA GeForce624 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster GeForce', '1500'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //625 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster GeForce 2', '1501'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //626 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster GeForce Pro', '1505'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //627 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster GeForce2 ULTRA 64MB AGP', '1512'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //628 break;629 case 98 : // NVIDIA Riva TNT Series630 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster RIVA TNT2 Pro', '1527'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //631 try { addBoxItem(document.Support_Form.Product_ID, 'Graphics Blaster RIVA128ZX', '1689'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //632 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Riva TNT2', '4841'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //633 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster RIVA TNT2 Value', '4842'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //634 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster TNT2 Ultra', '4843'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //635 break;636 case 73 : // 3D Blaster637 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 4 Titanium 4200', '1516'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //638 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9700 Pro', '1524'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //639 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 4 MX440', '1539'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //640 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9000 64MB', '1540'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //641 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9000 Pro', '1541'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //642 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 4 MX420', '4869'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //643 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9800 Pro', '4917'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //644 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 4 MX460', '4969'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //645 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9600', '4973'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //646 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9000 Pro 128MB', '8995'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //647 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9200 SE', '9024'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //648 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9600 Pro', '9576'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //649 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9600 XT', '10311'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //650 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster 5 RX9600 SE', '10335'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //651 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Savage 4', '1536'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //652 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster VLB', '1537'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //653 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Voodoo 2', '1538'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //654 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster PCI', '1523'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //655 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Banshee', '1506'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //656 try { addBoxItem(document.Support_Form.Product_ID, '3D Blaster Banshee AGP', '1507'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //657 break;658 }659 break;660 case 7 : // Modems & Networking661 switch(parseInt(famID)) {662 case 41 : // Wireless663 try { addBoxItem(document.Support_Form.Product_ID, 'USB Adapter CB2431', '10863'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //664 try { addBoxItem(document.Support_Form.Product_ID, 'Network Blaster Wireless PCMCIA Card', '3868'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //665 break;666 case 42 : // Broadband667 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster DSL Router 8015U', '11176'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //668 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster Router 8110', '10280'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //669 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster ADSL Bridge ', '4873'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //670 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster USB Modem', '4871'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //671 try { addBoxItem(document.Support_Form.Product_ID, 'Broadband Blaster DSL', '4921'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //672 break;673 case 40 : // Analog674 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster PCMCIA', '24'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //675 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.92 PCI', '52'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //676 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.92 Serial', '258'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //677 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.92 USB', '266'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //678 try { addBoxItem(document.Support_Form.Product_ID, 'Modem 56k Internal', '1715'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //679 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster Flash 56II ISA', '18'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //680 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.90 ISA', '19'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //681 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster Flash 56 PCI', '21'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //682 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.90 USB', '22'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //683 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster V.90 External', '23'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //684 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster USB (DE5675)', '8992'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //685 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster USB (DE5673)', '8991'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //686 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster PCI (DI5663)', '4999'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //687 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster PCI (DI5656)', '8988'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //688 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster PCI (DI5655)', '8989'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //689 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster External (DE5625)', '8990'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //690 try { addBoxItem(document.Support_Form.Product_ID, 'Modem Blaster 28.8 External', '5000'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //691 try { addBoxItem(document.Support_Form.Product_ID, 'CT5451 Modem Blaster Voice PnP', '5001'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //692 try { addBoxItem(document.Support_Form.Product_ID, 'Phone Blaster', '1809'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //693 break;694 }695 break;696 case 106 : // Software697 switch(parseInt(famID)) {698 case 241 : // HansVision DXT699 try { addBoxItem(document.Support_Form.Product_ID, 'HansVision DXT 2005 Edition', '12218'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //700 break;701 case 242 : // Children\'s Multimedia Educational702 try { addBoxItem(document.Support_Form.Product_ID, 'WaWaYaYa Happy Mandarin Series', '11269'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //703 try { addBoxItem(document.Support_Form.Product_ID, 'WaWaYaYa Happy English Series', '4932'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //704 break;705 case 107 : // HansVision706 try { addBoxItem(document.Support_Form.Product_ID, 'HansVision DXT', '4928'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //707 break;708 case 108 : // WaWaYaYa709 try { addBoxItem(document.Support_Form.Product_ID, 'WaWaYaYa Comprehensive Ability Series', '4930'); } catch(e) {addBoxItem(document.Support_Form.Product_ID, '1', '2'); } //710 break;711 case 109 : // Others712 break;713 }714 break;715 }716 // addBoxItem(document.Support_Form.Product_ID, 'Zen Portable Media Center', 'DUMMYPREFIX_ZenPMC_Temp|9882');717}718try719{720 productList(0,0);721}722catch(e)723{724}...
test_support.py
Source:test_support.py
1import contextlib2import errno3import importlib4import io5import os6import shutil7import socket8import stat9import subprocess10import sys11import tempfile12import textwrap13import time14import unittest15from test import support16from test.support import script_helper17TESTFN = support.TESTFN18class TestSupport(unittest.TestCase):19 def test_import_module(self):20 support.import_module("ftplib")21 self.assertRaises(unittest.SkipTest, support.import_module, "foo")22 def test_import_fresh_module(self):23 support.import_fresh_module("ftplib")24 def test_get_attribute(self):25 self.assertEqual(support.get_attribute(self, "test_get_attribute"),26 self.test_get_attribute)27 self.assertRaises(unittest.SkipTest, support.get_attribute, self, "foo")28 @unittest.skip("failing buildbots")29 def test_get_original_stdout(self):30 self.assertEqual(support.get_original_stdout(), sys.stdout)31 def test_unload(self):32 import sched33 self.assertIn("sched", sys.modules)34 support.unload("sched")35 self.assertNotIn("sched", sys.modules)36 def test_unlink(self):37 with open(TESTFN, "w") as f:38 pass39 support.unlink(TESTFN)40 self.assertFalse(os.path.exists(TESTFN))41 support.unlink(TESTFN)42 def test_rmtree(self):43 dirpath = support.TESTFN + 'd'44 subdirpath = os.path.join(dirpath, 'subdir')45 os.mkdir(dirpath)46 os.mkdir(subdirpath)47 support.rmtree(dirpath)48 self.assertFalse(os.path.exists(dirpath))49 with support.swap_attr(support, 'verbose', 0):50 support.rmtree(dirpath)51 os.mkdir(dirpath)52 os.mkdir(subdirpath)53 os.chmod(dirpath, stat.S_IRUSR|stat.S_IXUSR)54 with support.swap_attr(support, 'verbose', 0):55 support.rmtree(dirpath)56 self.assertFalse(os.path.exists(dirpath))57 os.mkdir(dirpath)58 os.mkdir(subdirpath)59 os.chmod(dirpath, 0)60 with support.swap_attr(support, 'verbose', 0):61 support.rmtree(dirpath)62 self.assertFalse(os.path.exists(dirpath))63 def test_forget(self):64 mod_filename = TESTFN + '.py'65 with open(mod_filename, 'w') as f:66 print('foo = 1', file=f)67 sys.path.insert(0, os.curdir)68 importlib.invalidate_caches()69 try:70 mod = __import__(TESTFN)71 self.assertIn(TESTFN, sys.modules)72 support.forget(TESTFN)73 self.assertNotIn(TESTFN, sys.modules)74 finally:75 del sys.path[0]76 support.unlink(mod_filename)77 support.rmtree('__pycache__')78 def test_HOST(self):79 s = socket.socket()80 s.bind((support.HOST, 0))81 s.close()82 def test_find_unused_port(self):83 port = support.find_unused_port()84 s = socket.socket()85 s.bind((support.HOST, port))86 s.close()87 def test_bind_port(self):88 s = socket.socket()89 support.bind_port(s)90 s.listen()91 s.close()92 # Tests for temp_dir()93 def test_temp_dir(self):94 """Test that temp_dir() creates and destroys its directory."""95 parent_dir = tempfile.mkdtemp()96 parent_dir = os.path.realpath(parent_dir)97 try:98 path = os.path.join(parent_dir, 'temp')99 self.assertFalse(os.path.isdir(path))100 with support.temp_dir(path) as temp_path:101 self.assertEqual(temp_path, path)102 self.assertTrue(os.path.isdir(path))103 self.assertFalse(os.path.isdir(path))104 finally:105 support.rmtree(parent_dir)106 def test_temp_dir__path_none(self):107 """Test passing no path."""108 with support.temp_dir() as temp_path:109 self.assertTrue(os.path.isdir(temp_path))110 self.assertFalse(os.path.isdir(temp_path))111 def test_temp_dir__existing_dir__quiet_default(self):112 """Test passing a directory that already exists."""113 def call_temp_dir(path):114 with support.temp_dir(path) as temp_path:115 raise Exception("should not get here")116 path = tempfile.mkdtemp()117 path = os.path.realpath(path)118 try:119 self.assertTrue(os.path.isdir(path))120 self.assertRaises(FileExistsError, call_temp_dir, path)121 # Make sure temp_dir did not delete the original directory.122 self.assertTrue(os.path.isdir(path))123 finally:124 shutil.rmtree(path)125 def test_temp_dir__existing_dir__quiet_true(self):126 """Test passing a directory that already exists with quiet=True."""127 path = tempfile.mkdtemp()128 path = os.path.realpath(path)129 try:130 with support.check_warnings() as recorder:131 with support.temp_dir(path, quiet=True) as temp_path:132 self.assertEqual(path, temp_path)133 warnings = [str(w.message) for w in recorder.warnings]134 # Make sure temp_dir did not delete the original directory.135 self.assertTrue(os.path.isdir(path))136 finally:137 shutil.rmtree(path)138 self.assertEqual(len(warnings), 1, warnings)139 warn = warnings[0]140 self.assertTrue(warn.startswith(f'tests may fail, unable to create '141 f'temporary directory {path!r}: '),142 warn)143 @unittest.skipUnless(hasattr(os, "fork"), "test requires os.fork")144 def test_temp_dir__forked_child(self):145 """Test that a forked child process does not remove the directory."""146 # See bpo-30028 for details.147 # Run the test as an external script, because it uses fork.148 script_helper.assert_python_ok("-c", textwrap.dedent("""149 import os150 from test import support151 with support.temp_cwd() as temp_path:152 pid = os.fork()153 if pid != 0:154 # parent process (child has pid == 0)155 # wait for the child to terminate156 (pid, status) = os.waitpid(pid, 0)157 if status != 0:158 raise AssertionError(f"Child process failed with exit "159 f"status indication 0x{status:x}.")160 # Make sure that temp_path is still present. When the child161 # process leaves the 'temp_cwd'-context, the __exit__()-162 # method of the context must not remove the temporary163 # directory.164 if not os.path.isdir(temp_path):165 raise AssertionError("Child removed temp_path.")166 """))167 # Tests for change_cwd()168 def test_change_cwd(self):169 original_cwd = os.getcwd()170 with support.temp_dir() as temp_path:171 with support.change_cwd(temp_path) as new_cwd:172 self.assertEqual(new_cwd, temp_path)173 self.assertEqual(os.getcwd(), new_cwd)174 self.assertEqual(os.getcwd(), original_cwd)175 def test_change_cwd__non_existent_dir(self):176 """Test passing a non-existent directory."""177 original_cwd = os.getcwd()178 def call_change_cwd(path):179 with support.change_cwd(path) as new_cwd:180 raise Exception("should not get here")181 with support.temp_dir() as parent_dir:182 non_existent_dir = os.path.join(parent_dir, 'does_not_exist')183 self.assertRaises(FileNotFoundError, call_change_cwd,184 non_existent_dir)185 self.assertEqual(os.getcwd(), original_cwd)186 def test_change_cwd__non_existent_dir__quiet_true(self):187 """Test passing a non-existent directory with quiet=True."""188 original_cwd = os.getcwd()189 with support.temp_dir() as parent_dir:190 bad_dir = os.path.join(parent_dir, 'does_not_exist')191 with support.check_warnings() as recorder:192 with support.change_cwd(bad_dir, quiet=True) as new_cwd:193 self.assertEqual(new_cwd, original_cwd)194 self.assertEqual(os.getcwd(), new_cwd)195 warnings = [str(w.message) for w in recorder.warnings]196 self.assertEqual(len(warnings), 1, warnings)197 warn = warnings[0]198 self.assertTrue(warn.startswith(f'tests may fail, unable to change '199 f'the current working directory '200 f'to {bad_dir!r}: '),201 warn)202 # Tests for change_cwd()203 def test_change_cwd__chdir_warning(self):204 """Check the warning message when os.chdir() fails."""205 path = TESTFN + '_does_not_exist'206 with support.check_warnings() as recorder:207 with support.change_cwd(path=path, quiet=True):208 pass209 messages = [str(w.message) for w in recorder.warnings]210 self.assertEqual(len(messages), 1, messages)211 msg = messages[0]212 self.assertTrue(msg.startswith(f'tests may fail, unable to change '213 f'the current working directory '214 f'to {path!r}: '),215 msg)216 # Tests for temp_cwd()217 def test_temp_cwd(self):218 here = os.getcwd()219 with support.temp_cwd(name=TESTFN):220 self.assertEqual(os.path.basename(os.getcwd()), TESTFN)221 self.assertFalse(os.path.exists(TESTFN))222 self.assertEqual(os.getcwd(), here)223 def test_temp_cwd__name_none(self):224 """Test passing None to temp_cwd()."""225 original_cwd = os.getcwd()226 with support.temp_cwd(name=None) as new_cwd:227 self.assertNotEqual(new_cwd, original_cwd)228 self.assertTrue(os.path.isdir(new_cwd))229 self.assertEqual(os.getcwd(), new_cwd)230 self.assertEqual(os.getcwd(), original_cwd)231 def test_sortdict(self):232 self.assertEqual(support.sortdict({3:3, 2:2, 1:1}), "{1: 1, 2: 2, 3: 3}")233 def test_make_bad_fd(self):234 fd = support.make_bad_fd()235 with self.assertRaises(OSError) as cm:236 os.write(fd, b"foo")237 self.assertEqual(cm.exception.errno, errno.EBADF)238 def test_check_syntax_error(self):239 support.check_syntax_error(self, "def class", lineno=1, offset=9)240 with self.assertRaises(AssertionError):241 support.check_syntax_error(self, "x=1")242 def test_CleanImport(self):243 import importlib244 with support.CleanImport("asyncore"):245 importlib.import_module("asyncore")246 def test_DirsOnSysPath(self):247 with support.DirsOnSysPath('foo', 'bar'):248 self.assertIn("foo", sys.path)249 self.assertIn("bar", sys.path)250 self.assertNotIn("foo", sys.path)251 self.assertNotIn("bar", sys.path)252 def test_captured_stdout(self):253 with support.captured_stdout() as stdout:254 print("hello")255 self.assertEqual(stdout.getvalue(), "hello\n")256 def test_captured_stderr(self):257 with support.captured_stderr() as stderr:258 print("hello", file=sys.stderr)259 self.assertEqual(stderr.getvalue(), "hello\n")260 def test_captured_stdin(self):261 with support.captured_stdin() as stdin:262 stdin.write('hello\n')263 stdin.seek(0)264 # call test code that consumes from sys.stdin265 captured = input()266 self.assertEqual(captured, "hello")267 def test_gc_collect(self):268 support.gc_collect()269 def test_python_is_optimized(self):270 self.assertIsInstance(support.python_is_optimized(), bool)271 def test_swap_attr(self):272 class Obj:273 pass274 obj = Obj()275 obj.x = 1276 with support.swap_attr(obj, "x", 5) as x:277 self.assertEqual(obj.x, 5)278 self.assertEqual(x, 1)279 self.assertEqual(obj.x, 1)280 with support.swap_attr(obj, "y", 5) as y:281 self.assertEqual(obj.y, 5)282 self.assertIsNone(y)283 self.assertFalse(hasattr(obj, 'y'))284 with support.swap_attr(obj, "y", 5):285 del obj.y286 self.assertFalse(hasattr(obj, 'y'))287 def test_swap_item(self):288 D = {"x":1}289 with support.swap_item(D, "x", 5) as x:290 self.assertEqual(D["x"], 5)291 self.assertEqual(x, 1)292 self.assertEqual(D["x"], 1)293 with support.swap_item(D, "y", 5) as y:294 self.assertEqual(D["y"], 5)295 self.assertIsNone(y)296 self.assertNotIn("y", D)297 with support.swap_item(D, "y", 5):298 del D["y"]299 self.assertNotIn("y", D)300 class RefClass:301 attribute1 = None302 attribute2 = None303 _hidden_attribute1 = None304 __magic_1__ = None305 class OtherClass:306 attribute2 = None307 attribute3 = None308 __magic_1__ = None309 __magic_2__ = None310 def test_detect_api_mismatch(self):311 missing_items = support.detect_api_mismatch(self.RefClass,312 self.OtherClass)313 self.assertEqual({'attribute1'}, missing_items)314 missing_items = support.detect_api_mismatch(self.OtherClass,315 self.RefClass)316 self.assertEqual({'attribute3', '__magic_2__'}, missing_items)317 def test_detect_api_mismatch__ignore(self):318 ignore = ['attribute1', 'attribute3', '__magic_2__', 'not_in_either']319 missing_items = support.detect_api_mismatch(320 self.RefClass, self.OtherClass, ignore=ignore)321 self.assertEqual(set(), missing_items)322 missing_items = support.detect_api_mismatch(323 self.OtherClass, self.RefClass, ignore=ignore)324 self.assertEqual(set(), missing_items)325 def test_check__all__(self):326 extra = {'tempdir'}327 blacklist = {'template'}328 support.check__all__(self,329 tempfile,330 extra=extra,331 blacklist=blacklist)332 extra = {'TextTestResult', 'installHandler'}333 blacklist = {'load_tests', "TestProgram", "BaseTestSuite"}334 support.check__all__(self,335 unittest,336 ("unittest.result", "unittest.case",337 "unittest.suite", "unittest.loader",338 "unittest.main", "unittest.runner",339 "unittest.signals"),340 extra=extra,341 blacklist=blacklist)342 self.assertRaises(AssertionError, support.check__all__, self, unittest)343 @unittest.skipUnless(hasattr(os, 'waitpid') and hasattr(os, 'WNOHANG'),344 'need os.waitpid() and os.WNOHANG')345 def test_reap_children(self):346 # Make sure that there is no other pending child process347 support.reap_children()348 # Create a child process349 pid = os.fork()350 if pid == 0:351 # child process: do nothing, just exit352 os._exit(0)353 t0 = time.monotonic()354 deadline = time.monotonic() + 60.0355 was_altered = support.environment_altered356 try:357 support.environment_altered = False358 stderr = io.StringIO()359 while True:360 if time.monotonic() > deadline:361 self.fail("timeout")362 with contextlib.redirect_stderr(stderr):363 support.reap_children()364 # Use environment_altered to check if reap_children() found365 # the child process366 if support.environment_altered:367 break368 # loop until the child process completed369 time.sleep(0.100)370 msg = "Warning -- reap_children() reaped child process %s" % pid371 self.assertIn(msg, stderr.getvalue())372 self.assertTrue(support.environment_altered)373 finally:374 support.environment_altered = was_altered375 # Just in case, check again that there is no other376 # pending child process377 support.reap_children()378 def check_options(self, args, func, expected=None):379 code = f'from test.support import {func}; print(repr({func}()))'380 cmd = [sys.executable, *args, '-c', code]381 env = {key: value for key, value in os.environ.items()382 if not key.startswith('PYTHON')}383 proc = subprocess.run(cmd,384 stdout=subprocess.PIPE,385 stderr=subprocess.DEVNULL,386 universal_newlines=True,387 env=env)388 if expected is None:389 expected = args390 self.assertEqual(proc.stdout.rstrip(), repr(expected))391 self.assertEqual(proc.returncode, 0)392 def test_args_from_interpreter_flags(self):393 # Test test.support.args_from_interpreter_flags()394 for opts in (395 # no option396 [],397 # single option398 ['-B'],399 ['-s'],400 ['-S'],401 ['-E'],402 ['-v'],403 ['-b'],404 ['-q'],405 ['-I'],406 # same option multiple times407 ['-bb'],408 ['-vvv'],409 # -W options410 ['-Wignore'],411 # -X options412 ['-X', 'dev'],413 ['-Wignore', '-X', 'dev'],414 ['-X', 'faulthandler'],415 ['-X', 'importtime'],416 ['-X', 'showalloccount'],417 ['-X', 'showrefcount'],418 ['-X', 'tracemalloc'],419 ['-X', 'tracemalloc=3'],420 ):421 with self.subTest(opts=opts):422 self.check_options(opts, 'args_from_interpreter_flags')423 self.check_options(['-I', '-E', '-s'], 'args_from_interpreter_flags',424 ['-I'])425 def test_optim_args_from_interpreter_flags(self):426 # Test test.support.optim_args_from_interpreter_flags()427 for opts in (428 # no option429 [],430 ['-O'],431 ['-OO'],432 ['-OOOO'],433 ):434 with self.subTest(opts=opts):435 self.check_options(opts, 'optim_args_from_interpreter_flags')436 def test_match_test(self):437 class Test:438 def __init__(self, test_id):439 self.test_id = test_id440 def id(self):441 return self.test_id442 test_access = Test('test.test_os.FileTests.test_access')443 test_chdir = Test('test.test_os.Win32ErrorTests.test_chdir')444 with support.swap_attr(support, '_match_test_func', None):445 # match all446 support.set_match_tests([])447 self.assertTrue(support.match_test(test_access))448 self.assertTrue(support.match_test(test_chdir))449 # match all using None450 support.set_match_tests(None)451 self.assertTrue(support.match_test(test_access))452 self.assertTrue(support.match_test(test_chdir))453 # match the full test identifier454 support.set_match_tests([test_access.id()])455 self.assertTrue(support.match_test(test_access))456 self.assertFalse(support.match_test(test_chdir))457 # match the module name458 support.set_match_tests(['test_os'])459 self.assertTrue(support.match_test(test_access))460 self.assertTrue(support.match_test(test_chdir))461 # Test '*' pattern462 support.set_match_tests(['test_*'])463 self.assertTrue(support.match_test(test_access))464 self.assertTrue(support.match_test(test_chdir))465 # Test case sensitivity466 support.set_match_tests(['filetests'])467 self.assertFalse(support.match_test(test_access))468 support.set_match_tests(['FileTests'])469 self.assertTrue(support.match_test(test_access))470 # Test pattern containing '.' and a '*' metacharacter471 support.set_match_tests(['*test_os.*.test_*'])472 self.assertTrue(support.match_test(test_access))473 self.assertTrue(support.match_test(test_chdir))474 # Multiple patterns475 support.set_match_tests([test_access.id(), test_chdir.id()])476 self.assertTrue(support.match_test(test_access))477 self.assertTrue(support.match_test(test_chdir))478 support.set_match_tests(['test_access', 'DONTMATCH'])479 self.assertTrue(support.match_test(test_access))480 self.assertFalse(support.match_test(test_chdir))481 def test_fd_count(self):482 # We cannot test the absolute value of fd_count(): on old Linux483 # kernel or glibc versions, os.urandom() keeps a FD open on484 # /dev/urandom device and Python has 4 FD opens instead of 3.485 start = support.fd_count()486 fd = os.open(__file__, os.O_RDONLY)487 try:488 more = support.fd_count()489 finally:490 os.close(fd)491 self.assertEqual(more - start, 1)492 # XXX -follows a list of untested API493 # make_legacy_pyc494 # is_resource_enabled495 # requires496 # fcmp497 # umaks498 # findfile499 # check_warnings500 # EnvironmentVarGuard501 # TransientResource502 # transient_internet503 # run_with_locale504 # set_memlimit505 # bigmemtest506 # precisionbigmemtest507 # bigaddrspacetest508 # requires_resource509 # run_doctest510 # threading_cleanup511 # reap_threads512 # strip_python_stderr513 # can_symlink514 # skip_unless_symlink515 # SuppressCrashReport516def test_main():517 tests = [TestSupport]518 support.run_unittest(*tests)519if __name__ == '__main__':...
generatev4.py
Source:generatev4.py
1#!/usr/bin/python2# Copyright (C) 2015 The Android Open Source Project3#4# Licensed under the Apache License, Version 2.0 (the "License");5# you may not use this file except in compliance with the License.6# You may obtain a copy of the License at7#8# http://www.apache.org/licenses/LICENSE-2.09#10# Unless required by applicable law or agreed to in writing, software11# distributed under the License is distributed on an "AS IS" BASIS,12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13# See the License for the specific language governing permissions and14# limitations under the License.15import os16import sys17import getopt18def write_java_head(tofile, name):19 tofile.write("/* This file is auto-generated from {}.java. DO NOT MODIFY. */\n\n".format(name))20def replace_xml_head(line, name):21 return line.replace('<?xml version="1.0" encoding="utf-8"?>', '<?xml version="1.0" encoding="utf-8"?>\n<!-- This file is auto-generated from {}.xml. DO NOT MODIFY. -->\n'.format(name))22file = open('src/com/example/android/leanback/GuidedStepActivity.java', 'r')23outfile = open('src/com/example/android/leanback/GuidedStepSupportActivity.java', 'w')24write_java_head(outfile, "GuidedStepActivity")25for line in file:26 line = line.replace('android.app.Fragment', 'android.support.v4.app.Fragment')27 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')28 line = line.replace('GuidedStepFragment', 'GuidedStepSupportFragment')29 line = line.replace('GuidedStepActivity', 'GuidedStepSupportActivity')30 line = line.replace('extends Activity', 'extends FragmentActivity')31 outfile.write(line)32file.close()33outfile.close()34file = open('src/com/example/android/leanback/GuidedStepHalfScreenActivity.java', 'r')35outfile = open('src/com/example/android/leanback/GuidedStepSupportHalfScreenActivity.java', 'w')36write_java_head(outfile, "GuidedStepHalfScreenActivity")37for line in file:38 line = line.replace('android.app.Fragment', 'android.support.v4.app.Fragment')39 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')40 line = line.replace('GuidedStepFragment', 'GuidedStepSupportFragment')41 line = line.replace('GuidedStepActivity', 'GuidedStepSupportActivity')42 line = line.replace('GuidedStepHalfScreenActivity', 'GuidedStepSupportHalfScreenActivity')43 line = line.replace('extends Activity', 'extends FragmentActivity')44 outfile.write(line)45file.close()46outfile.close()47file = open('src/com/example/android/leanback/BrowseFragment.java', 'r')48outfile = open('src/com/example/android/leanback/BrowseSupportFragment.java', 'w')49write_java_head(outfile, "BrowseFragment")50for line in file:51 line = line.replace('android.app.Fragment', 'android.support.v4.app.Fragment')52 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')53 line = line.replace('BrowseFragment', 'BrowseSupportFragment')54 line = line.replace('GuidedStepFragment', 'GuidedStepSupportFragment')55 line = line.replace('GuidedStepActivity', 'GuidedStepSupportActivity')56 line = line.replace('getActivity().getFragmentManager()', 'getActivity().getSupportFragmentManager()')57 line = line.replace('BrowseActivity', 'BrowseSupportActivity')58 line = line.replace('DetailsActivity', 'DetailsSupportActivity')59 line = line.replace('SearchActivity', 'SearchSupportActivity')60 line = line.replace('RowsActivity', 'RowsSupportActivity')61 line = line.replace('RowsFragment', 'RowsSupportFragment')62 line = line.replace('GuidedStepHalfScreenActivity', 'GuidedStepSupportHalfScreenActivity')63 outfile.write(line)64file.close()65outfile.close()66file = open('src/com/example/android/leanback/BrowseActivity.java', 'r')67outfile = open('src/com/example/android/leanback/BrowseSupportActivity.java', 'w')68write_java_head(outfile, "BrowseActivity")69for line in file:70 line = line.replace('BrowseActivity', 'BrowseSupportActivity')71 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')72 line = line.replace('extends Activity', 'extends FragmentActivity')73 line = line.replace('R.layout.browse', 'R.layout.browse_support')74 outfile.write(line)75file.close()76outfile.close()77file = open('res/layout/browse.xml', 'r')78outfile = open('res/layout/browse_support.xml', 'w')79for line in file:80 line = replace_xml_head(line, "browse")81 line = line.replace('com.example.android.leanback.BrowseFragment', 'com.example.android.leanback.BrowseSupportFragment')82 outfile.write(line)83file.close()84outfile.close()85file = open('src/com/example/android/leanback/DetailsFragment.java', 'r')86outfile = open('src/com/example/android/leanback/DetailsSupportFragment.java', 'w')87write_java_head(outfile, "DetailsFragment")88for line in file:89 line = line.replace('android.app.Fragment', 'android.support.v4.app.Fragment')90 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')91 line = line.replace('DetailsFragment', 'DetailsSupportFragment')92 line = line.replace('DetailsActivity', 'DetailsSupportActivity')93 line = line.replace('PlaybackOverlayActivity', 'PlaybackOverlaySupportActivity')94 line = line.replace('SearchActivity', 'SearchSupportActivity')95 outfile.write(line)96file.close()97outfile.close()98file = open('src/com/example/android/leanback/NewDetailsFragment.java', 'r')99outfile = open('src/com/example/android/leanback/NewDetailsSupportFragment.java', 'w')100write_java_head(outfile, "NewDetailsFragment")101for line in file:102 line = line.replace('android.app.Fragment', 'android.support.v4.app.Fragment')103 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')104 line = line.replace('DetailsFragment', 'DetailsSupportFragment')105 line = line.replace('DetailsActivity', 'DetailsSupportActivity')106 line = line.replace('PlaybackOverlayActivity', 'PlaybackOverlaySupportActivity')107 line = line.replace('SearchActivity', 'SearchSupportActivity')108 outfile.write(line)109file.close()110outfile.close()111file = open('src/com/example/android/leanback/DetailsActivity.java', 'r')112outfile = open('src/com/example/android/leanback/DetailsSupportActivity.java', 'w')113write_java_head(outfile, "DetailsActivity")114for line in file:115 line = line.replace('DetailsActivity', 'DetailsSupportActivity')116 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')117 line = line.replace('extends Activity', 'extends FragmentActivity')118 line = line.replace('R.layout.details', 'R.layout.details_support')119 line = line.replace('R.layout.legacy_details', 'R.layout.legacy_details_support')120 line = line.replace('getFragmentManager()', 'getSupportFragmentManager()')121 line = line.replace('DetailsFragment', 'DetailsSupportFragment')122 line = line.replace('NewDetailsFragment', 'NewDetailsSupportFragment')123 outfile.write(line)124file.close()125outfile.close()126file = open('res/layout/details.xml', 'r')127outfile = open('res/layout/details_support.xml', 'w')128for line in file:129 line = replace_xml_head(line, "details")130 line = line.replace('com.example.android.leanback.NewDetailsFragment', 'com.example.android.leanback.NewDetailsSupportFragment')131 outfile.write(line)132file.close()133outfile.close()134file = open('res/layout/legacy_details.xml', 'r')135outfile = open('res/layout/legacy_details_support.xml', 'w')136for line in file:137 line = replace_xml_head(line, "legacy_details")138 line = line.replace('com.example.android.leanback.DetailsFragment', 'com.example.android.leanback.DetailsSupportFragment')139 outfile.write(line)140file.close()141outfile.close()142file = open('src/com/example/android/leanback/SearchDetailsActivity.java', 'r')143outfile = open('src/com/example/android/leanback/SearchDetailsSupportActivity.java', 'w')144write_java_head(outfile, "SearchDetailsActivity")145for line in file:146 line = line.replace('DetailsActivity', 'DetailsSupportActivity')147 outfile.write(line)148file.close()149outfile.close()150file = open('src/com/example/android/leanback/SearchFragment.java', 'r')151outfile = open('src/com/example/android/leanback/SearchSupportFragment.java', 'w')152write_java_head(outfile, "SearchFragment")153for line in file:154 line = line.replace('SearchFragment', 'SearchSupportFragment')155 line = line.replace('DetailsActivity', 'DetailsSupportActivity')156 outfile.write(line)157file.close()158outfile.close()159file = open('src/com/example/android/leanback/SearchActivity.java', 'r')160outfile = open('src/com/example/android/leanback/SearchSupportActivity.java', 'w')161write_java_head(outfile, "SearchActivity")162for line in file:163 line = line.replace('SearchActivity', 'SearchSupportActivity')164 line = line.replace('extends Activity', 'extends FragmentActivity')165 line = line.replace('R.layout.search', 'R.layout.search_support')166 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')167 line = line.replace('getFragmentManager()', 'getSupportFragmentManager()')168 line = line.replace('SearchFragment', 'SearchSupportFragment')169 outfile.write(line)170file.close()171outfile.close()172file = open('res/layout/search.xml', 'r')173outfile = open('res/layout/search_support.xml', 'w')174for line in file:175 line = replace_xml_head(line, "search")176 line = line.replace('com.example.android.leanback.SearchFragment', 'com.example.android.leanback.SearchSupportFragment')177 outfile.write(line)178file.close()179outfile.close()180file = open('src/com/example/android/leanback/VerticalGridFragment.java', 'r')181outfile = open('src/com/example/android/leanback/VerticalGridSupportFragment.java', 'w')182outfile.write("/* This file is auto-generated from VerticalGridFragment. DO NOT MODIFY. */\n\n")183for line in file:184 line = line.replace('VerticalGridFragment', 'VerticalGridSupportFragment')185 line = line.replace('DetailsActivity', 'DetailsSupportActivity')186 line = line.replace('SearchActivity', 'SearchSupportActivity')187 outfile.write(line)188file.close()189outfile.close()190file = open('src/com/example/android/leanback/VerticalGridActivity.java', 'r')191outfile = open('src/com/example/android/leanback/VerticalGridSupportActivity.java', 'w')192write_java_head(outfile, "VerticalGridActivity")193for line in file:194 line = line.replace('VerticalGridActivity', 'VerticalGridSupportActivity')195 line = line.replace('extends Activity', 'extends FragmentActivity')196 line = line.replace('R.layout.vertical_grid', 'R.layout.vertical_grid_support')197 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')198 line = line.replace('getFragmentManager()', 'getSupportFragmentManager()')199 line = line.replace('VerticalGridFragment', 'VerticalGridSupportFragment')200 outfile.write(line)201file.close()202outfile.close()203file = open('res/layout/vertical_grid.xml', 'r')204outfile = open('res/layout/vertical_grid_support.xml', 'w')205for line in file:206 line = replace_xml_head(line, "vertical_grid")207 line = line.replace('com.example.android.leanback.VerticalGridFragment', 'com.example.android.leanback.VerticalGridSupportFragment')208 outfile.write(line)209file.close()210outfile.close()211file = open('src/com/example/android/leanback/ErrorFragment.java', 'r')212outfile = open('src/com/example/android/leanback/ErrorSupportFragment.java', 'w')213write_java_head(outfile, "ErrorFragment")214for line in file:215 line = line.replace('ErrorFragment', 'ErrorSupportFragment')216 outfile.write(line)217file.close()218outfile.close()219file = open('src/com/example/android/leanback/BrowseErrorActivity.java', 'r')220outfile = open('src/com/example/android/leanback/BrowseErrorSupportActivity.java', 'w')221write_java_head(outfile, "BrowseErrorActivity")222for line in file:223 line = line.replace('BrowseErrorActivity', 'BrowseErrorSupportActivity')224 line = line.replace('extends Activity', 'extends FragmentActivity')225 line = line.replace('R.layout.browse', 'R.layout.browse_support')226 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')227 line = line.replace('getFragmentManager()', 'getSupportFragmentManager()')228 line = line.replace('ErrorFragment', 'ErrorSupportFragment')229 line = line.replace('SpinnerFragment', 'SpinnerSupportFragment')230 line = line.replace('android.app.Fragment', 'android.support.v4.app.Fragment')231 outfile.write(line)232file.close()233outfile.close()234file = open('src/com/example/android/leanback/RowsFragment.java', 'r')235outfile = open('src/com/example/android/leanback/RowsSupportFragment.java', 'w')236write_java_head(outfile, "RowsFragment")237for line in file:238 line = line.replace('RowsFragment', 'RowsSupportFragment')239 line = line.replace('DetailsActivity', 'DetailsSupportActivity')240 outfile.write(line)241file.close()242outfile.close()243file = open('src/com/example/android/leanback/RowsActivity.java', 'r')244outfile = open('src/com/example/android/leanback/RowsSupportActivity.java', 'w')245write_java_head(outfile, "RowsActivity")246for line in file:247 line = line.replace('RowsActivity', 'RowsSupportActivity')248 line = line.replace('extends Activity', 'extends FragmentActivity')249 line = line.replace('R.layout.rows', 'R.layout.rows_support')250 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')251 line = line.replace('RowsFragment', 'RowsSupportFragment')252 line = line.replace('getFragmentManager()', 'getSupportFragmentManager()')253 line = line.replace('SearchActivity', 'SearchSupportActivity')254 outfile.write(line)255file.close()256outfile.close()257file = open('res/layout/rows.xml', 'r')258outfile = open('res/layout/rows_support.xml', 'w')259for line in file:260 line = replace_xml_head(line, "rows")261 line = line.replace('com.example.android.leanback.RowsFragment', 'com.example.android.leanback.RowsSupportFragment')262 outfile.write(line)263file.close()264outfile.close()265file = open('src/com/example/android/leanback/PlaybackOverlayFragment.java', 'r')266outfile = open('src/com/example/android/leanback/PlaybackOverlaySupportFragment.java', 'w')267write_java_head(outfile, "PlaybackOverlayFragment")268for line in file:269 line = line.replace('PlaybackOverlayFragment', 'PlaybackOverlaySupportFragment')270 line = line.replace('PlaybackControlHelper', 'PlaybackControlSupportHelper')271 line = line.replace('PlaybackOverlayActivity', 'PlaybackOverlaySupportActivity')272 outfile.write(line)273file.close()274outfile.close()275file = open('src/com/example/android/leanback/PlaybackControlHelper.java', 'r')276outfile = open('src/com/example/android/leanback/PlaybackControlSupportHelper.java', 'w')277write_java_head(outfile, "PlaybackControlHelper")278for line in file:279 line = line.replace('PlaybackControlHelper', 'PlaybackControlSupportHelper')280 line = line.replace('PlaybackControlGlue', 'PlaybackControlSupportGlue')281 line = line.replace('PlaybackOverlayFragment', 'PlaybackOverlaySupportFragment')282 outfile.write(line)283file.close()284outfile.close()285file = open('src/com/example/android/leanback/PlaybackOverlayActivity.java', 'r')286outfile = open('src/com/example/android/leanback/PlaybackOverlaySupportActivity.java', 'w')287write_java_head(outfile, "PlaybackOverlayActivity")288for line in file:289 line = line.replace('PlaybackOverlayActivity', 'PlaybackOverlaySupportActivity')290 line = line.replace('extends Activity', 'extends FragmentActivity')291 line = line.replace('R.layout.playback_controls', 'R.layout.playback_controls_support')292 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')293 outfile.write(line)294file.close()295outfile.close()296file = open('res/layout/playback_controls.xml', 'r')297outfile = open('res/layout/playback_controls_support.xml', 'w')298for line in file:299 line = replace_xml_head(line, "playback_controls")300 line = line.replace('com.example.android.leanback.PlaybackOverlayFragment', 'com.example.android.leanback.PlaybackOverlaySupportFragment')301 outfile.write(line)302file.close()303outfile.close()304file = open('src/com/example/android/leanback/OnboardingActivity.java', 'r')305outfile = open('src/com/example/android/leanback/OnboardingSupportActivity.java', 'w')306write_java_head(outfile, "OnboardingActivity")307for line in file:308 line = line.replace('android.app.Fragment', 'android.support.v4.app.Fragment')309 line = line.replace('android.app.Activity', 'android.support.v4.app.FragmentActivity')310 line = line.replace('OnboardingActivity', 'OnboardingSupportActivity')311 line = line.replace('OnboardingDemoFragment', 'OnboardingDemoSupportFragment')312 line = line.replace('extends Activity', 'extends FragmentActivity')313 line = line.replace('getFragmentManager()', 'getSupportFragmentManager()')314 outfile.write(line)315file.close()316outfile.close()317file = open('src/com/example/android/leanback/OnboardingDemoFragment.java', 'r')318outfile = open('src/com/example/android/leanback/OnboardingDemoSupportFragment.java', 'w')319write_java_head(outfile, "OnboardingDemoFragment")320for line in file:321 line = line.replace('android.app.Fragment', 'android.support.v4.app.Fragment')322 line = line.replace('import android.app.Activity', 'import android.support.v4.app.FragmentActivity')323 line = line.replace('OnboardingDemoFragment', 'OnboardingDemoSupportFragment')324 line = line.replace('OnboardingFragment', 'OnboardingSupportFragment')325 line = line.replace('OnboardingActivity', 'OnboardingSupportActivity')326 outfile.write(line)327file.close()...
Using AI Code Generation
1var wpt = require('wpt');2 if (err) {3 console.log(err);4 } else {5 console.log(data);6 }7});8var wpt = require('wpt');9 if (err) {10 console.log(err);11 } else {12 console.log(data);13 }14});15var wpt = require('wpt');16 if (err) {17 console.log(err);18 } else {19 console.log(data);20 }21});22var wpt = require('wpt');23 if (err) {24 console.log(err);25 } else {26 console.log(data);27 }28});29var wpt = require('wpt');30 if (err) {31 console.log(err);32 } else {33 console.log(data);34 }35});36var wpt = require('wpt');37 if (err) {38 console.log(err);39 } else {40 console.log(data);41 }42});43var wpt = require('wpt');44 if (err) {45 console.log(err);46 } else {47 console.log(data);48 }49});50var wpt = require('wpt');51 if (err) {52 console.log(err);53 } else {54 console.log(data);55 }56});57var wpt = require('wpt');
Using AI Code Generation
1var wpt = require('webpagetest');2var api = new wpt('www.webpagetest.org');3 if (err) {4 console.log(err);5 } else {6 console.log(data);7 }8});9var wpt = require('webpagetest');10var api = new wpt('www.webpagetest.org');11 if (err) {12 console.log(err);13 } else {14 console.log(data);15 }16});17var wpt = require('webpagetest');18var api = new wpt('www.webpagetest.org');19 if (err) {20 console.log(err);21 } else {22 console.log(data);23 }24});25var wpt = require('webpagetest');26var api = new wpt('www.webpagetest.org');27 if (err) {28 console.log(err);29 } else {30 console.log(data);31 }32});33var wpt = require('webpagetest');34var api = new wpt('www.webpagetest.org');35 if (err) {36 console.log(err);37 } else {38 console.log(data);39 }40});41var wpt = require('webpagetest');42var api = new wpt('www.webpagetest.org');43 if (err) {44 console.log(err);45 } else {46 console.log(data);47 }48});49var wpt = require('webpagetest');50var api = new wpt('www
Using AI Code Generation
1var wpt = require('webpagetest');2var api = new wpt('www.webpagetest.org');3api.runTest('www.example.com', {location: 'Dulles:Chrome'}, function(err, data) {4 console.log(data.data.runs[1].firstView);5 console.log(data.data.median.firstView);6});
Using AI Code Generation
1var wpt = require('webpagetest');2var api = new wpt('www.webpagetest.org');3var options = {4 videoParams: {5 }6};7api.runTest(url, options, function(err, data) {8 if (err) return console.error(err);9 console.log(data);10});11var wpt = require('webpagetest');12var api = new wpt('www.webpagetest.org');13var options = {14 videoParams: {15 }16};17api.runTest(url, options, function(err, data) {18 if (err) return console.error(err);19 console.log(data);20});21var wpt = require('webpagetest');22var api = new wpt('www.webpagetest.org');23var options = {
Using AI Code Generation
1var wpt = require('./wpt.js');2wpt.support(function (data) {3 console.log(data);4});5var request = require('request');6var wpt = {7 support: function (callback) {8 if (!error && response.statusCode == 200) {9 callback(body);10 }11 });12 }13};14module.exports = wpt;
Using AI Code Generation
1var wpt = require('wpt');2wpt.support(function(err, data){3 if(err){4 console.log('Error:', err);5 }else{6 console.log('Support:', data);7 }8});9var wpt = require('wpt');10wpt.support(function(err, data){11 if(err){12 console.log('Error:', err);13 }else{14 console.log('Support:', data);15 }16});17var wpt = require('wpt');18wpt.support(function(err, data){19 if(err){20 console.log('Error:', err);21 }else{22 console.log('Support:', data);23 }24});25var wpt = require('wpt');26wpt.support(function(err, data){27 if(err){28 console.log('Error:', err);29 }else{30 console.log('Support:', data);31 }32});33var wpt = require('wpt');34wpt.support(function(err, data){35 if(err){36 console.log('Error:', err);37 }else{38 console.log('Support:', data);39 }40});41var wpt = require('wpt');42wpt.support(function(err, data){43 if(err){44 console.log('Error:', err);45 }else{46 console.log('Support:', data);47 }48});49var wpt = require('wpt');50wpt.support(function(err, data){51 if(err){52 console.log('Error:', err);53 }else{54 console.log('Support:', data);55 }56});57var wpt = require('wpt');58wpt.support(function(err, data){59 if(err){60 console.log('Error:', err);61 }else{62 console.log('Support:', data);63 }64});65var wpt = require('wpt');66wpt.support(function(err, data){67 if(err){68 console.log('Error:', err);69 }else{70 console.log('Support:', data);71 }72});
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!