summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 15:53:16 +0000
committerpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-11-08 15:53:16 +0000
commitd198ffe61aa5331b32236770ccbd8e2b642c830a (patch)
tree7883ec8f9c84ead68509d40b7800ba905c43ef31
parent6bf2f78736b7165e2762806f001c36425b9f0e6a (diff)
downloadchromium_src-d198ffe61aa5331b32236770ccbd8e2b642c830a.zip
chromium_src-d198ffe61aa5331b32236770ccbd8e2b642c830a.tar.gz
chromium_src-d198ffe61aa5331b32236770ccbd8e2b642c830a.tar.bz2
Move the OverlayShowDoesntShift test to a lighter-weight test case
OverlayDShowDoesntShift doesn't use any of the extended functionality of OptionsWebUIExtendedTest, so move it into the simpler OptionsWebUITest. This is a speculative change to fix the occasional flakiness of this test -- but it's also valid cleanup in its own right. BUG=315250 Review URL: https://codereview.chromium.org/61653003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@233906 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/webui/options/options_browsertest.js51
1 files changed, 23 insertions, 28 deletions
diff --git a/chrome/browser/ui/webui/options/options_browsertest.js b/chrome/browser/ui/webui/options/options_browsertest.js
index 4126071..b39f59e 100644
--- a/chrome/browser/ui/webui/options/options_browsertest.js
+++ b/chrome/browser/ui/webui/options/options_browsertest.js
@@ -277,9 +277,31 @@ TEST_F('OptionsWebUITest', 'emptySelectedIndexesDoesntCrash', function() {
setTimeout(testDone);
});
+// An overlay's position should remain the same as it shows.
+TEST_F('OptionsWebUITest', 'OverlayShowDoesntShift', function() {
+ var overlayName = 'startup';
+ var overlay = $('startup-overlay');
+ var frozenPages = document.getElementsByClassName('frozen'); // Gets updated.
+ expectEquals(0, frozenPages.length);
+
+ document.addEventListener('webkitTransitionEnd', function(e) {
+ if (e.target != overlay)
+ return;
+
+ assertFalse(overlay.classList.contains('transparent'));
+ expectEquals(numFrozenPages, frozenPages.length);
+ testDone();
+ });
+
+ OptionsPage.navigateToPage(overlayName);
+ var numFrozenPages = frozenPages.length;
+ expectGT(numFrozenPages, 0);
+});
+
/**
* TestFixture for OptionsPage WebUI testing including tab history and support
- * for preference manipulation.
+ * for preference manipulation. If you don't need the features in the C++
+ * fixture, use the simpler OptionsWebUITest (above) instead.
* @extends {testing.Test}
* @constructor
*/
@@ -691,33 +713,6 @@ TEST_F('OptionsWebUIExtendedTest', 'OverlayBackToUnrelated', function() {
});
});
-// Flaky on win. See http://crbug.com/315250
-GEN('#if defined(OS_WIN)');
-GEN('#define MAYBE_OverlayShowDoesntShift DISABLED_OverlayShowDoesntShift');
-GEN('#else');
-GEN('#define MAYBE_OverlayShowDoesntShift OverlayShowDoesntShift');
-GEN('#endif // defined(OS_WIN)');
-
-// An overlay's position should remain the same as it shows.
-TEST_F('OptionsWebUIExtendedTest', 'MAYBE_OverlayShowDoesntShift', function() {
- var searchEngineOverlay = $('search-engine-manager-page');
- var frozenPages = document.getElementsByClassName('frozen'); // Gets updated.
- expectEquals(0, frozenPages.length);
-
- document.addEventListener('webkitTransitionEnd', function(e) {
- if (e.target != searchEngineOverlay)
- return;
-
- assertFalse(searchEngineOverlay.classList.contains('transparent'));
- expectEquals(numFrozenPages, frozenPages.length);
- testDone();
- });
-
- OptionsPage.navigateToPage('searchEngines');
- var numFrozenPages = frozenPages.length;
- expectGT(numFrozenPages, 0);
-});
-
// Verify history changes properly while the page is loading.
TEST_F('OptionsWebUIExtendedTest', 'HistoryUpdatedAfterLoading', function() {
var loc = location.href;