summaryrefslogtreecommitdiffstats
path: root/webkit/glue/dom_operations_unittest.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 17:51:20 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-06 17:51:20 +0000
commita48146712aa765290165d2425d02518f14e22cf4 (patch)
tree0e1946292faea4359a9ec20f93f879d32a2ba78b /webkit/glue/dom_operations_unittest.cc
parenta8f643b401ec655adbe20d98dc862f168b25b17a (diff)
downloadchromium_src-a48146712aa765290165d2425d02518f14e22cf4.zip
chromium_src-a48146712aa765290165d2425d02518f14e22cf4.tar.gz
chromium_src-a48146712aa765290165d2425d02518f14e22cf4.tar.bz2
Port some test_shell_tests, and platform cleanup for more of them.
Many of these files that I don't added to the build would even compile and link, but don't yet pass with current test_shell on Linux. They just hang. Patch from Paweł Hajdan jr <phajdan.jr@gmail.com> on http://codereview.chromium.org/9417 Review URL: http://codereview.chromium.org/9641 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/dom_operations_unittest.cc')
-rw-r--r--webkit/glue/dom_operations_unittest.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/webkit/glue/dom_operations_unittest.cc b/webkit/glue/dom_operations_unittest.cc
index 355c914..2ef4418 100644
--- a/webkit/glue/dom_operations_unittest.cc
+++ b/webkit/glue/dom_operations_unittest.cc
@@ -55,7 +55,7 @@ void DomOperationsTests::GetSavableResourceLinksForPage(
&referrers_list,
&frames_list);
- GURL main_page_gurl(file_wurl);
+ GURL main_page_gurl(WideToUTF8(file_wurl));
ASSERT_TRUE(webkit_glue::GetAllSavableResourceLinksForCurrentPage(
test_shell_->webView(), main_page_gurl, &result));
// Check all links of sub-resource
@@ -80,20 +80,20 @@ TEST_F(DomOperationsTests, GetSavableResourceLinksWithPageHasValidLinks) {
std::wstring page_file_path = data_dir_;
file_util::AppendToPath(&page_file_path, L"dom_serializer");
- const wchar_t* expected_sub_resource_links[] = {
- L"file:///c:/yt/css/base_all-vfl36460.css",
- L"file:///c:/yt/js/base_all_with_bidi-vfl36451.js",
- L"file:///c:/yt/img/pixel-vfl73.gif"
+ const char* expected_sub_resource_links[] = {
+ "file:///c:/yt/css/base_all-vfl36460.css",
+ "file:///c:/yt/js/base_all_with_bidi-vfl36451.js",
+ "file:///c:/yt/img/pixel-vfl73.gif"
};
const wchar_t* expected_frame_links[] = {
L"youtube_1.htm",
L"youtube_2.htm"
};
// Add all expected links of sub-resource to expected set.
- for (int i = 0; i < arraysize(expected_sub_resource_links); ++i)
+ for (size_t i = 0; i < arraysize(expected_sub_resource_links); ++i)
expected_resources_set.insert(GURL(expected_sub_resource_links[i]));
// Add all expected links of frame to expected set.
- for (int i = 0; i < arraysize(expected_frame_links); ++i) {
+ for (size_t i = 0; i < arraysize(expected_frame_links); ++i) {
std::wstring expected_frame_url = page_file_path;
file_util::AppendToPath(&expected_frame_url, expected_frame_links[i]);
expected_resources_set.insert(
@@ -116,7 +116,7 @@ TEST_F(DomOperationsTests, GetSavableResourceLinksWithPageHasInvalidLinks) {
L"youtube_2.htm"
};
// Add all expected links of frame to expected set.
- for (int i = 0; i < arraysize(expected_frame_links); ++i) {
+ for (size_t i = 0; i < arraysize(expected_frame_links); ++i) {
std::wstring expected_frame_url = page_file_path;
file_util::AppendToPath(&expected_frame_url, expected_frame_links[i]);
expected_resources_set.insert(
@@ -133,7 +133,7 @@ TEST_F(DomOperationsTests, ParseIconSizes) {
const std::wstring input;
const bool expected_result;
const bool is_any;
- const int expected_size_count;
+ const size_t expected_size_count;
const int width1;
const int height1;
const int width2;
@@ -160,7 +160,7 @@ TEST_F(DomOperationsTests, ParseIconSizes) {
{ L" 10x11 ", true, false, 1, 10, 11, 0, 0 },
{ L" 10x11 1x2", true, false, 2, 10, 11, 1, 2 },
};
- for (size_t i = 0; i < arraysize(data); ++i) {
+ for (size_t i = 0; i < ARRAYSIZE_UNSAFE(data); ++i) {
bool is_any;
std::vector<gfx::Size> sizes;
const bool result =