| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package org.chromium.chrome.browser.preferences.privacy; | 5 package org.chromium.chrome.browser.preferences.privacy; |
| 6 | 6 |
| 7 import android.content.Intent; | 7 import android.content.Intent; |
| 8 import android.os.AsyncTask; | 8 import android.os.AsyncTask; |
| 9 import android.preference.CheckBoxPreference; | 9 import android.preference.CheckBoxPreference; |
| 10 import android.preference.Preference; | 10 import android.preference.Preference; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 /** | 45 /** |
| 46 * Integration tests for ClearBrowsingDataPreferences. | 46 * Integration tests for ClearBrowsingDataPreferences. |
| 47 */ | 47 */ |
| 48 @RetryOnFailure | 48 @RetryOnFailure |
| 49 public class ClearBrowsingDataPreferencesTest | 49 public class ClearBrowsingDataPreferencesTest |
| 50 extends ChromeActivityTestCaseBase<ChromeActivity> { | 50 extends ChromeActivityTestCaseBase<ChromeActivity> { |
| 51 private EmbeddedTestServer mTestServer; | 51 private EmbeddedTestServer mTestServer; |
| 52 | 52 |
| 53 @Override | 53 @Override |
| 54 protected void setUp() throws Exception { | 54 protected void setUp() throws Exception { |
| 55 SigninTestUtil.setUpAuthForTest(getInstrumentation()); | 55 SigninTestUtil.setUpAuthForTest(); |
| 56 | 56 |
| 57 super.setUp(); | 57 super.setUp(); |
| 58 mTestServer = EmbeddedTestServer.createAndStartServer(getInstrumentation
().getContext()); | 58 mTestServer = EmbeddedTestServer.createAndStartServer(getInstrumentation
().getContext()); |
| 59 } | 59 } |
| 60 | 60 |
| 61 @Override | 61 @Override |
| 62 protected void tearDown() throws Exception { | 62 protected void tearDown() throws Exception { |
| 63 mTestServer.stopAndDestroyServer(); | 63 mTestServer.stopAndDestroyServer(); |
| 64 super.tearDown(); | 64 super.tearDown(); |
| 65 | 65 |
| 66 SigninTestUtil.tearDownAuthForTest(); | |
| 67 } | 66 } |
| 68 | 67 |
| 69 public ClearBrowsingDataPreferencesTest() { | 68 public ClearBrowsingDataPreferencesTest() { |
| 70 super(ChromeActivity.class); | 69 super(ChromeActivity.class); |
| 71 } | 70 } |
| 72 | 71 |
| 73 @Override | 72 @Override |
| 74 public void startMainActivity() throws InterruptedException { | 73 public void startMainActivity() throws InterruptedException { |
| 75 startMainActivityOnBlankPage(); | 74 startMainActivityOnBlankPage(); |
| 76 } | 75 } |
| (...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 public void run() { | 607 public void run() { |
| 609 for (DialogOption option : DialogOption.values()) { | 608 for (DialogOption option : DialogOption.values()) { |
| 610 boolean enabled = typesToClear.contains(option); | 609 boolean enabled = typesToClear.contains(option); |
| 611 PrefServiceBridge.getInstance().setBrowsingDataDeletionPrefe
rence( | 610 PrefServiceBridge.getInstance().setBrowsingDataDeletionPrefe
rence( |
| 612 option.getDataType(), ClearBrowsingDataTab.ADVANCED,
enabled); | 611 option.getDataType(), ClearBrowsingDataTab.ADVANCED,
enabled); |
| 613 } | 612 } |
| 614 } | 613 } |
| 615 }); | 614 }); |
| 616 } | 615 } |
| 617 } | 616 } |
| OLD | NEW |