blob: bb9d707e4c2bac492a8eabdaf3e28eda690e7e1f [file] [log] [blame]
// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// @assertion bool secure
/// read / write
/// Gets and sets whether this cookie is secure.
/// @description Checks that this property gets and sets whether this cookie is
/// secure
/// @author
import "dart:io";
import "../../../Utils/expect.dart";
main() {
Cookie cookie = new Cookie.fromSetCookieValue("cn=cval;");
cookie = new Cookie.fromSetCookieValue("cn=cval; Secure");
Expect.isTrue(; = false;
Expect.equals(-1, cookie.toString().toLowerCase().indexOf("secure")); = true;
Expect.isTrue(cookie.toString().toLowerCase().indexOf("secure") > 0);