OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.app.AlertDialog; | 7 import android.app.AlertDialog; |
8 import android.test.suitebuilder.annotation.MediumTest; | 8 import android.test.suitebuilder.annotation.MediumTest; |
9 import android.test.suitebuilder.annotation.SmallTest; | 9 import android.test.suitebuilder.annotation.SmallTest; |
10 | 10 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 mTab.loadUrlWithSanitization(TestHttpServerClient.getUrl(url), p
ostData); | 117 mTab.loadUrlWithSanitization(TestHttpServerClient.getUrl(url), p
ostData); |
118 } | 118 } |
119 }); | 119 }); |
120 } | 120 } |
121 | 121 |
122 /** Reloads mTab. */ | 122 /** Reloads mTab. */ |
123 private void reload() throws Throwable { | 123 private void reload() throws Throwable { |
124 runTestOnUiThread(new Runnable() { | 124 runTestOnUiThread(new Runnable() { |
125 @Override | 125 @Override |
126 public void run() { | 126 public void run() { |
127 mTab.reload(); | 127 mTab.reload(true); |
128 } | 128 } |
129 }); | 129 }); |
130 } | 130 } |
131 | 131 |
132 /** Clicks the given button in the given dialog. */ | 132 /** Clicks the given button in the given dialog. */ |
133 private void clickButton(final AlertDialog dialog, final int buttonId) throw
s Throwable { | 133 private void clickButton(final AlertDialog dialog, final int buttonId) throw
s Throwable { |
134 runTestOnUiThread(new Runnable() { | 134 runTestOnUiThread(new Runnable() { |
135 @Override | 135 @Override |
136 public void run() { | 136 public void run() { |
137 dialog.getButton(buttonId).performClick(); | 137 dialog.getButton(buttonId).performClick(); |
138 } | 138 } |
139 }); | 139 }); |
140 } | 140 } |
141 } | 141 } |
OLD | NEW |