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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/containers/hash_tables.h" | 8 #include "base/containers/hash_tables.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
900 | 900 |
901 PostTaskToInProcessRendererAndWait( | 901 PostTaskToInProcessRendererAndWait( |
902 base::Bind( | 902 base::Bind( |
903 &DomSerializerTests::SerializeHTMLDOMWithEntitiesInTextOnRenderer, | 903 &DomSerializerTests::SerializeHTMLDOMWithEntitiesInTextOnRenderer, |
904 base::Unretained(this))); | 904 base::Unretained(this))); |
905 } | 905 } |
906 | 906 |
907 // Test situation of html entities in attribute value when serializing | 907 // Test situation of html entities in attribute value when serializing |
908 // HTML DOM. | 908 // HTML DOM. |
909 // This test started to fail at WebKit r65388. See http://crbug.com/52279. | 909 // This test started to fail at WebKit r65388. See http://crbug.com/52279. |
910 IN_PROC_BROWSER_TEST_F(DomSerializerTests, | 910 IN_PROC_BROWSER_TEST_F(DomSerializerTests, |
jochen (gone - plz use gerrit)
2013/12/13 12:19:42
please add a comment why this test is disabled.
| |
911 SerializeHTMLDOMWithEntitiesInAttributeValue) { | 911 DISABLE_SerializeHTMLDOMWithEntitiesInAttributeValue) { |
912 // Need to spin up the renderer and also navigate to a file url so that the | 912 // Need to spin up the renderer and also navigate to a file url so that the |
913 // renderer code doesn't attempt a fork when it sees a load to file scheme | 913 // renderer code doesn't attempt a fork when it sees a load to file scheme |
914 // from non-file scheme. | 914 // from non-file scheme. |
915 NavigateToURL(shell(), GetTestUrl(".", "simple_page.html")); | 915 NavigateToURL(shell(), GetTestUrl(".", "simple_page.html")); |
916 | 916 |
917 PostTaskToInProcessRendererAndWait( | 917 PostTaskToInProcessRendererAndWait( |
918 base::Bind( | 918 base::Bind( |
919 &DomSerializerTests:: | 919 &DomSerializerTests:: |
920 SerializeHTMLDOMWithEntitiesInAttributeValueOnRenderer, | 920 SerializeHTMLDOMWithEntitiesInAttributeValueOnRenderer, |
921 base::Unretained(this))); | 921 base::Unretained(this))); |
(...skipping 13 matching lines...) Expand all Loading... | |
935 base::Bind( | 935 base::Bind( |
936 &DomSerializerTests:: | 936 &DomSerializerTests:: |
937 SerializeHTMLDOMWithNonStandardEntitiesOnRenderer, | 937 SerializeHTMLDOMWithNonStandardEntitiesOnRenderer, |
938 base::Unretained(this), file_url)); | 938 base::Unretained(this), file_url)); |
939 } | 939 } |
940 | 940 |
941 // Test situation of BASE tag in original document when serializing HTML DOM. | 941 // Test situation of BASE tag in original document when serializing HTML DOM. |
942 // When serializing, we should comment the BASE tag, append a new BASE tag. | 942 // When serializing, we should comment the BASE tag, append a new BASE tag. |
943 // rewrite all the savable URLs to relative local path, and change other URLs | 943 // rewrite all the savable URLs to relative local path, and change other URLs |
944 // to absolute URLs. | 944 // to absolute URLs. |
945 IN_PROC_BROWSER_TEST_F(DomSerializerTests, SerializeHTMLDOMWithBaseTag) { | 945 IN_PROC_BROWSER_TEST_F(DomSerializerTests, |
946 DISABLE_SerializeHTMLDOMWithBaseTag) { | |
946 base::FilePath page_file_path = GetTestFilePath( | 947 base::FilePath page_file_path = GetTestFilePath( |
947 "dom_serializer", "html_doc_has_base_tag.htm"); | 948 "dom_serializer", "html_doc_has_base_tag.htm"); |
948 | 949 |
949 // Get page dir URL which is base URL of this file. | 950 // Get page dir URL which is base URL of this file. |
950 base::FilePath dir_name = page_file_path.DirName(); | 951 base::FilePath dir_name = page_file_path.DirName(); |
951 dir_name = dir_name.Append( | 952 dir_name = dir_name.Append( |
952 base::FilePath::StringType(base::FilePath::kSeparators[0], 1)); | 953 base::FilePath::StringType(base::FilePath::kSeparators[0], 1)); |
953 GURL path_dir_url = net::FilePathToFileURL(dir_name); | 954 GURL path_dir_url = net::FilePathToFileURL(dir_name); |
954 | 955 |
955 // Get file URL. | 956 // Get file URL. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1002 NavigateToURL(shell(), file_url); | 1003 NavigateToURL(shell(), file_url); |
1003 | 1004 |
1004 PostTaskToInProcessRendererAndWait( | 1005 PostTaskToInProcessRendererAndWait( |
1005 base::Bind( | 1006 base::Bind( |
1006 &DomSerializerTests:: | 1007 &DomSerializerTests:: |
1007 SubResourceForElementsInNonHTMLNamespaceOnRenderer, | 1008 SubResourceForElementsInNonHTMLNamespaceOnRenderer, |
1008 base::Unretained(this), file_url)); | 1009 base::Unretained(this), file_url)); |
1009 } | 1010 } |
1010 | 1011 |
1011 } // namespace content | 1012 } // namespace content |
OLD | NEW |