OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
6 #include "base/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/hash_tables.h" | 8 #include "base/hash_tables.h" |
9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 web_frame->document().encoding()); | 334 web_frame->document().encoding()); |
335 // Make sure serialized contents do not have document type. | 335 // Make sure serialized contents do not have document type. |
336 web_frame = test_shell_->webView()->mainFrame(); | 336 web_frame = test_shell_->webView()->mainFrame(); |
337 doc = web_frame->document(); | 337 doc = web_frame->document(); |
338 ASSERT_TRUE(!HasDocType(doc)); | 338 ASSERT_TRUE(!HasDocType(doc)); |
339 } | 339 } |
340 | 340 |
341 // Serialize XML document which has all 5 built-in entities. After | 341 // Serialize XML document which has all 5 built-in entities. After |
342 // finishing serialization, the serialized contents should be same | 342 // finishing serialization, the serialized contents should be same |
343 // with original XML document. | 343 // with original XML document. |
344 TEST_F(DomSerializerTests, SerializeXMLDocWithBuiltInEntities) { | 344 // Disabled because of crbug.com/227030 |
| 345 TEST_F(DomSerializerTests, DISABLED_SerializeXMLDocWithBuiltInEntities) { |
345 base::FilePath page_file_path = data_dir_; | 346 base::FilePath page_file_path = data_dir_; |
346 page_file_path = page_file_path.AppendASCII("dom_serializer"); | 347 page_file_path = page_file_path.AppendASCII("dom_serializer"); |
347 page_file_path = page_file_path.AppendASCII("note.xml"); | 348 page_file_path = page_file_path.AppendASCII("note.xml"); |
348 // Read original contents for later comparison. | 349 // Read original contents for later comparison. |
349 std::string original_contents; | 350 std::string original_contents; |
350 ASSERT_TRUE(file_util::ReadFileToString(page_file_path, &original_contents)); | 351 ASSERT_TRUE(file_util::ReadFileToString(page_file_path, &original_contents)); |
351 // Get file URL. | 352 // Get file URL. |
352 GURL file_url = net::FilePathToFileURL(page_file_path); | 353 GURL file_url = net::FilePathToFileURL(page_file_path); |
353 ASSERT_TRUE(file_url.SchemeIsFile()); | 354 ASSERT_TRUE(file_url.SchemeIsFile()); |
354 // Load the test file. | 355 // Load the test file. |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
863 ASSERT_TRUE(web_frame != NULL); | 864 ASSERT_TRUE(web_frame != NULL); |
864 WebDocument doc = web_frame->document(); | 865 WebDocument doc = web_frame->document(); |
865 WebNode lastNodeInBody = doc.body().lastChild(); | 866 WebNode lastNodeInBody = doc.body().lastChild(); |
866 ASSERT_EQ(WebNode::ElementNode, lastNodeInBody.nodeType()); | 867 ASSERT_EQ(WebNode::ElementNode, lastNodeInBody.nodeType()); |
867 WebString uri = webkit_glue::GetSubResourceLinkFromElement( | 868 WebString uri = webkit_glue::GetSubResourceLinkFromElement( |
868 lastNodeInBody.to<WebElement>()); | 869 lastNodeInBody.to<WebElement>()); |
869 EXPECT_TRUE(uri.isNull()); | 870 EXPECT_TRUE(uri.isNull()); |
870 } | 871 } |
871 | 872 |
872 } // namespace | 873 } // namespace |
OLD | NEW |