Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1322 lines
46 KiB

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
  2. <HTML><HEAD>
  3. <OBJECT width=0 height=0 ID=pchealth classid=CLSID:FC7D9E02-3F9E-11d3-93C0-00C04F72DAF7></OBJECT>
  4. <META content="text/html; charset=unicode" http-equiv=Content-Type>
  5. <META content="MSHTML 5.00.2919.800" name=GENERATOR></HEAD>
  6. <BODY>
  7. <P>
  8. <TABLE border=0 cellPadding=1 cellSpacing=1 width="75%">
  9. <TR>
  10. <TD align=left><STRONG>IDW Test for all SAF objects
  11. and methods</STRONG>
  12. </TD>
  13. <TD align=left><STRONG>Functional</STRONG></TD>
  14. <TD align=left><STRONG>Boundary</STRONG></TD>
  15. <TD align=left><STRONG>Falsification</STRONG></TD>
  16. <TD align=left><STRONG>Localization</STRONG></TD></TR>
  17. <TR>
  18. <TD align=left>
  19. <P>Vendor ID: <INPUT id=txtVendorID name=text1
  20. style="HEIGHT: 22px; WIDTH: 450px"></P></TD>
  21. <TD align=left>
  22. <P align=center><INPUT id=rdoVendorIDFunctional name=rdoVendorID type=radio CHECKED></P></TD>
  23. <TD align=left disabled>
  24. <P align=center><INPUT id=rdoVendorIDBoundary name=rdoVendorID type=radio></P></TD>
  25. <TD align=left disabled>
  26. <P align=center><INPUT id=rdoVendorIDFalsification name=rdoVendorID type=radio></P></TD>
  27. <TD align=left disabled>
  28. <P align=center><INPUT id=rdoVendorIDLocalization name=rdoVendorID type=radio
  29. disabled></P></TD></TR>
  30. <TR>
  31. <TD align=left>Product ID: <INPUT id=txtProductID name=text2
  32. style="HEIGHT: 22px; WIDTH: 447px"></TD>
  33. <TD align=middle><INPUT id=rdoProductIDFunctional name=rdoProductID
  34. type=radio CHECKED></TD>
  35. <TD align=middle><INPUT id=rdoProductIDBoundary name=rdoProductID
  36. type=radio disabled></TD>
  37. <TD align=middle><INPUT id=rdoProductIDFalsification name=rdoProductID
  38. type=radio disabled></TD>
  39. <TD align=middle><INPUT id=rdoProductIDLocalization name=rdoProductID
  40. type=radio disabled></TD></TR>
  41. <TR>
  42. <TD align=left>New Incident URL: <INPUT id=txtNewIncidentURL maxLength=263
  43. name=text3 style="HEIGHT: 22px; WIDTH: 399px"></TD>
  44. <TD align=middle><INPUT id=rdoNewIncidentURLFunctional name=rdoNewIncidentURL
  45. type=radio CHECKED></TD>
  46. <TD align=middle><INPUT id=rdoNewIncidentURLBoundary name=rdoNewIncidentURL
  47. type=radio></TD>
  48. <TD align=middle><INPUT id=rdoNewIncidentURLFalsification name=rdoNewIncidentURL
  49. type=radio></TD>
  50. <TD align=middle><INPUT id=rdoNewIncidentURLLocalization name=rdoNewIncidentURL
  51. type=radio disabled></TD></TR>
  52. <TR>
  53. <TD align=left>New Incident Display String: <INPUT
  54. id=txtNewIncidentDisplayString name=text4
  55. style="HEIGHT: 22px; WIDTH: 343px"></TD>
  56. <TD align=middle><INPUT id=rdoNewIncidentDisplayStringFunctional name=rdoNewIncidentDisplayString
  57. type=radio CHECKED
  58. ></TD>
  59. <TD align=middle><INPUT id=rdoNewIncidentDisplayStringBoundary name=rdoNewIncidentDisplayString
  60. type=radio></TD>
  61. <TD align=middle><INPUT id=rdoNewIncidentDisplayStringFalsification name=rdoNewIncidentDisplayString
  62. type=radio></TD>
  63. <TD align=middle><INPUT id=rdoNewIncidentDisplayStringLocalization name=rdoNewIncidentDisplayString
  64. type=radio disabled></TD></TR>
  65. <TR>
  66. <TD align=left>First Display String Change: <INPUT
  67. id=txtFirstDisplayStringChange name=text5
  68. style="HEIGHT: 22px; WIDTH: 350px"></TD>
  69. <TD align=middle><INPUT id=rdoFirstDisplayStringChangeFunctional name=rdoFirstDisplayStringChange
  70. type=radio CHECKED
  71. ></TD>
  72. <TD align=middle><INPUT id=rdoFirstDisplayStringChangeBoundary name=rdoFirstDisplayStringChange
  73. type=radio></TD>
  74. <TD align=middle><INPUT id=rdoFirstDisplayStringChangeFalsification name=rdoFirstDisplayStringChange
  75. type=radio></TD>
  76. <TD align=middle><INPUT id=rdoFirstDisplayStringChangeLocalization name=rdoFirstDisplayStringChange
  77. type=radio disabled></TD></TR>
  78. <TR>
  79. <TD align=left>First URL String Change: <INPUT id=txtFirstURLStringChange
  80. name=text6 style="HEIGHT: 22px; WIDTH: 364px"></TD>
  81. <TD align=middle><INPUT id=rdoFirstURLStringChangeFunctional name=rdoFirstURLStringChange
  82. type=radio CHECKED
  83. ></TD>
  84. <TD align=middle><INPUT id=rdoFirstURLStringChangeBoundary name=rdoFirstURLStringChange
  85. type=radio></TD>
  86. <TD align=middle><INPUT id=rdoFirstURLStringChangeFalsification name=rdoFirstURLStringChange
  87. type=radio></TD>
  88. <TD align=middle><INPUT id=rdoFirstURLStringChangeLocalization name=rdoFirstURLStringChange
  89. type=radio disabled></TD></TR>
  90. <TR>
  91. <TD align=left>Second Display String Change: <INPUT
  92. id=txtSecondDisplayStringChange name=text7
  93. style="HEIGHT: 22px; WIDTH: 332px"></TD>
  94. <TD align=middle><INPUT id=rdoSecondDisplayStringChangeFunctional name=rdoSecondDisplayStringChange
  95. type=radio CHECKED></TD>
  96. <TD align=middle><INPUT id=rdoSecondDisplayStringChangeBoundary name=rdoSecondDisplayStringChange
  97. type=radio></TD>
  98. <TD align=middle><INPUT id=rdoSecondDisplayStringChangeFalsification name=rdoSecondDisplayStringChange
  99. type=radio></TD>
  100. <TD align=middle><INPUT id=rdoSecondDisplayStringChangeLocalization name=rdoSecondDisplayStringChange
  101. type=radio disabled></TD></TR>
  102. <TR>
  103. <TD align=left>
  104. <P>Second URL String Change: <INPUT id=txtSecondURLStringChange name=text8
  105. style="HEIGHT: 22px; WIDTH: 348px"></P></TD>
  106. <TD align=middle><INPUT id=rdoSecondURLStringChangeFunctional name=rdoSecondURLStringChange
  107. type=radio CHECKED
  108. ></TD>
  109. <TD align=middle><INPUT id=rdoSecondURLStringChangeBoundary name=rdoSecondURLStringChange
  110. type=radio></TD>
  111. <TD align=middle><INPUT id=rdoSecondURLStringChangeFalsification name=rdoSecondURLStringChange
  112. type=radio></TD>
  113. <TD align=middle><INPUT id=rdoSecondURLStringChangeLocalization name=rdoSecondURLStringChange
  114. type=radio disabled></TD></TR>
  115. <TR>
  116. <TD align=left>Incident Object User Name: <INPUT
  117. id=txtIncidentObjectUserName name=text9
  118. style="HEIGHT: 22px; WIDTH: 350px"></TD>
  119. <TD align=middle><INPUT id=rdoIncidentObjectUserNameFunctional name=rdoIncidentObjectUserName
  120. type=radio CHECKED
  121. ></TD>
  122. <TD align=middle><INPUT id=rdoIncidentObjectUserNameBoundary name=rdoIncidentObjectUserName
  123. type=radio></TD>
  124. <TD align=middle><INPUT id=rdoIncidentObjectUserNameFalsification name=rdoIncidentObjectUserName
  125. type=radio></TD>
  126. <TD align=middle><INPUT id=rdoIncidentObjectUserNameLocalization name=rdoIncidentObjectUserName
  127. type=radio disabled></TD></TR>
  128. <TR>
  129. <TD align=left>Incident Object Product ID: <INPUT
  130. id=txtIncidentObjectProductID name=text10
  131. style="HEIGHT: 22px; WIDTH: 353px"></TD>
  132. <TD align=middle><INPUT id=rdoIncidentObjectProductIDFunctional name=rdoIncidentObjectProductID
  133. type=radio CHECKED
  134. ></TD>
  135. <TD align=middle><INPUT id=rdoIncidentObjectProductIDBoundary name=rdoIncidentObjectProductID
  136. type=radio></TD>
  137. <TD align=middle><INPUT id=rdoIncidentObjectProductIDFalsification name=rdoIncidentObjectProductID
  138. type=radio></TD>
  139. <TD align=middle><INPUT id=rdoIncidentObjectProductIDLocalization name=rdoIncidentObjectProductID
  140. type=radio disabled></TD></TR>
  141. <TR>
  142. <TD align=left>Incident Object Product Name: <INPUT
  143. id=txtIncidentObjectProductName name=text11
  144. style="HEIGHT: 22px; WIDTH: 332px"></TD>
  145. <TD align=middle><INPUT id=rdoIncidentObjectProductNameFunctional name=rdoIncidentObjectProductName
  146. type=radio CHECKED></TD>
  147. <TD align=middle><INPUT id=rdoIncidentObjectProductNameBoundary name=rdoIncidentObjectProductName
  148. type=radio></TD>
  149. <TD align=middle><INPUT id=rdoIncidentObjectProductNameFalsification name=rdoIncidentObjectProductName
  150. type=radio></TD>
  151. <TD align=middle><INPUT id=rdoIncidentObjectProductNameLocalization name=rdoIncidentObjectProductName
  152. type=radio disabled></TD></TR>
  153. <TR>
  154. <TD align=left>Incident Object ProblemDescription: <INPUT
  155. id=txtIncidentObjectProblemDescription name=text12
  156. style="HEIGHT: 22px; WIDTH: 300px"></TD>
  157. <TD align=middle><INPUT id=rdoIncidentObjectProblemDescriptionFunctional name=rdoIncidentObjectProblemDescription
  158. type=radio CHECKED></TD>
  159. <TD align=middle><INPUT id=rdoIncidentObjectProblemDescriptionBoundary name=rdoIncidentObjectProblemDescription
  160. type=radio></TD>
  161. <TD align=middle><INPUT id=rdoIncidentObjectProblemDescriptionFalsification name=rdoIncidentObjectProblemDescription
  162. type=radio></TD>
  163. <TD align=middle><INPUT id=rdoIncidentObjectProblemDescriptionLocalization name=rdoIncidentObjectProblemDescription
  164. type=radio disabled></TD></TR>
  165. <TR>
  166. <TD align=left>Incident Object File Name: <INPUT
  167. id=txtIncidentObjectFileName maxLength=260 name=text13
  168. style="HEIGHT: 22px; WIDTH: 357px"></TD>
  169. <TD align=middle><INPUT id=rdoIncidentObjectFileNameFunctional name=rdoIncidentObjectFileName
  170. type=radio CHECKED
  171. ></TD>
  172. <TD align=middle><INPUT id=rdoIncidentObjectFileNameBoundary name=rdoIncidentObjectFileName
  173. type=radio></TD>
  174. <TD align=middle><INPUT id=rdoIncidentObjectFileNameFalsification name=rdoIncidentObjectFileName
  175. type=radio></TD>
  176. <TD align=middle><INPUT id=rdoIncidentObjectFileNameLocalization name=rdoIncidentObjectFileName
  177. type=radio disabled></TD></TR>
  178. <TR>
  179. <TD align=left>
  180. <P><INPUT id=btnStartTests name=button1 type=button value="Start Test"></P></TD>
  181. <TD align=middle></TD>
  182. <TD align=middle></TD>
  183. <TD align=middle></TD>
  184. <TD align=middle></TD></TR></TABLE>&nbsp;</P>
  185. <P>&nbsp;</P>
  186. </BODY>
  187. <Script language=VBScript>
  188. Set fsoObject = CreateObject("Scripting.FileSystemObject")
  189. Set shellObject = CreateObject("Wscript.Shell")
  190. Dim strOpenedTime
  191. Dim strClosedTime
  192. Dim incidentItemObject
  193. Dim channelObject
  194. Dim incidentObject
  195. Dim strVendorID
  196. Dim strProductID
  197. Dim strWindowsFolder
  198. Dim strSystemFolder
  199. Dim strTemporaryFolder
  200. Dim intUniqueNumber
  201. Dim strNewIncidentURL
  202. Dim strNewIncidentDisplay
  203. Dim strSetFirstNewDisplayString
  204. Dim strSetFirstNewURL
  205. Dim strSetSecondNewDisplayString
  206. Dim strSetSecondNewURL
  207. Dim intIncidentIndexNumber
  208. Dim strIncidentObjectUserName
  209. Dim strIncidentObjectProductID
  210. Dim strIncidentObjectProductName
  211. Dim strIncidentObjectProblemDescription
  212. Dim strIncidentObjectFileName
  213. Dim tempChannelObject
  214. Dim tempChannelIncidents
  215. Dim intOriginalGetAllIncidentsCount
  216. Dim intOriginalGetOpenIncidentsCount
  217. Dim intOriginalGetClosedIncidentsCount
  218. Dim intErrorNumber
  219. Dim strErrorDescription
  220. Const pchAllIncidents = 1
  221. Const pchOpenIncidents = 2
  222. Const pchClosedIncidents = 3
  223. Const pchIncidentOpen = 1
  224. Const pchIncidentClosed = 2
  225. Const WindowsFolder = 0
  226. Const SystemFolder = 1
  227. Const TemporaryFolder = 2
  228. strVendorIDFunctional = "CN=Microsoft Corporation,L=Redmond,S=Washington,C=US"
  229. strProductIDFunctional = "Microsoft Millennium Beta"
  230. strNewIncidentURLFunctional = "http://NewIncident" & intUniqueNumber
  231. strNewIncidentURLBoundary = "http://1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456"
  232. strNewIncidentURLFalsification = ""
  233. strNewIncidentURLLocalization = ""
  234. strNewIncidentDisplayStringFunctional = "This is an IDW Test incident !#$%&amp;()*+,-./0123456789:;&lt;=&gt;?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~"
  235. strNewIncidentDisplayStringBoundary = ""
  236. strNewIncidentDisplayStringFalsification = ""
  237. strNewIncidentDisplayStringLocalization = ""
  238. strFirstDisplayStringChangeFunctional = "New First IDW Display String " & intUniqueNumber
  239. strFirstDisplayStringChangeBoundary = ""
  240. strFirstDisplayStringChangeFalsification = ""
  241. strFirstDisplayStringChangeLocalization = ""
  242. strFirstURLStringChangeFunctional = "http://IDW_FIRST_URL_CHANGE_TEST/" & intUniqueNumber
  243. strFirstURLStringChangeBoundary = ""
  244. strFirstURLStringChangeFalsification = ""
  245. strFirstURLStringChangeLocalization = ""
  246. strSecondDisplayStringChangeFunctional = "A very quick brown fox jumped over the lazy dogs. New Second IDW Display String? " & intUniqueNumber
  247. strSecondDisplayStringChangeBoundary = ""
  248. strSecondDisplayStringChangeFalsification = ""
  249. strSecondDisplayStringChangeLocalization = ""
  250. strSecondURLStringChangeFunctional = "http://IDW_SECOND_URL_CHANGE_TEST/" & intUniqueNumber
  251. strSecondURLStringChangeBoundary = ""
  252. strSecondURLStringChangeFalsification = ""
  253. strSecondURLStringChangeLocalization = ""
  254. strIncidentObjectUserNameFunctional = "Incident Object User Name"
  255. strIncidentObjectUserNameBoundary = ""
  256. strIncidentObjectUserNameFalsification = ""
  257. strIncidentObjectUserNameLocalization = ""
  258. strIncidentObjectProductIDFunctional = "Incident Object Product ID #1234567890"
  259. strIncidentObjectProductIDBoundary = ""
  260. strIncidentObjectProductIDFalsification = ""
  261. strIncidentObjectProductIDLocalization = ""
  262. strIncidentObjectProductNameFunctional = "Incident Object Product Name"
  263. strIncidentObjectProductNameBoundary = ""
  264. strIncidentObjectProductNameFalsification = ""
  265. strIncidentObjectProductNameLocalization = ""
  266. strIncidentObjectProblemDescriptionFunctional = "Incident Object Problem Description, 1234567890"
  267. strIncidentObjectProblemDescriptionBoundary = ""
  268. strIncidentObjectProblemDescriptionFalsification = ""
  269. strIncidentObjectProblemDescriptionLocalization = ""
  270. strIncidentObjectFileNameFunctional = strTemporaryFolder & "\incidentObjectTestFile.txt"
  271. strIncidentObjectFileNameBoundary = ""
  272. strIncidentObjectFileNameFalsification = ""
  273. strIncidentObjectFileNameLocalization = ""
  274. intUniqueNumber = getUniqueNumber()
  275. strTemporaryFolder = fsoObject.GetSpecialFolder(TemporaryFolder)
  276. txtVendorID.innerText = strVendorIDFunctional
  277. txtProductID.innerText = strProductIDFunctional
  278. txtNewIncidentURL.innerText = strNewIncidentURLFunctional
  279. txtNewIncidentDisplayString.innerText = strNewIncidentDisplayStringFunctional
  280. txtFirstDisplayStringChange.innerText = strFirstDisplayStringChangeFunctional
  281. txtFirstURLStringChange.innerText = strFirstURLStringChangeFunctional
  282. txtSecondDisplayStringChange.innerText = strSecondDisplayStringChangeFunctional
  283. txtSecondURLStringChange.innerText = strSecondURLStringChangeFunctional
  284. txtIncidentObjectUserName.innerText = strIncidentObjectUserNameFunctional
  285. txtIncidentObjectProductID.innerText = strIncidentObjectProductIDFunctional
  286. txtIncidentObjectProductName.innerText = strIncidentObjectProductNameFunctional
  287. txtIncidentObjectProblemDescription.innerText = strIncidentObjectProblemDescriptionFunctional
  288. txtIncidentObjectFileName.innerText = strIncidentObjectFileNameFunctional
  289. Public Sub rdoIncidentObjectFileNameLocalization_OnClick()
  290. txtIncidentObjectFileName.innerText = strIncidentObjectFileNameLocalization
  291. End Sub
  292. Public Sub rdoIncidentObjectFileNameFalsification_OnClick()
  293. txtIncidentObjectFileName.innerText = strIncidentObjectFileNameFalsification
  294. End Sub
  295. Public Sub rdoIncidentObjectFileNameBoundary_OnClick()
  296. txtIncidentObjectFileName.innerText = strIncidentObjectFileNameBoundary
  297. End Sub
  298. Public Sub rdoIncidentObjectFileNameFunctional_OnClick()
  299. txtIncidentObjectFileName.innerText = strIncidentObjectFileNameFunctional
  300. End Sub
  301. Public Sub rdoIncidentObjectProblemDescriptionLocalization_OnClick()
  302. txtIncidentObjectProblemDescription.innerText = strIncidentObjectProblemDescriptionLocalization
  303. End Sub
  304. Public Sub rdoIncidentObjectProblemDescriptionFalsification_OnClick()
  305. txtIncidentObjectProblemDescription.innerText = strIncidentObjectProblemDescriptionFalsification
  306. End Sub
  307. Public Sub rdoIncidentObjectProblemDescriptionBoundary_OnClick()
  308. txtIncidentObjectProblemDescription.innerText = strIncidentObjectProblemDescriptionBoundary
  309. End Sub
  310. Public Sub rdoIncidentObjectProblemDescriptionFunctional_OnClick()
  311. txtIncidentObjectProblemDescription.innerText = strIncidentObjectProblemDescriptionFunctional
  312. End Sub
  313. Public Sub rdoIncidentObjectProductNameLocalization_OnClick()
  314. txtIncidentObjectProductName.innerText = strIncidentObjectProductNameLocalization
  315. End Sub
  316. Public Sub rdoIncidentObjectProductNameFalsification_OnClick()
  317. txtIncidentObjectProductName.innerText = strIncidentObjectProductNameFalsification
  318. End Sub
  319. Public Sub rdoIncidentObjectProductNameBoundary_OnClick()
  320. txtIncidentObjectProductName.innerText = strIncidentObjectProductNameBoundary
  321. End Sub
  322. Public Sub rdoIncidentObjectProductNameFunctional_OnClick()
  323. txtIncidentObjectProductName.innerText = strIncidentObjectProductNameFunctional
  324. End Sub
  325. Public Sub rdoIncidentObjectProductIDLocalization_OnClick()
  326. txtIncidentObjectProductID.innerText = strIncidentObjectProductIDLocalization
  327. End Sub
  328. Public Sub rdoIncidentObjectProductIDFalsification_OnClick()
  329. txtIncidentObjectProductID.innerText = strIncidentObjectProductIDFalsification
  330. End Sub
  331. Public Sub rdoIncidentObjectProductIDBoundary_OnClick()
  332. txtIncidentObjectProductID.innerText = strIncidentObjectProductIDBoundary
  333. End Sub
  334. Public Sub rdoIncidentObjectProductIDFunctional_OnClick()
  335. txtIncidentObjectProductID.innerText = strIncidentObjectProductIDFunctional
  336. End Sub
  337. Public Sub rdoIncidentObjectUserNameLocalization_OnClick()
  338. txtIncidentObjectUserName.innerText = strIncidentObjectUserNameLocalization
  339. End Sub
  340. Public Sub rdoIncidentObjectUserNameFalsification_OnClick()
  341. txtIncidentObjectUserName.innerText = strIncidentObjectUserNameFalsification
  342. End Sub
  343. Public Sub rdoIncidentObjectUserNameBoundary_OnClick()
  344. txtIncidentObjectUserName.innerText = strIncidentObjectUserNameBoundary
  345. End Sub
  346. Public Sub rdoIncidentObjectUserNameFunctional_OnClick()
  347. txtIncidentObjectUserName.innerText = strIncidentObjectUserNameFunctional
  348. End Sub
  349. Public Sub rdoSecondURLStringChangeLocalization_OnClick()
  350. txtSecondURLStringChange.innerText = strSecondURLStringChangeLocalization
  351. End Sub
  352. Public Sub rdoSecondURLStringChangeFalsification_OnClick()
  353. txtSecondURLStringChange.innerText = strSecondURLStringChangeFalsification
  354. End Sub
  355. Public Sub rdoSecondURLStringChangeBoundary_OnClick()
  356. txtSecondURLStringChange.innerText = strSecondURLStringChangeBoundary
  357. End Sub
  358. Public Sub rdoSecondURLStringChangeFunctional_OnClick()
  359. txtSecondURLStringChange.innerText = strSecondURLStringChangeFunctional
  360. End Sub
  361. Public Sub rdoSecondDisplayStringChangeLocalization_OnClick()
  362. txtSecondDisplayStringChange.innerText = strSecondDisplayStringChangeLocalization
  363. End Sub
  364. Public Sub rdoSecondDisplayStringChangeFalsification_OnClick()
  365. txtSecondDisplayStringChange.innerText = strSecondDisplayStringChangeFalsification
  366. End Sub
  367. Public Sub rdoSecondDisplayStringChangeBoundary_OnClick()
  368. txtSecondDisplayStringChange.innerText = strSecondDisplayStringChangeBoundary
  369. End Sub
  370. Public Sub rdoSecondDisplayStringChangeFunctional_OnClick()
  371. txtSecondDisplayStringChange.innerText = strSecondDisplayStringChangeFunctional
  372. End Sub
  373. Public Sub rdoFirstURLStringChangeLocalization_OnClick()
  374. txtFirstURLStringChange.innerText = strFirstURLStringChangeLocalization
  375. End Sub
  376. Public Sub rdoFirstURLStringChangeFalsification_OnClick()
  377. txtFirstURLStringChange.innerText = strFirstURLStringChangeFalsification
  378. End Sub
  379. Public Sub rdoFirstURLStringChangeBoundary_OnClick()
  380. txtFirstURLStringChange.innerText = strFirstURLStringChangeBoundary
  381. End Sub
  382. Public Sub rdoFirstURLStringChangeFunctional_OnClick()
  383. txtFirstURLStringChange.innerText = strFirstURLStringChangeFunctional
  384. End Sub
  385. Public Sub rdoFirstDisplayStringChangeLocalization_OnClick()
  386. txtFirstDisplayStringChange.innerText = strFirstDisplayStringChangeLocalization
  387. End Sub
  388. Public Sub rdoFirstDisplayStringChangeFalsification_OnClick()
  389. txtFirstDisplayStringChange.innerText = strFirstDisplayStringChangeFalsification
  390. End Sub
  391. Public Sub rdoFirstDisplayStringChangeBoundary_OnClick()
  392. txtFirstDisplayStringChange.innerText = strFirstDisplayStringChangeBoundary
  393. End Sub
  394. Public Sub rdoFirstDisplayStringChangeFunctional_OnClick()
  395. txtFirstDisplayStringChange.innerText = strFirstDisplayStringChangeFunctional
  396. End Sub
  397. Public Sub rdoNewIncidentDisplayStringLocalization_OnClick()
  398. txtNewIncidentDisplayString.innerText = strNewIncidentDisplayStringLocalization
  399. End Sub
  400. Public Sub rdoNewIncidentDisplayStringFalsification_OnClick()
  401. txtNewIncidentDisplayString.innerText = strNewIncidentDisplayStringFalsification
  402. End Sub
  403. Public Sub rdoNewIncidentDisplayStringBoundary_OnClick()
  404. txtNewIncidentDisplayString.innerText = strNewIncidentDisplayStringBoundary
  405. End Sub
  406. Public Sub rdoNewIncidentDisplayStringFunctional_OnClick()
  407. txtNewIncidentDisplayString.innerText = strNewIncidentDisplayStringFunctional
  408. End Sub
  409. Public Sub rdoNewIncidentURLLocalization_OnClick()
  410. txtNewIncidentURL.innerText = strNewIncidentURLLocalization
  411. End Sub
  412. Public Sub rdoNewIncidentURLFalsification_OnClick()
  413. txtNewIncidentURL.innerText = strNewIncidentURLFalsification
  414. End Sub
  415. Public Sub rdoNewIncidentURLBoundary_OnClick()
  416. txtNewIncidentURL.innerText = strNewIncidentURLBoundary
  417. End Sub
  418. Public Sub rdoNewIncidentURLFunctional_OnClick()
  419. txtNewIncidentURL.innerText = strNewIncidentURLFunctional
  420. End Sub
  421. Public Sub rdoProductIDLocalization_OnClick()
  422. txtProductID.innerText = strProductIDLocalization
  423. End Sub
  424. Public Sub rdoProductIDFalsification_OnClick()
  425. txtProductID.innerText = strProductIDFalsification
  426. End Sub
  427. Public Sub rdoProductIDBoundary_OnClick()
  428. txtProductID.innerText = strProductIDBoundary
  429. End Sub
  430. Public Sub rdoProductIDFunctional_OnClick()
  431. txtProductID.innerText = strProductIDFunctional
  432. End Sub
  433. Public Sub rdoVendorIDLocalization_OnClick()
  434. txtVendorID.innerText = strVendorIDLocalization
  435. End Sub
  436. Public Sub rdoVendorIDFalsification_OnClick()
  437. txtVendorID.innerText = strVendorIDFalsification
  438. End Sub
  439. Public Sub rdoVendorIDBoundary_OnClick()
  440. txtVendorID.innerText = strVendorIDBoundary
  441. End Sub
  442. Public Sub rdoVendorIDFunctional_OnClick()
  443. txtVendorID.innerText = strVendorIDFunctional
  444. End Sub
  445. Public Sub btnStartTests_OnClick()
  446. strVendorID = txtVendorID.value
  447. strProductID = txtProductID.Value
  448. strWindowsFolder = fsoObject.GetSpecialFolder(WindowsFolder)
  449. strSystemFolder = fsoObject.GetSpecialFolder(SystemFolder)
  450. intUniqueNumber = getUniqueNumber()
  451. strNewIncidentURL = txtNewIncidentURL.Value
  452. strNewIncidentDisplay = txtNewIncidentDisplayString.Value
  453. strSetFirstNewDisplayString = txtFirstDisplayStringChange.Value
  454. strSetFirstNewURL = txtFirstURLStringChange.Value
  455. strSetSecondNewDisplayString = txtSecondDisplayStringChange.Value
  456. strSetSecondNewURL = txtSecondURLStringChange.Value
  457. intIncidentIndexNumber = 0
  458. strIncidentObjectUserName = txtIncidentObjectUserName.Value
  459. strIncidentObjectProductID = txtIncidentObjectProductID.Value
  460. strIncidentObjectProductName = txtIncidentObjectProductName.Value
  461. strIncidentObjectProblemDescription = txtIncidentObjectProblemDescription.Value
  462. strIncidentObjectFileName = txtIncidentObjectFileName.Value
  463. Set channelObject = pchealth.CreateObject_Channel(strVendorID, strProductID)
  464. Set tempChannelObject = pchealth.CreateObject_channel(strVendorID, strProductID)
  465. Set incidentObject = pchealth.CreateObject_Incident()
  466. CloseAllIncidents()
  467. GetVendorID()
  468. GetProductID()
  469. GetVendorName()
  470. GetProductName()
  471. document.write "Inital Incident Count: <BR>"
  472. document.write "No Result Is Expected <BR>"
  473. intOriginalGetAllIncidentsCount = GetAllIncidentsCount()
  474. intOriginalGetOpenIncidentsCount = GetOpenIncidentsCount()
  475. intOriginalGetClosedIncidentsCount = GetClosedIncidentsCount()
  476. document.write "<HR>"
  477. 'Record a new incident here
  478. strReturnedNewIncidentURL = RecordNewIncident(strNewIncidentURL, strNewIncidentDisplay)
  479. sortAllIncidents()
  480. CheckIncidentStatus(pchIncidentOpen)
  481. SetNewDisplayString(strSetFirstNewDisplayString)
  482. SetNewURL(strSetFirstNewURL)
  483. CloseNewIncident(strReturnedNewIncidentURL)
  484. CheckIncidentStatus(pchIncidentClosed)
  485. SetNewDisplayString(strSetSecondNewDisplayString)
  486. SetNewURL(strSetSecondNewURL)
  487. CheckCreationTime(strOpenedTime)
  488. CheckClosedTime(strClosedTime)
  489. incidentObjectBinFileSave()
  490. incidentObjectBinFileLoad()
  491. End Sub
  492. Public Sub ErrorHandler()
  493. 'Error Handler Routine
  494. 'If Err.number <> 0 Then
  495. 'strErrorDescription = Err.description
  496. 'intErrorNumber = Err.number
  497. 'ErrorHandler()
  498. 'End If
  499. If strErrorDescription = "Record already exists." Then
  500. document.write "<FONT color=red><STRONG>An incident with this URL already exists. Please use another URL to record an incident.<BR>This will cause further errors.</STRONG></FONT><BR>"
  501. document.write "Returned Error Number: " & intErrorNumber & "<BR>"
  502. document.write "Returned Error Description: " & strErrorDescription & "<BR>"
  503. End If
  504. If strErrorDescription = "Record not found." Then
  505. document.write "<FONT color=red><STRONG>An incident with this URL cannot be found. Please recheck your URL so you may close this incident.<BR>This will cause further errors.</STRONG></FONT><BR>"
  506. document.write "Returned Error Number: " & intErrorNumber & "<BR>"
  507. document.write "Returned Error Description: " & strErrorDescription & "<BR>"
  508. End If
  509. If strErrorDescription = "The filename or extension is too long." Then
  510. document.write "<FONT color=red><STRONG>The file path or file extention is to long. Please change the filename or extention to fit the file system parameters.<BR>This will cause further errors.</STRONG></FONT><BR>"
  511. document.write "Returned Error Number: " & intErrorNumber & "<BR>"
  512. document.write "Returned Error Description: " & strErrorDescription & "<BR>"
  513. End If
  514. End Sub
  515. Public Sub incidentObjectBinFileLoad()
  516. On Error Resume Next
  517. incidentObject.Load strIncidentObjectFileName
  518. If Err.number <> 0 Then
  519. strErrorDescription = Err.description
  520. intErrorNumber = Err.number
  521. ErrorHandler()
  522. End If
  523. strReturnedIncidentObjectUserName = incidentObject.UserName
  524. strReturnedIncidentObjectProductID = incidentObject.ProductID
  525. strReturnedIncidentObjectProductName = incidentObject.ProductName
  526. strReturnedIncidentObjectProblemDescription = incidentObject.ProblemDescription
  527. document.write "Load Incident Object Information From Bin File<BR>"
  528. document.write "Returned User Name: " & strReturnedIncidentObjectUserName & "<BR>"
  529. document.write "Returned Product ID: " & strReturnedIncidentObjectProductID & "<BR>"
  530. document.write "Returned Product Name: " & strReturnedIncidentObjectProductName & "<BR>"
  531. document.write "Returned Problem Description: " & strReturnedIncidentObjectProblemDescription & "<BR>"
  532. If strReturnedIncidentObjectUserName = strIncidentObjectUserName Then
  533. strReturnedIncidentObjectUserNameResult = "<li>User Name Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  534. Else
  535. strReturnedIncidentObjectUserNameResult = "<li>User Name Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  536. End If
  537. If strReturnedIncidentObjectProductID = strIncidentObjectProductID Then
  538. strReturnedIncidentObjectProductIDResult = "<li>Product ID Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  539. Else
  540. strReturnedIncidentObjectProductIDResult = "<li>Product ID Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  541. End If
  542. If strReturnedIncidentObjectProductName = strIncidentObjectProductName Then
  543. strReturnedIncidentObjectProductNameResult = "<li>Product Name Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  544. Else
  545. strReturnedIncidentObjectProductNameResult = "<li>Product Name Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  546. End If
  547. If strReturnedIncidentObjectProblemDescription = strIncidentObjectProblemDescription Then
  548. strReturnedIncidentObjectProblemDescriptionResult = "<li>Problem Description Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  549. Else
  550. strReturnedIncidentObjectProblemDescriptionResult = "<li>Problem Description Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  551. End If
  552. document.write strReturnedIncidentObjectUserNameResult
  553. document.write strReturnedIncidentObjectProductIDResult
  554. document.write strReturnedIncidentObjectProductNameResult
  555. document.write strReturnedIncidentObjectProblemDescriptionResult
  556. document.write "<HR>"
  557. End Sub
  558. Public Sub incidentObjectBinFileSave()
  559. On Error Resume Next
  560. document.write "Save Incident Object Information to Bin File<BR>"
  561. document.write "User Name: " & strIncidentObjectUserName & "<BR>"
  562. document.write "Product ID: " & strIncidentObjectProductID & "<BR>"
  563. document.write "Product Name: " & strIncidentObjectProductName & "<BR>"
  564. document.write "Problem Description: " & strIncidentObjectProblemDescription & "<BR>"
  565. If fsoObject.FileExists(strIncidentObjectFileName) Then
  566. fsoObject.DeleteFile(strIncidentObjectFileName)
  567. End If
  568. incidentObject.UserName = strIncidentObjectUserName
  569. incidentObject.ProductID = strIncidentObjectProductID
  570. incidentObject.ProductName = strIncidentObjectProductName
  571. incidentObject.ProblemDescription = strIncidentObjectProblemDescription
  572. incidentObject.Save strIncidentObjectFileName
  573. If Err.number <> 0 Then
  574. strErrorDescription = Err.description
  575. intErrorNumber = Err.number
  576. ErrorHandler()
  577. End If
  578. document.write "File Name: " & strIncidentObjectFileName & "<BR>"
  579. End Sub
  580. Public Sub CheckIncidentStatus(intStatusShouldBe)
  581. Err.Clear
  582. On Error Resume Next
  583. intReturnedStatus = incidentItemObject.Status
  584. document.write "Current Status Test<BR>"
  585. document.write "Status Should Be: " & intStatusShouldBe & "<BR>"
  586. document.write "Returned status: " & intReturnedStatus & "<BR>"
  587. If intReturnedStatus = intStatusShouldBe Then
  588. strStatusTestResult = "<li>Status Returned Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  589. Else
  590. strStatusTestResult = "<li>Status Returned Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  591. End If
  592. document.write strStatusTestResult
  593. If Err.number <> 0 Then
  594. document.write Err.number & " : " & Err.description & "<BR>"
  595. End If
  596. document.write "<HR>"
  597. Err.Clear
  598. End Sub
  599. Public Sub CheckClosedTime(strClosedTime)
  600. Err.Clear
  601. On Error Resume Next
  602. strReturnedClosedTime = incidentItemObject.ClosedTime
  603. document.write "Creation Time Test<BR>"
  604. document.write "Opened Time: " & strOpenedTime & "<BR>"
  605. document.write "Returned Creation Time: " & strReturnedClosedTime & "<BR>"
  606. If strReturnedClosedTime = strOpenedTime Then
  607. strClosedTimeTestResult = "<li>ClosedTime Returned Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  608. Else
  609. strClosedTimeTestResult = "<li>ClosedTime Returned Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  610. End If
  611. document.write strClosedTimeTestResult
  612. document.write Err.number & " : " & Err.description & "<BR>"
  613. document.write "<HR>"
  614. Err.Clear
  615. End Sub
  616. Public Sub CheckCreationTime(strOpenedTime)
  617. strReturnedCreationTime = incidentItemObject.CreationTime
  618. document.write "Creation Time Test<BR>"
  619. document.write "Opened Time: " & strOpenedTime & "<BR>"
  620. document.write "Returned Creation Time: " & strReturnedCreationTime & "<BR>"
  621. If strReturnedCreationTime = strOpenedTime Then
  622. strCreationTimeTestResult = "<li>Creation Time Returned Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  623. Else
  624. strCreationTimeTestResult = "<li>Creation Time Returned Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  625. End If
  626. document.write strCreationTimeTestResult
  627. document.write "<HR>"
  628. End Sub
  629. Public Function getUniqueNumber()
  630. strUniqueNumber = Second(Now) & Minute(Now) & Hour(Now) & Int((Second(Now) & Minute(Now) & Hour(Now)) * Rnd)
  631. getUniqueNumber = strUniqueNumber
  632. End Function
  633. Public Sub SetNewURL(strSetNewURL)
  634. document.write "Set New URL Test<BR>"
  635. strOriginalURL = incidentItemObject.URL
  636. incidentItemObject.URL = strSetNewURL
  637. strNewReturnedURL = incidentItemObject.URL
  638. document.write "Original Returned String: " & strOriginalURL & "<BR>"
  639. document.write "New String: " & strNewReturnedURL & "<BR>"
  640. checkURLChangeResults strOriginalURL, strNewReturnedURL, strSetNewURL
  641. document.write "<HR>"
  642. End Sub
  643. Public Sub CheckURLChangeResults(strOriginalURL, strNewReturnedURL, strSetNewURL)
  644. strMethodToVerify = "URL"
  645. If strOriginalURL = strNewReturnedURL Then
  646. strURLDifferentResult = "<li>URL Returned Different Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  647. Else
  648. strURLDifferentResult = "<li>URL Returned Different Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  649. End If
  650. If strNewReturnedURL = strSetNewURL Then
  651. strURLMatchResult = "<li>URL Returned Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  652. Else
  653. strURLMatchResult = "<li>URL Returned Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  654. End If
  655. If strNewReturnedURL = VerifyChangeWithOtherObject(strMethodToVerify) Then
  656. strOtherObjectURLMatchResult = "<li>URL Other Object Check Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  657. Else
  658. strOtherObjectURLMatchResult = "<li>URL Other Object Check Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  659. End If
  660. document.write strURLDifferentResult
  661. document.write strURLMatchResult
  662. document.write strOtherObjectURLMatchResult
  663. End Sub
  664. Public Sub CloseAllIncidents()
  665. Err.Clear
  666. set channelIncidents = channelObject.Incidents(pchOpenIncidents)
  667. If Err.Number = 0 Then
  668. If channelIncidents.Count > 0 Then
  669. i = 0
  670. For Each oItem in channelIncidents
  671. Set incidentItemObject = channelIncidents.Item(i)
  672. strURL = incidentItemObject.URL
  673. document.write "<BR>"
  674. document.write strURL & "<BR>"
  675. channelObject.CloseIncident strURL
  676. strClosedURL = incidentItemObject.URL
  677. document.write strClosedURL
  678. i = i + 1
  679. Next
  680. End If
  681. End If
  682. Err.Clear
  683. End Sub
  684. Public Function VerifyChangeWithOtherObject(strMethodToVerify)
  685. 'Set tempChannelObject = pchealth.CreateObject_channel(strVendorID, strProductID)
  686. Set tempChannelIncidents = tempChannelObject.Incidents(pchAllIncidents)
  687. Err.Clear
  688. If Err.Number = 0 Then
  689. If tempChannelIncidents.Count > 0 Then
  690. ' This is where we start to sort
  691. Dim arrayCount
  692. Dim sortTemp
  693. ReDim sortTemp(tempChannelIncidents.Count)
  694. arrayCount = 0
  695. For Each oItem in tempChannelIncidents
  696. set sortTemp(arrayCount) = oItem
  697. arrayCount = arrayCount + 1
  698. Next
  699. 'Sort Here
  700. For arrayCount = o to tempChannelIncidents.Count - 2
  701. For arraySortCount = arrayCount + 1 to tempChannelIncidents.Count - 1
  702. If sortTemp(arrayCount).CreationTime < sortTemp(arraySortCount).CreationTime Then
  703. Dim additionalSortTemp
  704. Set additionalSortTemp = sortTemp(arrayCount)
  705. Set sortTemp(arrayCount) = sortTemp(arraySortCount)
  706. Set sortTemp(arraySortCount) = additionalSortTemp
  707. End If
  708. Next
  709. Next
  710. End If
  711. End If
  712. Err.Clear
  713. Set tempIncidentItemObject = tempChannelIncidents.Item(intIncidentIndexNumber)
  714. If strMethodToVerify = "DisplayString" Then
  715. strResult = tempIncidentItemObject.DisplayString
  716. document.write "Other Object Return Check: " & strResult & "<BR>"
  717. VerifyChangeWithOtherObject = strResult
  718. ElseIf strMethodToVerify = "URL" Then
  719. strResult = tempIncidentItemObject.URL
  720. document.write "Other Object Return Check: " & strResult & "<BR>"
  721. VerifyChangeWithOtherObject = strResult
  722. ElseIf strMethodToVerify = "Status" Then
  723. strResult = tempIncidentItemObject.Status
  724. document.write "Other Object Return Check: " & strResult & "<BR>"
  725. VerifyChangeWithOtherObject = strResult
  726. Else
  727. document.write "<FONT color=red><STRONG>Error checking other object</STRONG></FONT> <BR>"
  728. End If
  729. 'Set tempChannelObject = nothing
  730. set tempChannelIncidents = nothing
  731. End Function
  732. Public Sub SetNewDisplayString(strSetNewDisplayString)
  733. document.write "Set New Display String Test<BR>"
  734. strOriginalDisplayString = incidentItemObject.DisplayString
  735. incidentItemObject.DisplayString = strSetNewDisplayString
  736. strNewReturnedDisplayString = incidentItemObject.DisplayString
  737. document.write "Original Returned String: " & strOriginalDisplayString & "<BR>"
  738. document.write "New String: " & strNewReturnedDisplayString & "<BR>"
  739. CheckDisplayStringResults strOriginalDisplayString, strNewReturnedDisplayString, strSetNewDisplayString
  740. document.write "<HR>"
  741. End Sub
  742. Public Sub CheckDisplayStringResults(strOriginalDisplayString, strNewReturnedDisplayString, strSetNewDisplayString)
  743. strMethodToVerify = "DisplayString"
  744. If strOriginalDisplayString = strNewReturnedDisplayString Then
  745. strDisplayStringDifferentResult = "<li>Display Returned String Different Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  746. Else
  747. strDisplayStringDifferentResult = "<li>Display Returned String Different Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  748. End If
  749. If strNewReturnedDisplayString = strSetNewDisplayString Then
  750. strDisplayStringMatchResult = "<li>Display Returned String Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  751. Else
  752. strDisplayStringMatchResult = "<li>Display Returned String Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  753. End If
  754. If strNewReturnedDisplayString = VerifyChangeWithOtherObject(strMethodToVerify) Then
  755. strOtherObjectDisplayStringMatchResult = "<li>Display Other Object Check String Match Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  756. Else
  757. strOtherObjectDisplayStringMatchResult = "<li>Display Other Object Check String Match Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  758. End If
  759. document.write strDisplayStringDifferentResult
  760. document.write strDisplayStringMatchResult
  761. document.write strOtherObjectDisplayStringMatchResult
  762. End Sub
  763. Public Sub sortAllIncidents()
  764. Err.Clear
  765. set channelIncidents = channelObject.Incidents(pchAllIncidents)
  766. If Err.Number = 0 Then
  767. If channelIncidents.Count > 0 Then
  768. ' This is where we start to sort
  769. Dim arrayCount
  770. Dim sortTemp
  771. ReDim sortTemp(channelIncidents.Count)
  772. arrayCount = 0
  773. For Each oItem in channelIncidents
  774. set sortTemp(arrayCount) = oItem
  775. arrayCount = arrayCount + 1
  776. Next
  777. 'Sort Here
  778. For arrayCount = o to channelIncidents.Count - 2
  779. For arraySortCount = arrayCount + 1 to channelIncidents.Count - 1
  780. If sortTemp(arrayCount).CreationTime < sortTemp(arraySortCount).CreationTime Then
  781. Dim additionalSortTemp
  782. Set additionalSortTemp = sortTemp(arrayCount)
  783. Set sortTemp(arrayCount) = sortTemp(arraySortCount)
  784. Set sortTemp(arraySortCount) = additionalSortTemp
  785. End If
  786. Next
  787. Next
  788. End If
  789. End If
  790. Err.Clear
  791. Set incidentItemObject = channelIncidents.Item(intIncidentIndexNumber)
  792. End Sub
  793. Public Sub CloseNewIncident(strReturnedNewIncidentURL)
  794. On Error Resume Next
  795. document.write "Close New Incident Test<BR>"
  796. channelObject.CloseIncident strReturnedNewIncidentURL
  797. If Err.number <> 0 Then
  798. strErrorDescription = Err.description
  799. intErrorNumber = Err.number
  800. ErrorHandler()
  801. End If
  802. strClosedTime = Now
  803. intNewOpenIncidentCount = GetOpenIncidentsCount()
  804. intNewClosedIncidentCount = GetClosedIncidentsCount()
  805. intNewAllIncidentCount = GetAllIncidentsCount()
  806. If intNewOpenIncidentCount = (intOriginalGetOpenIncidentsCount) Then
  807. strOpenIncidentCountResult = "<li>New Open Incident Count Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  808. Else
  809. strOpenIncidentCountResult = "<li>New Open Incident Count Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  810. End If
  811. document.write strOpenIncidentCountResult
  812. If intNewClosedIncidentCount = (intOriginalGetClosedIncidentsCount + 1) Then
  813. strClosedIncidentCountResult = "<li>New Closed Incident Count Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  814. Else
  815. strClosedIncidentCountResult = "<li>New Closed Incident Count Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  816. End If
  817. document.write strClosedIncidentCountResult
  818. If intNewAllIncidentCount = (intNewClosedIncidentCount + intNewOpenIncidentCount) Then
  819. strAllIncidentCountResult = "<li>New All Incident Count Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  820. Else
  821. strAllIncidentCountResult = "<li>New All Incident Count Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  822. End If
  823. document.write strAllIncidentCountResult
  824. document.write "<HR>"
  825. End Sub
  826. Public Function RecordNewIncident(strNewIncidentURL, strNewIncidentDisplay)
  827. On Error Resume Next
  828. Err.Clear
  829. document.write "Record New Incident Test<BR>"
  830. channelObject.RecordIncident strNewIncidentDisplay, strNewIncidentURL
  831. If Err.number <> 0 Then
  832. strErrorDescription = Err.description
  833. intErrorNumber = Err.number
  834. ErrorHandler()
  835. End If
  836. strOpenedTime = Now
  837. intNewOpenIncidentCount = GetOpenIncidentsCount()
  838. intNewClosedIncidentCount = GetClosedIncidentsCount()
  839. intNewAllIncidentCount = GetAllIncidentsCount()
  840. If intNewOpenIncidentCount = (intOriginalGetOpenIncidentsCount + 1) Then
  841. strOpenIncidentCountResult = "<li>New Open Incident Count Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  842. Else
  843. strOpenIncidentCountResult = "<li>New Open Incident Count Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  844. End If
  845. document.write strOpenIncidentCountResult
  846. If intNewClosedIncidentCount = (intOriginalGetClosedIncidentsCount + 1) Then
  847. strClosedIncidentCountResult = "<li>New Closed Incident Count Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  848. Else
  849. strClosedIncidentCountResult = "<li>New Closed Incident Count Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  850. End If
  851. document.write strClosedIncidentCountResult
  852. If intNewAllIncidentCount = (intOriginalGetAllIncidentsCount + 1) Then
  853. strAllIncidentCountResult = "<li>New All Incident Count Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  854. Else
  855. strAllIncidentCountResult = "<li>New All Incident Count Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  856. End If
  857. document.write strAllIncidentCountResult
  858. RecordNewIncident = strNewIncidentURL
  859. document.write "<HR>"
  860. End Function
  861. Public Function GetClosedIncidentsCount()
  862. set channelIncidents = channelObject.Incidents(pchClosedIncidents)
  863. intClosedIncidentsCount = channelIncidents.Count
  864. document.write "Closed Incidents Count: " & intClosedIncidentsCount & "<BR>"
  865. GetClosedIncidentsCount = intClosedIncidentsCount
  866. End Function
  867. Public Function GetOpenIncidentsCount()
  868. set channelIncidents = channelObject.Incidents(pchOpenIncidents)
  869. intOpenIncidentsCount = channelIncidents.Count
  870. document.write "Open Incidents Count: " & intOpenIncidentsCount & "<BR>"
  871. GetOpenIncidentsCount = intOpenIncidentsCount
  872. End Function
  873. Public Function GetAllIncidentsCount()
  874. set channelIncidents = channelObject.Incidents(pchAllIncidents)
  875. intAllIncidentsCount = channelIncidents.Count
  876. document.write "All Incidents Count: " & intAllIncidentsCount & "<BR>"
  877. GetAllIncidentsCount = intAllIncidentsCount
  878. End Function
  879. Public Sub GetProductName()
  880. document.write "Get Product Name Test <BR>"
  881. strProductNameOut = channelObject.ProductName
  882. strRegProductName = shellObject.RegRead("HKLM\Software\Microsoft\PCHealth\HelpCenter\SAF\Channel\" & strVendorID & "\" & strProductID & "\Description")
  883. document.write "From Channel.ProductName: " & strProductNameOut & "<BR>"
  884. document.write "From Registry: " & strRegProductName & "<BR>"
  885. If strProductNameOut = strRegProductName Then
  886. strGetProductNameResult = "<li>GetProductName Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  887. Else
  888. strGetProductNameResult = "<li>GetProductName Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  889. End If
  890. document.write strGetProductNameResult
  891. document.write "<HR>"
  892. End Sub
  893. Public Sub GetVendorName()
  894. document.write "Get Vendor Name Test <BR>"
  895. strVendorNameOut = channelObject.VendorName
  896. strRegVendorName = shellObject.RegRead("HKLM\Software\Microsoft\PCHealth\HelpCenter\SAF\Channel\" & strVendorID & "\CompanyName")
  897. document.write "From Channel.VendorName: " & strVendorNameOut & "<BR>"
  898. document.write "From Registry: " & strRegVendorName & "<BR>"
  899. If strVendorNameOut = strRegVendorName Then
  900. strGetVendorNameResult = "<li>GetVendorName Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  901. Else
  902. strGetVendorNameResult = "<li>GetVendorName Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  903. End If
  904. document.write strGetVendorNameResult
  905. document.write "<HR>"
  906. End Sub
  907. Public Sub GetProductID()
  908. document.write "Get Product ID Test <BR>"
  909. strProductIDOut = channelObject.ProductID
  910. Document.Write "From Channel.ProductID: " & strProductIDOut & "<BR>"
  911. Document.Write "From Registry: " & strProductID & "<BR>"
  912. If strProductIDOut = strProductID Then
  913. strGetProductIDResult = "<li>GetProductID Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  914. Else
  915. strGetProductIDResult = "<li>GetProductID Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  916. End If
  917. document.write strGetProductIDResult
  918. document.write "<HR>"
  919. End Sub
  920. Public Sub GetVendorID()
  921. document.write "Get Vendor ID Test <BR>"
  922. strVendorIdOut = channelObject.VendorID
  923. Document.Write "From Channel.VendorID: " & strVendorIdOut & "<BR>"
  924. Document.Write "Vendor ID: " & strVendorID & "<BR>"
  925. If strVendorIdOut = strVendorID Then
  926. strGetVendorIDResult = "<li>VendorID Test Result: <FONT color=green><STRONG>Pass</STRONG></FONT> <BR>"
  927. Else
  928. strGetVendorIDResult = "<li>VendorID Test Result: <FONT color=red><STRONG>Fail</STRONG></FONT> <BR>"
  929. End If
  930. Document.write strGetVendorIDResult
  931. document.write "<HR>"
  932. End Sub
  933. </Script>
  934. </HTML>