Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: chrome/android/javatests/src/org/chromium/chrome/browser/firstrun/FirstRunIntegrationTest.java

Issue 1141283003: Upstream oodles of Chrome for Android code into Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: final patch? Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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
5 package org.chromium.chrome.browser.firstrun;
6
7 import android.test.suitebuilder.annotation.SmallTest;
8 import android.view.KeyEvent;
9
10 import org.chromium.base.test.util.CommandLineFlags;
11 import org.chromium.base.test.util.Feature;
12 import org.chromium.chrome.browser.ChromeSwitches;
13 import org.chromium.chrome.browser.tabmodel.TabList;
14 import org.chromium.chrome.test.ChromeTabbedActivityTestBase;
15
16 /**
17 * Integration test suite for the first run experience.
18 */
19 @CommandLineFlags.Remove(ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE)
20 public class FirstRunIntegrationTest extends ChromeTabbedActivityTestBase {
21
22 /**
23 * Exiting the first run experience should close all tabs,
24 * finalize the tab closures and close Chrome.
25 */
26 @SmallTest
27 @Feature({"FirstRunExperience"})
28 public void testExitFirstRunExperience() {
29 if (FirstRunStatus.getFirstRunFlowComplete(getActivity())) {
30 return;
31 }
32
33 sendKeys(KeyEvent.KEYCODE_BACK);
34 getInstrumentation().waitForIdleSync();
35
36 assertEquals("Expected no tabs to be present",
37 0, getActivity().getCurrentTabModel().getCount());
38 TabList fullModel = getActivity().getCurrentTabModel().getComprehensiveM odel();
39 assertEquals("Expected no tabs to be present in the comprehensive model" ,
40 0, fullModel.getCount());
41 assertTrue("Activity was not closed.",
42 getActivity().isFinishing() || getActivity().isDestroyed());
43 }
44
45 @Override
46 public void startMainActivity() throws InterruptedException {
47 startMainActivityFromLauncher();
48 }
49
50 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698