diff options
author | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-25 03:20:35 +0000 |
---|---|---|
committer | hclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-25 03:20:35 +0000 |
commit | c77702cddb59dd0b6304ca2c46a72aeec7ee84b0 (patch) | |
tree | 145aecddfed76f23422ed756717dbd3fd4641f1e | |
parent | 34b2bb45e9f363cde3562b0b4584f8fd774b1830 (diff) | |
download | chromium_src-c77702cddb59dd0b6304ca2c46a72aeec7ee84b0.zip chromium_src-c77702cddb59dd0b6304ca2c46a72aeec7ee84b0.tar.gz chromium_src-c77702cddb59dd0b6304ca2c46a72aeec7ee84b0.tar.bz2 |
Revert r50798 as it seems to create ui test failures
TBR=ericu, michaeln
Review URL: http://codereview.chromium.org/2863025
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50813 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | DEPS | 3 | ||||
-rw-r--r-- | chrome/browser/appcache/appcache_ui_test.cc | 75 | ||||
-rw-r--r-- | chrome/chrome_tests.gypi | 1 | ||||
-rw-r--r-- | chrome/test/ui/ui_layout_test.cc | 17 |
4 files changed, 3 insertions, 93 deletions
@@ -100,9 +100,6 @@ deps = { "src/chrome/test/data/layout_tests/LayoutTests/fast/workers": Var("webkit_trunk") + "/LayoutTests/fast/workers@" + Var("webkit_revision"), - "src/chrome/test/data/layout_tests/LayoutTests/http/tests/appcache": - Var("webkit_trunk") + "/LayoutTests/http/tests/appcache@" + - Var("webkit_revision"), "src/chrome/test/data/layout_tests/LayoutTests/http/tests/resources": Var("webkit_trunk") + "/LayoutTests/http/tests/resources@" + Var("webkit_revision"), diff --git a/chrome/browser/appcache/appcache_ui_test.cc b/chrome/browser/appcache/appcache_ui_test.cc deleted file mode 100644 index 23afd8b..0000000 --- a/chrome/browser/appcache/appcache_ui_test.cc +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "base/file_path.h" -#include "chrome/test/ui/ui_layout_test.h" - -class AppCacheUITest : public UILayoutTest { - protected: - virtual ~AppCacheUITest() {} -}; - -TEST_F(AppCacheUITest, FLAKY_AppCacheLayoutTests) { - static const char* kLayoutTestFiles[] = { - "404-manifest.html", - "404-resource.html", - "auth.html", - "cyrillic-uri.html", - "deferred-events-delete-while-raising.html", - "deferred-events.html", - "destroyed-frame.html", - "detached-iframe.html", - "different-origin-manifest.html", - "different-scheme.html", - "empty-manifest.html", - "fallback.html", - "foreign-iframe-main.html", - "main-resource-hash.html", - "manifest-containing-itself.html", - "manifest-parsing.html", - "manifest-redirect-2.html", - "manifest-redirect.html", - "manifest-with-empty-file.html", - "navigating-away-while-cache-attempt-in-progress.html", - "offline-access.html", - "online-whitelist.html", - "reload.html", - "remove-cache.html", - "resource-redirect-2.html", - "resource-redirect.html", - "simple.html", - "top-frame-1.html", - "top-frame-2.html", - "top-frame-3.html", - "top-frame-4.html", - "whitelist-wildcard.html", - "wrong-content-type.html", - "wrong-signature-2.html", - "wrong-signature.html", - "xhr-foreign-resource.html", - - // TOOD(michaeln): investigate these more closely - // "crash-when-navigating-away-then-back.html", - // "credential-url.html", - // "different-https-origin-resource-main.html", - // "fail-on-update.html", - // "idempotent-update.html", not sure this is a valid test - // "local-content.html", - // "max-size.html", we use a different quota scheme - // "update-cache.html", bug 38006 - }; - - FilePath http_test_dir; - http_test_dir = http_test_dir.AppendASCII("http"); - http_test_dir = http_test_dir.AppendASCII("tests"); - - FilePath appcache_test_dir; - appcache_test_dir = appcache_test_dir.AppendASCII("appcache"); - InitializeForLayoutTest(http_test_dir, appcache_test_dir, kHttpPort); - - StartHttpServer(new_http_root_dir_); - for (size_t i = 0; i < arraysize(kLayoutTestFiles); ++i) - RunLayoutTest(kLayoutTestFiles[i], kHttpPort); - StopHttpServer(); -} diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi index 08c76f9..4cdabed 100644 --- a/chrome/chrome_tests.gypi +++ b/chrome/chrome_tests.gypi @@ -298,7 +298,6 @@ ], 'sources': [ 'app/chrome_main_uitest.cc', - 'browser/appcache/appcache_ui_test.cc', 'browser/browser_encoding_uitest.cc', 'browser/browser_uitest.cc', 'browser/cookie_modal_dialog_uitest.cc', diff --git a/chrome/test/ui/ui_layout_test.cc b/chrome/test/ui/ui_layout_test.cc index 6c5415f..73556a9 100644 --- a/chrome/test/ui/ui_layout_test.cc +++ b/chrome/test/ui/ui_layout_test.cc @@ -156,16 +156,6 @@ void UILayoutTest::AddResourceForLayoutTest(const FilePath& parent_dir, ASSERT_TRUE(file_util::CopyDirectory(src_dir, dest_dir, true)); } -static size_t FindInsertPosition(const std::string& html) { - size_t tag_start = html.find("<html"); - if (tag_start == std::string::npos) - return 0; - size_t tag_end = html.find(">", tag_start); - if (tag_end == std::string::npos) - return 0; - return tag_end + 1; -} - void UILayoutTest::RunLayoutTest(const std::string& test_case_file_name, int port) { SCOPED_TRACE(test_case_file_name.c_str()); @@ -185,10 +175,9 @@ void UILayoutTest::RunLayoutTest(const std::string& test_case_file_name, ASSERT_TRUE(file_util::ReadFileToString(test_file_path, &test_html)); // Injects the layout test controller into the test HTML. - size_t insertion_position = FindInsertPosition(test_html); - test_html.insert(insertion_position, layout_test_controller_); - ReplaceFirstSubstringAfterOffset( - &test_html, insertion_position, "%COOKIE%", status_cookie.c_str()); + test_html.insert(0, layout_test_controller_); + ReplaceSubstringsAfterOffset( + &test_html, 0, "%COOKIE%", status_cookie.c_str()); // Creates the new layout test HTML file. FilePath new_test_file_path(new_layout_test_dir_); |