/services/sync/tests/tps/test_bug501528.js

http://github.com/zpao/v8monkey · JavaScript · 79 lines · 55 code · 11 blank · 13 comment · 0 complexity · c58c324eda4e1ee4dc22dc5d9710f276 MD5 · raw file

  1. /* Any copyright is dedicated to the Public Domain.
  2. http://creativecommons.org/publicdomain/zero/1.0/ */
  3. /*
  4. * The list of phases mapped to their corresponding profiles. The object
  5. * here must be in strict JSON format, as it will get parsed by the Python
  6. * testrunner (no single quotes, extra comma's, etc).
  7. */
  8. EnableEngines(["passwords"]);
  9. var phases = { "phase1": "profile1",
  10. "phase2": "profile2",
  11. "phase3": "profile1",
  12. "phase4": "profile2" };
  13. /*
  14. * Password lists
  15. */
  16. var passwords_initial = [
  17. { hostname: "http://www.example.com",
  18. submitURL: "http://login.example.com",
  19. username: "joe",
  20. password: "secret",
  21. usernameField: "uname",
  22. passwordField: "pword",
  23. changes: {
  24. password: "SeCrEt$$$"
  25. }
  26. },
  27. { hostname: "http://www.example.com",
  28. realm: "login",
  29. username: "jack",
  30. password: "secretlogin"
  31. }
  32. ];
  33. var passwords_after_first_update = [
  34. { hostname: "http://www.example.com",
  35. submitURL: "http://login.example.com",
  36. username: "joe",
  37. password: "SeCrEt$$$",
  38. usernameField: "uname",
  39. passwordField: "pword"
  40. },
  41. { hostname: "http://www.example.com",
  42. realm: "login",
  43. username: "jack",
  44. password: "secretlogin"
  45. }
  46. ];
  47. /*
  48. * Test phases
  49. */
  50. Phase('phase1', [
  51. [Passwords.add, passwords_initial],
  52. [Sync]
  53. ]);
  54. Phase('phase2', [
  55. [Passwords.add, passwords_initial],
  56. [Sync]
  57. ]);
  58. Phase('phase3', [
  59. [Sync],
  60. [Passwords.verify, passwords_initial],
  61. [Passwords.modify, passwords_initial],
  62. [Passwords.verify, passwords_after_first_update],
  63. [Sync]
  64. ]);
  65. Phase('phase4', [
  66. [Sync],
  67. [Passwords.verify, passwords_after_first_update],
  68. ]);