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

COVERAGE SUMMARY FOR SOURCE FILE [SignoutFragment.java]

nameclass, %method, %block, %line, %
SignoutFragment.java0%   (0/1)0%   (0/3)0%   (0/33)0%   (0/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class SignoutFragment0%   (0/1)0%   (0/3)0%   (0/33)0%   (0/8)
SignoutFragment (): void 0%   (0/1)0%   (0/3)0%   (0/1)
onClick (DialogInterface, int): void 0%   (0/1)0%   (0/14)0%   (0/6)
onCreateDialog (Bundle): Dialog 0%   (0/1)0%   (0/16)0%   (0/1)

1// Copyright 2013 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.chrome.testshell.sync;
6 
7import android.app.AlertDialog;
8import android.app.Dialog;
9import android.app.DialogFragment;
10import android.content.DialogInterface;
11import android.os.Bundle;
12 
13import org.chromium.chrome.browser.signin.SigninManager;
14import org.chromium.chrome.testshell.R;
15 
16/**
17 * The fragment to show when the user is given the option to sign out of Chromium.
18 */
19public class SignoutFragment extends DialogFragment implements DialogInterface.OnClickListener {
20    @Override
21    public Dialog onCreateDialog(Bundle savedInstanceState) {
22        return new AlertDialog.Builder(getActivity(), AlertDialog.THEME_HOLO_LIGHT)
23                .setTitle(R.string.signout_title)
24                .setPositiveButton(R.string.signout_sign_out, this)
25                .setNegativeButton(R.string.signout_cancel, this)
26                .create();
27    }
28 
29    @Override
30    public void onClick(DialogInterface dialog, int which) {
31        switch (which) {
32            case DialogInterface.BUTTON_POSITIVE: {
33                SigninManager.get(getActivity()).signOut(getActivity(), null);
34                break;
35            }
36            case DialogInterface.BUTTON_NEGATIVE: {
37                dismiss();
38                break;
39            }
40            default:
41                break;
42        }
43    }
44}

[all classes][org.chromium.chrome.testshell.sync]
EMMA 2.0.5312 (C) Vladimir Roubtsov