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 // |
| 911 // TODO(tiger@opera.com): Disabled in preparation of page serializer merge -- |
| 912 // Some attributes are handled differently in the merged serializer. |
| 913 // Bug: http://crbug.com/328354 |
910 IN_PROC_BROWSER_TEST_F(DomSerializerTests, | 914 IN_PROC_BROWSER_TEST_F(DomSerializerTests, |
911 SerializeHTMLDOMWithEntitiesInAttributeValue) { | 915 DISABLE_SerializeHTMLDOMWithEntitiesInAttributeValue) { |
912 // Need to spin up the renderer and also navigate to a file url so that the | 916 // 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 | 917 // renderer code doesn't attempt a fork when it sees a load to file scheme |
914 // from non-file scheme. | 918 // from non-file scheme. |
915 NavigateToURL(shell(), GetTestUrl(".", "simple_page.html")); | 919 NavigateToURL(shell(), GetTestUrl(".", "simple_page.html")); |
916 | 920 |
917 PostTaskToInProcessRendererAndWait( | 921 PostTaskToInProcessRendererAndWait( |
918 base::Bind( | 922 base::Bind( |
919 &DomSerializerTests:: | 923 &DomSerializerTests:: |
920 SerializeHTMLDOMWithEntitiesInAttributeValueOnRenderer, | 924 SerializeHTMLDOMWithEntitiesInAttributeValueOnRenderer, |
921 base::Unretained(this))); | 925 base::Unretained(this))); |
(...skipping 13 matching lines...) Expand all Loading... |
935 base::Bind( | 939 base::Bind( |
936 &DomSerializerTests:: | 940 &DomSerializerTests:: |
937 SerializeHTMLDOMWithNonStandardEntitiesOnRenderer, | 941 SerializeHTMLDOMWithNonStandardEntitiesOnRenderer, |
938 base::Unretained(this), file_url)); | 942 base::Unretained(this), file_url)); |
939 } | 943 } |
940 | 944 |
941 // Test situation of BASE tag in original document when serializing HTML DOM. | 945 // 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. | 946 // 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 | 947 // rewrite all the savable URLs to relative local path, and change other URLs |
944 // to absolute URLs. | 948 // to absolute URLs. |
945 IN_PROC_BROWSER_TEST_F(DomSerializerTests, SerializeHTMLDOMWithBaseTag) { | 949 // |
| 950 // TODO(tiger@opera.com): Disabled in preparation of page serializer merge -- |
| 951 // Base tags are handled a bit different in merged version. |
| 952 // Bug: http://crbug.com/328354 |
| 953 IN_PROC_BROWSER_TEST_F(DomSerializerTests, |
| 954 DISABLE_SerializeHTMLDOMWithBaseTag) { |
946 base::FilePath page_file_path = GetTestFilePath( | 955 base::FilePath page_file_path = GetTestFilePath( |
947 "dom_serializer", "html_doc_has_base_tag.htm"); | 956 "dom_serializer", "html_doc_has_base_tag.htm"); |
948 | 957 |
949 // Get page dir URL which is base URL of this file. | 958 // Get page dir URL which is base URL of this file. |
950 base::FilePath dir_name = page_file_path.DirName(); | 959 base::FilePath dir_name = page_file_path.DirName(); |
951 dir_name = dir_name.Append( | 960 dir_name = dir_name.Append( |
952 base::FilePath::StringType(base::FilePath::kSeparators[0], 1)); | 961 base::FilePath::StringType(base::FilePath::kSeparators[0], 1)); |
953 GURL path_dir_url = net::FilePathToFileURL(dir_name); | 962 GURL path_dir_url = net::FilePathToFileURL(dir_name); |
954 | 963 |
955 // Get file URL. | 964 // Get file URL. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1002 NavigateToURL(shell(), file_url); | 1011 NavigateToURL(shell(), file_url); |
1003 | 1012 |
1004 PostTaskToInProcessRendererAndWait( | 1013 PostTaskToInProcessRendererAndWait( |
1005 base::Bind( | 1014 base::Bind( |
1006 &DomSerializerTests:: | 1015 &DomSerializerTests:: |
1007 SubResourceForElementsInNonHTMLNamespaceOnRenderer, | 1016 SubResourceForElementsInNonHTMLNamespaceOnRenderer, |
1008 base::Unretained(this), file_url)); | 1017 base::Unretained(this), file_url)); |
1009 } | 1018 } |
1010 | 1019 |
1011 } // namespace content | 1020 } // namespace content |
OLD | NEW |