EMMA Coverage Report (generated Fri Aug 23 16:39:17 PDT 2013)
[all classes][org.chromium.content.browser]

COVERAGE SUMMARY FOR SOURCE FILE [NavigationHistory.java]

nameclass, %method, %block, %line, %
NavigationHistory.java100% (1/1)100% (6/6)100% (31/31)100% (9/9)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class NavigationHistory100% (1/1)100% (6/6)100% (31/31)100% (9/9)
NavigationHistory (): void 100% (1/1)100% (8/8)100% (2/2)
addEntry (NavigationEntry): void 100% (1/1)100% (6/6)100% (2/2)
getCurrentEntryIndex (): int 100% (1/1)100% (3/3)100% (1/1)
getEntryAtIndex (int): NavigationEntry 100% (1/1)100% (6/6)100% (1/1)
getEntryCount (): int 100% (1/1)100% (4/4)100% (1/1)
setCurrentEntryIndex (int): void 100% (1/1)100% (4/4)100% (2/2)

1// Copyright (c) 2012 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4 
5package org.chromium.content.browser;
6 
7import java.util.ArrayList;
8 
9/**
10 * {@link NavigationHistory} captures a snapshot of the navigation history of a
11 * {@link ContentView}. It is a copy and will not be updated as navigation
12 * occurs on the source {@link ContentView}.
13 */
14public class NavigationHistory {
15 
16    private ArrayList<NavigationEntry> entries = new ArrayList<NavigationEntry>();
17    private int mCurrentEntryIndex;
18 
19    protected void addEntry(NavigationEntry entry) {
20        entries.add(entry);
21    }
22 
23    /* package */ void setCurrentEntryIndex(int currentEntryIndex) {
24        mCurrentEntryIndex = currentEntryIndex;
25    }
26 
27    /**
28     * @return The number of entries in the history.
29     */
30    public int getEntryCount() {
31        return entries.size();
32    }
33 
34    /**
35     * Returns the {@link NavigationEntry} for the given index.
36     */
37    public NavigationEntry getEntryAtIndex(int index) {
38        return entries.get(index);
39    }
40 
41    /**
42     * Returns the index of the entry the {@link ContentView} was navigated to
43     * when the history was fetched.
44     */
45    public int getCurrentEntryIndex() {
46        return mCurrentEntryIndex;
47    }
48 
49}

[all classes][org.chromium.content.browser]
EMMA 2.0.5312 (C) Vladimir Roubtsov