<commit_before>require "spec_helper"

describe "Options" do
  not_compliant_on :browser => :ie do
    describe "cookie management" do
      it "should get all" do
        driver.navigate.to url_for("xhtmlTest.html")
        driver.manage.add_cookie :name => "foo", :value => "bar"

        cookies = driver.manage.all_cookies

        cookies.should have(1).things
        cookies.first[:name].should == "foo"
        cookies.first[:value].should == "bar"
      end

      it "should delete one" do
        driver.navigate.to url_for("xhtmlTest.html")

        driver.manage.add_cookie :name => "foo", :value => "bar"
        driver.manage.delete_cookie("foo")
      end

      it "should delete all" do
        driver.navigate.to url_for("xhtmlTest.html")

        driver.manage.add_cookie :name => "foo", :value => "bar"
        driver.manage.delete_all_cookies
        driver.manage.all_cookies.should be_empty
      end

      not_compliant_on :browser => :chrome do
        it "should use DateTime for expires" do
          driver.navigate.to url_for("xhtmlTest.html")

          expected = DateTime.new(2039)
          driver.manage.add_cookie :name => "foo", :value => "bar", :expires => expected

          actual = driver.manage.cookie_named("foo")[:expires]
          actual.should be_kind_of(DateTime)
          actual.should == expected
        end
      end
    end
  end

  it "should be able to get and set speed" do
    driver.manage.speed = :slow
    driver.manage.speed.should == :slow

    driver.manage.speed = :fast
    driver.manage.speed.should == :fast
  end
end



<commit_msg>JariBakken: Unguard passing spec for cookie expiry in Chrome.<commit_after>require "spec_helper"

describe "Options" do
  not_compliant_on :browser => :ie do
    describe "cookie management" do
      it "should get all" do
        driver.navigate.to url_for("xhtmlTest.html")
        driver.manage.add_cookie :name => "foo", :value => "bar"

        cookies = driver.manage.all_cookies

        cookies.should have(1).things
        cookies.first[:name].should == "foo"
        cookies.first[:value].should == "bar"
      end

      it "should delete one" do
        driver.navigate.to url_for("xhtmlTest.html")

        driver.manage.add_cookie :name => "foo", :value => "bar"
        driver.manage.delete_cookie("foo")
      end

      it "should delete all" do
        driver.navigate.to url_for("xhtmlTest.html")

        driver.manage.add_cookie :name => "foo", :value => "bar"
        driver.manage.delete_all_cookies
        driver.manage.all_cookies.should be_empty
      end

      it "should use DateTime for expires" do
        driver.navigate.to url_for("xhtmlTest.html")

        expected = DateTime.new(2039)
        driver.manage.add_cookie :name => "foo", :value => "bar", :expires => expected

        actual = driver.manage.cookie_named("foo")[:expires]
        actual.should be_kind_of(DateTime)
        actual.should == expected
      end
    end
  end

  it "should be able to get and set speed" do
    driver.manage.speed = :slow
    driver.manage.speed.should == :slow

    driver.manage.speed = :fast
    driver.manage.speed.should == :fast
  end
end




{'fraction_non_alphanumeric': 0.1169811320754717, 'fraction_numerical': 0.0031446540880503146, 'mean_word_length': 2.5344444444444445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6594682', 'n_tokens_mistral': 1027, 'n_tokens_neox': 953, 'n_words': 235}