package org.chromium.content.browser;
-import android.test.suitebuilder.annotation.SmallTest;
-
+import org.chromium.base.test.util.DisabledTest;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.UrlUtils;
import org.chromium.content.browser.test.util.JavaScriptUtils;
-import org.chromium.content.browser.test.util.TestCallbackHelperContainer;
import org.chromium.content_shell_apk.ContentShellActivity;
import org.chromium.content_shell_apk.ContentShellTestBase;
"<body onorientationchange='changes++;'>foo</body>" +
"</html>");
- private ContentView mContentView;
+ private ContentViewCore mContentViewCore;
/**
* Returns the screen orientation as seen by |window.orientation|.
throws InterruptedException, TimeoutException {
return Integer.parseInt(
JavaScriptUtils.executeJavaScriptAndWaitForResult(
- mContentView,
- new TestCallbackHelperContainer(mContentView),
+ mContentViewCore,
"window.orientation"));
}
throws InterruptedException, TimeoutException {
return Integer.parseInt(
JavaScriptUtils.executeJavaScriptAndWaitForResult(
- mContentView,
- new TestCallbackHelperContainer(mContentView),
+ mContentViewCore,
"changes"));
}
* Simulate a screen orientation change for the web content.
*/
private void updateScreenOrientationForContent(int orientation) {
- mContentView.getContentViewCore().sendOrientationChangeEvent(orientation);
+ mContentViewCore.sendOrientationChangeEvent(orientation);
}
@Override
ContentShellActivity activity = launchContentShellWithUrl(DEFAULT_URL);
waitForActiveShellToBeDoneLoading();
- mContentView = activity.getActiveContentView();
+ mContentViewCore = activity.getActiveContentViewCore();
}
- @SmallTest
+ /*
+ * Broken by http://src.chromium.org/viewvc/blink?revision=173532&view=revision
+ * crbug.com/371144
+ * @SmallTest
+ */
+ @DisabledTest
@Feature({"ScreenOrientation"})
public void testNoOp() throws Throwable {
assertEquals(0, getWindowOrientationChangeCount());
}
- @SmallTest
+ /*
+ * Broken by http://src.chromium.org/viewvc/blink?revision=173532&view=revision
+ * crbug.com/371144
+ * @SmallTest
+ */
+ @DisabledTest
@Feature({"ScreenOrientation"})
public void testExpectedValues() throws Throwable {
int[] values = { 90, -90, 180, 0, 90 };
// We can't test unexpected value because it is branching to a NOTREACHED().
- @SmallTest
+ /*
+ * Broken by http://src.chromium.org/viewvc/blink?revision=173532&view=revision
+ * crbug.com/371144
+ * @SmallTest
+ */
+ @DisabledTest
@Feature({"ScreenOrientation"})
public void testNoChange() throws Throwable {
// The target angle for that test should depend on the current orientation.