Пример #1
0
def test_ch_running(xvfb, tmpdir, request):
    with ChromiumWrapper(tmpdir,
                         executable=request.config.getoption('--chromium')):

        profile = tmpdir / PROFILE_NAME
        assert func.read_profile_state(profile) == func.ProfileState.RUNNING
        assert ebd.ChromiumProfile(None, profile).is_profile_running()
Пример #2
0
def test_ch_not_running(xvfb, tmpdir, request):
    # start and stop chromium
    ChromiumWrapper(
        tmpdir,
        executable=request.config.getoption('--chromium')).start().stop()

    profile = tmpdir / PROFILE_NAME
    assert func.read_profile_state(profile) == func.ProfileState.CLOSED
    assert not ebd.ChromiumProfile(None, profile).is_profile_running()
Пример #3
0
def test_ch_crashed(xvfb, tmpdir, request):
    # start and kill chromium
    ChromiumWrapper(
        tmpdir,
        executable=request.config.getoption('--chromium')).start().kill()

    profile = tmpdir / PROFILE_NAME
    assert func.read_profile_state(profile) == func.ProfileState.UNKNOWN

    # it should be detected as if it was running
    assert ebd.ChromiumProfile(None, profile).is_profile_running()
Пример #4
0
def test_ch_schema_extensions(blank_profile):
    ebd.ChromiumProfile(None, blank_profile[0]).reader().extensions()
Пример #5
0
def test_ch_schema_cookies(blank_profile):
    ebd.ChromiumProfile(None, blank_profile[0]).reader().cookies()
Пример #6
0
def test_ch_schema_bookmarks(blank_profile):
    ebd.ChromiumProfile(None, blank_profile[0]).reader().bookmarks()
Пример #7
0
def test_ch_schema_history(blank_profile):
    ebd.ChromiumProfile(None, blank_profile[0]).reader().history()