summaryrefslogtreecommitdiffstats
path: root/webkit/glue/dom_serializer_unittest.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 05:00:45 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-07 05:00:45 +0000
commit3afb9d38ba9ea2fd44fe44a026fdec1396188637 (patch)
treed96d28140c7f2227eac2cae0ff0027504bcbf958 /webkit/glue/dom_serializer_unittest.cc
parentb504899244b4264994d4daae2bee660706dba652 (diff)
downloadchromium_src-3afb9d38ba9ea2fd44fe44a026fdec1396188637.zip
chromium_src-3afb9d38ba9ea2fd44fe44a026fdec1396188637.tar.gz
chromium_src-3afb9d38ba9ea2fd44fe44a026fdec1396188637.tar.bz2
Don't assume WebCore::UChar is equivalent to wchar_t, and don't assume '\\' is a valid file path separator.
Review URL: http://codereview.chromium.org/9489 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4972 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/dom_serializer_unittest.cc')
-rw-r--r--webkit/glue/dom_serializer_unittest.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/webkit/glue/dom_serializer_unittest.cc b/webkit/glue/dom_serializer_unittest.cc
index 99d0fdc..b5df8e2 100644
--- a/webkit/glue/dom_serializer_unittest.cc
+++ b/webkit/glue/dom_serializer_unittest.cc
@@ -573,7 +573,8 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithBaseTag) {
// There are total 2 available base tags in this test file.
const int kTotalBaseTagCountInTestFile = 2;
std::wstring page_file_path = data_dir_;
- file_util::AppendToPath(&page_file_path, L"dom_serializer\\");
+ file_util::AppendToPath(&page_file_path, L"dom_serializer");
+ page_file_path.append(1, file_util::kPathSeparator);
// Get page dir URL which is base URL of this file.
GURL path_dir_url = net::FilePathToFileURL(page_file_path);
// Get file path.
@@ -619,12 +620,12 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithBaseTag) {
}
}
}
- ASSERT_TRUE(original_base_tag_count == kTotalBaseTagCountInTestFile);
+ ASSERT_EQ(original_base_tag_count, kTotalBaseTagCountInTestFile);
// Make sure in original document, the base URL is not equal with the
// |path_dir_url|.
GURL original_base_url(
WideToUTF8(webkit_glue::StringToStdWString(doc->baseURL())));
- ASSERT_TRUE(original_base_url != path_dir_url);
+ ASSERT_NE(original_base_url, path_dir_url);
// Do serialization.
SerializeDomForURL(page_url, false);
@@ -671,9 +672,9 @@ TEST_F(DomSerializerTests, SerialzeHTMLDOMWithBaseTag) {
}
}
// We have one more added BASE tag which is generated by JavaScript.
- ASSERT_TRUE(new_base_tag_count == original_base_tag_count + 1);
+ ASSERT_EQ(new_base_tag_count, original_base_tag_count + 1);
// Make sure in new document, the base URL is equal with the |path_dir_url|.
GURL new_base_url(
WideToUTF8(webkit_glue::StringToStdWString(doc->baseURL())));
- ASSERT_TRUE(new_base_url == path_dir_url);
+ ASSERT_EQ(new_base_url, path_dir_url);
}