summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorerikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-20 19:08:19 +0000
committererikwright@chromium.org <erikwright@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-20 19:08:19 +0000
commit372c678fe24e1c32f2cbbacc6fea251c73305718 (patch)
tree173865de09fff685cc58948d85a8124558b761c0 /chrome_frame
parent45049705c354435d22fb95f08d59153fa1ed06ef (diff)
downloadchromium_src-372c678fe24e1c32f2cbbacc6fea251c73305718.zip
chromium_src-372c678fe24e1c32f2cbbacc6fea251c73305718.tar.gz
chromium_src-372c678fe24e1c32f2cbbacc6fea251c73305718.tar.bz2
Automatically disable FLAKY_* version of disabled tests, if any.
R=robertshield CC=grt BUG=None TEST=chrome_frame_net_tests pass, and URLRequestTestHTTP.FLAKY_ProxyTunnelRedirectTest doesn't get run. Review URL: https://chromiumcodereview.appspot.com/10578041 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143221 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/test/net/fake_external_tab.cc18
1 files changed, 16 insertions, 2 deletions
diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc
index f7d9ded..151f267 100644
--- a/chrome_frame/test/net/fake_external_tab.cc
+++ b/chrome_frame/test/net/fake_external_tab.cc
@@ -19,6 +19,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
#include "base/scoped_temp_dir.h"
+#include "base/string_piece.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
#include "base/system_monitor/system_monitor.h"
@@ -237,9 +238,9 @@ void FilterDisabledTests() {
"URLRequestTest.CancelTest_During_OnGetCookies",
"URLRequestTest.CancelTest_During_OnSetCookie",
- // These tests are disabled as the rely on functionality provided by
+ // These tests are disabled as they rely on functionality provided by
// Chrome's HTTP stack like the ability to set the proxy for a URL, etc.
- "URLRequestTestHTTP.FLAKY_ProxyTunnelRedirectTest",
+ "URLRequestTestHTTP.ProxyTunnelRedirectTest",
"URLRequestTestHTTP.UnexpectedServerAuthTest",
// This test is disabled as it expects an empty UA to be echoed back from
@@ -298,6 +299,19 @@ void FilterDisabledTests() {
for (int i = 0; i < arraysize(disabled_tests); ++i) {
if (i > 0)
filter += ":";
+
+ // If the rule has the form TestSuite.TestCase, also filter out
+ // TestSuite.FLAKY_TestCase . This way the exclusion rules above
+ // don't need to be updated when a test is marked flaky.
+ base::StringPiece test_name(disabled_tests[i]);
+ size_t dot_index = test_name.find('.');
+ if (dot_index != base::StringPiece::npos &&
+ dot_index + 1 < test_name.size()) {
+ test_name.substr(0, dot_index).AppendToString(&filter);
+ filter += ".FLAKY_";
+ test_name.substr(dot_index + 1).AppendToString(&filter);
+ filter += ":";
+ }
filter += disabled_tests[i];
}