TPS Formdata Lists 编辑

A Formdata asset list is an array of objects, each with the following properties:

  • fieldname: required.
  • value: required.
  • date: the date the form data was used, expressed in hours from the present, so 0 means now, and -24 means 24 hours ago. Optional, defaults to 0.

For example:

var formdata1 = [
  { fieldname: "testing",
    value: "success",
    date: -1
  },
  { fieldname: "testing",
    value: "failure",
    date: -2
  },
  { fieldname: "username",
    value: "joe"
  }
];

Formdata lists and phase actions

You can use the following functions in phase actions for formdata lists:

  • Formdata.add
  • Formdata.delete
  • Formdata.verify
  • Formdata.verifyNot

For an example, see the TPS formdata unittest:  http://hg.mozilla.org/services/tps/f...st_formdata.js

Notes

Note 1, TPS supports the delete action for Formdata, but Sync currently does not correctly sync deleted form data, see bug 564296.

Note 2, Sync currently does not sync Formdata dates, so the date field is ignored when performing verify and verify-not actions. See bug 552531.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:95 次

字数:2021

最后编辑:8年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文